1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel

Slides:



Advertisements
Similar presentations
The eXtensible Markup Language (XML) An Applied Tutorial Kevin Thomas.
Advertisements

17 Apr 2002 XML Namespaces Andy Clark. The Problem Documents use different vocabularies – Example 1: CD music collection – Example 2: online order transaction.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
An Introduction to XML Based on the W3C XML Recommendations.
Leiden University. The university to discover. DMT 2009 Week 2 Adriaan van der Weel.
Tutorial 9 Working with XHTML
XML e X tensible M arkup L anguage 1/23.
Lecture 14 XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name.
More XML namespaces, DTDs CS 431 – February 16, 2005 Carl Lagoze – Cornell University.
Chapter 10 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 10 Sebesta: Programming the World Wide Web.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic XML.
1 CS 502: Computing Methods for Digital Libraries Lecture 6 DTDs.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
COS 381 Day 14. Agenda Questions?? Resources Source Code Available for examples in Text Book in Blackboard
XML Verification Well-formed XML document  conforms to basic XML syntax  contains only built-in character entities Validated XML document  conforms.
Unit 4 – XML Schema XML - Level I Basic.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Lecture 15 XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name.
XP The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 140 Internet Tools Instructor: Enoch E. Damson.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
Cornell CS 502 More XML XHTML, namespaces, DTDs CS 502 – Carl Lagoze – Cornell University.
XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Sheet 1XML Technology in E-Commerce 2001Lecture 1 XML Technology in E-Commerce Lecture 1 WWW, HTML, CSS, XML, Meta-modeling.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
New Perspectives on XML, 2nd Edition
An OO schema language for XML SOX W3C Note 30 July 1999.
More XML namespaces, DTDs CS 431 – Carl Lagoze – Cornell University.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML Basics A brief introduction to XML in general 1XML Basics.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
Information Design Trends Unit 4: Sources and Standards Lecture 3: A Brief Introduction to XML.
1 Compound Documents: Combining XML Vocabularies.
Representing data with XML SE-2030 Dr. Mark L. Hornick 1.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name value pair;
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
XML Namespaces In this first lesson XML Namespaces, you will learn to:
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
CITA 330 Section 2 DTD. Defining XML Dialects “Well-formedness” is the minimal requirement for an XML document; all XML parsers can check it Any useful.
Unit 4 Representing Web Data: XML
Extensible Markup Language XML
XML QUESTIONS AND ANSWERS
Eugenia Fernandez IUPUI
Extensible Markup Language XML
Chapter 7 Representing Web Data: XML
Web Programming Maymester 2004
Namespace Review 21-Nov-18.
Namespace Review 29-Dec-18.
Namespace Review 14-Oct-19.
Presentation transcript:

1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel Lecture 11 Markup languages – XML namespaces/schema

2 herbert van de sompel XML – basic terminology XML instance document: the document that contains the text in a mark-up-ed form style sheet: the document that contains the formatting instructions to be applied to an instance document Document Type Definition: the document that defines the grammar with which instance documents are compliant (elements, attributes, character set, required elements, optional elements, …) XML Schema: similar as DTD, but more powerful An XML application will usually process 3 types of documents

3 herbert van de sompel XML – namespaces Combining elements used in different types of XML documents into one XML instance document Avoid collapse of elements with the same name

4 herbert van de sompel My home page My hobby My books Kevin Davies Cracking the Genome 20.00

5 herbert van de sompel My home page My hobby My books Kevin Davies Cracking the Genome 20.00

6 herbert van de sompel My home page My hobby My books Kevin Davies Cracking the Genome 20.00

7 herbert van de sompel boxhtml bo:Book bo:title bo:author bo:price bo:ISBN xhtml:html xhtml:head xhtml:body xhtml:p xhtml:title vocabulary bo vocabulary xhtml XML – namespaces But who guarantees uniqueness of prefixes?

8 herbert van de sompel XML – namespaces Give prefixes only local relevance in an instance document Associate local prefix with global namespace name  a unique name for a namespace  uniqueness is guaranteed by using a URI (preferably URN ) in domain of the party creating the namespace  doesn’t have any meaning, i.e. doesn’t have to resolve into anything An XML namespace is a collection of names, identified by a URI reference, which are used in XML documents as element types and attribute names.

9 herbert van de sompel <xhtml:html xmlns:xhtml=“ xmlns:bo=“ My home page My hobby My books Kevin Davies ………………

10 herbert van de sompel <html xmlns=“ xmlns:bo=“ My home page My hobby My books Kevin Davies ………………

11 herbert van de sompel <html xmlns=“ My home page My hobby My books Kevin Davies ………………

12 herbert van de sompel <html xmlns=“ My home page My hobby My books Kevin Davies ………………

13 herbert van de sompel XML – XML schema Problems with XML DTD’s: DTD’s are not extensible: all rules must be present IN the DTD. Can import declarations from other DTD’s (external entity). Can not inherit those declarations. A document must be valid according to 1 DTD: prevents building on elements from different DTDs Limited support of namespaces: all used elements of all used namespaces must be must be IN the DTD

14 herbert van de sompel Problems with XML DTD’s (continued): Poor data typing: DTDs are minly about “text”. No provision for numeric data types, dates, times, strings conforming to regular expressions, URI’s, … DTD’s are defined in non-XML syntax => XML applications need XML processing and Backus Naur processing. Can not use XML tools! XML – XML schema

15 herbert van de sompel XML – XML schema by example See

16 herbert van de sompel XML Namespaces & Schema XML Namespaces / / XML Schema. Part 0: Primer.