Document Content Description for XML, Version 1.0 By Tim Bray, Charles Frankston and Ashok Malhotra EECS 684 Presentation by Calvin Ang.

Slides:



Advertisements
Similar presentations
XML 6.3 DTD 6. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:  Elements.
Advertisements

Document Type Definition DTDs CS-328. What is a DTD Defines the structure of an XML document Only the elements defined in a DTD can be used in an XML.
XML Schemas Microsoft XML Schemas W3C XML Schemas.
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
2/9/00 EECS 684: Current Topics in Databases1 ( W3C Working Draft 17 December 1999 )
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.
A Technical Introduction to XML Transparency No. 1 XML quick References.
 2002 Prentice Hall, Inc. All rights reserved. ISQA 407 XML/WML Winter 2002 Dr. Sergio Davalos.
XML Schema Matthias Hauswirth. Agenda 4 W3C Process 4 XML Schema Requirements 4 The Specifications 4 Schema Tools.
Full declaration When an element is declared to have element content, the children element types must also be declared Example: to which the following.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
XML Verification Well-formed XML document  conforms to basic XML syntax  contains only built-in character entities Validated XML document  conforms.
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
VALIDATING AN XML DOCUMENT
Unit 4 – XML Schema XML - Level I Basic.
Introduction to XML This material is based heavily on the tutorial by the same name at
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
Lecture 15 XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name.
Validating DOCUMENTS with DTDs
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
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.
1 XML Schemas. 2 Useful Links Schema tutorial links:
Dr. Azeddine Chikh IS446: Internet Software Development.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
MIS 315 Bsharah An Introduction to XML 1MIS Bsharah.
Cornell CS 502 More XML XHTML, namespaces, DTDs CS 502 – Carl Lagoze – Cornell University.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
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.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
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.
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 –
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.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 5 XML Schema (Based on Møller and Schwartzbach,
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
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.
Working with XML Schemas ©NIITeXtensible Markup Language/Lesson 3/Slide 1 of 36 Objectives In this lesson, you will learn to: * Declare attributes in an.
QUALITY CONTROL WITH SCHEMAS CSC1310 Fall BASIS CONCEPTS SchemaSchema is a pass-or-fail test for document Schema is a minimum set of requirements.
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
Document Type Definition (DTD) Eugenia Fernandez IUPUI.
XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name value pair;
 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:
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
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
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Session III Chapter 6 – Creating DTDs
Chapter 7 Representing Web Data: XML
New Perspectives on XML
Session II Chapter 6 – Creating DTDs
New Perspectives on XML
Presentation transcript:

Document Content Description for XML, Version 1.0 By Tim Bray, Charles Frankston and Ashok Malhotra EECS 684 Presentation by Calvin Ang

Slide 2 Introduction n Presentation Scope –Design Principles –DCD Framework –DCD Vocabulary –Datatypes –Examples –Conclusion

Slide 3 Document Abstract n Submission to World Wide Web Consortium n proposes structural schema facility, Document Content Description (DCD) n rules covering structure & content of XML documents n consistent with ongoing W3C Resource Description Framework (RDF) effort n DCD is in many respects similar to an XML DTD, although it hopes to achieve more

Slide 4 Sample DCD Code: Airline Booking n DCD code provides constraints for an airline booking Describes an airline reservation LastName FirstInitial SeatRow SeatLetter Departure Class

Slide 5 Sample DCD Code: Airline Booking n Booking record that conforms to the schema Bray T 33 B T07:55:00+1

Slide 6 Design Principles n DCD is based on the following design principles: 1. DCD semantics is superset of those provided by XML DTDs 2. DCD data model & syntax conformant with RDF 3. Constraints in DCD are usable by authoring tools and other applications retrieving information about document’s content and structure 4. DCD to use mechanisms from other W3C working groups wherever appropriate & efficient 5. DCDs should be human-readable and reasonably clear

Slide 7 DCD Framework n Syntax –Conformant to RDF Model & Syntax Specification –Assumes certain simplifications –Syntax only adopted if ratified by RDF working group

Slide 8 DCD Framework n DCD Nodes and Resource Types –namespace which describes DCD properties and resources is identified by the URI –URI contains the following types: DCD, ElementDef, Group, AttributeDef, ExternalEntityDef and InternalEntityDef –DCD is a document structure description –XML document can fall under the constraints of more than one DCD Benefit 1 - single DCD used to provide constraints for large numbers of separate documents Benefit 2 - DCD object provides convenient level of granularity for applying namespace mechanisms

Slide 9 DCD Framework n Resource Types –ElementDef & AttributeDef are more detailed structure descriptors –provide constraints governing elements & attributes in the XML document

Slide 10 DCD Framework n Referring to Elements –DCD declarations constrain the content & attributes of elements in document instances –done by assigning properties to objects of type ElementDef –Elements may have other elements as children, or have attributes provided with certain names and properties –Child elements must be collected together into Groups which have Order and Occurs properties –Each ElementDef must have a unique Type property within the DCD

Slide 11 DCD Framework n Referring to Elements –attributes & elements referred to in a particular DCD may come from the same DCD or from other DCDs identified by namespaces –if element definition comes from another namespace, the value of the Type property may be a qualified name, where the prefix identifies the namespace

Slide 12 Sample DCD Code: Namespace n Element definition comes from another namespace FirstName, MI and LastName are defined elsewhere in the DCD but Address comes from a namespace declared with a common prefix FirstName MI LastName common:Address

Slide 13 DCD Framework n Referring to Attributes –Attributes are defined in DCDs using objects of type AttributeDef –Attribute property occur on its own as a property of the DCD, or occur within an element definition –Global property whose value may be True or False (default) If value of Global property True, the name property must be unique in the DCD –Global attributes can be referred to by their names in any element definition within the DCD

Slide 14 Sample DCD Code: Global Attributes Hidden is a global attribute in the DCD, while schemas:CLASS is a global attribute from another namespace Hidden schemas:CLASS

Slide 15 DCD Vocabulary n Properties Which Apply to DCDs –AttributeDef declares an attribute type which may be provided for one or more elements in such documents property does not assert that the attribute is provided for any individual element type –Description provides a presumably human-readable description of the semantics and usage of this DCD Value of this property must match the Content under the XML specification

Slide 16 DCD Vocabulary n Properties Which Apply to DCDs –InternalEntityDef & ExternalEntityDef identify an entity which may be invoked via reference within such documents value of these properties must be a Node (in RDF terms) resource which is the property value must be identified by the class mechanism as an InternalEntityDef or ExternalEntityDef –Contents signals where elements of types not explicitly declared via ElementDef properties may appear in such documents value of property must be a string whose value is Open or Closed

Slide 17 DCD Vocabulary n Properties Which Apply to DCDs –Namespace provides the namespace of DCD value of this property must be a URI which identifies a namespace this property is required to exist for every DCD applies to all elements & attributes attached by properties to the DCD about HTML

Slide 18 DCD Vocabulary n Properties Which Apply to Element Definitions –Attribute & AttributeDef identifies attributes which may be provided for elements of this type no element definition may have two Attribute or AttributeDef properties referencing attributes that have the same name –Contents signals whether elements of types not explicitly declared via the Group property may appear as children of elements of this type value of this property must be a string whose value is Open or Closed

Slide 19 DCD Vocabulary n Properties Which Apply to Element Definitions –Datatype identifies a specific datatype which constrains the content of elements of this type value of property must be a string which matches one of an enumerated list of datatypes property is only meaningful if the value of the Model property is Data

Slide 20 DCD Vocabulary n Properties Which Apply to Element Definitions –Default & Fixed provides default values for the content of elements of this type signals whether any value other than the default is allowed value of default property must be a string only allowed values of the Fixed property are the strings True & False default property is only meaningful if value of the Model property is Data

Slide 21 DCD Vocabulary n Properties Which Apply to Element Definitions –Description provides presumably human-readable description of semantics and usage of elements of this type value of property must match production labeled Content in the XML specification

Slide 22 DCD Vocabulary n Properties Which Apply to Element Definitions –Groups, Occurs & Order an ElementDef whose Model property has the value Elements must also have a single property named Group, containing specification of the elements and groups which can appear as children of elements of this type Occurs can take one of 4 values –Required (occurs exactly once)… default value –Optional (occurs zero or only once) –OneOrMore (occurs one or more times) –ZeroOrMore (occurs zero or more times) Order –Seq (children must occur in specified order… default value) –Alt (only one of specified children may appear)

Slide 23 DCD Vocabulary n Properties Which Apply to Element Definitions –Max, Min, MaxExclusive, MinExclusive provide upper & lower bounds on the content of elements of this type Max and Min allow values upto and including the bound MaxExclusive and MinExclusive allow value less than and greater than the bound, respectively properties are only meaningful if value of Model property is Data –Model indicates which of 5 broad classes of constraints apply to the content of elements of this type value of this property must be a string whose value is one of Empty, Any, Data*, Elements, or Mixed (*default)

Slide 24 DCD Vocabulary n Properties Which Apply to Element Definitions –Root element definitions can have a root property that indicates whether an element of that type can serve as the root of a conforming document allowed values are True and False (default) –Type gives the type of the element property required for every Element resource in DCD may not contain a prefix or a colon

Slide 25 DCD Vocabulary n Properties Which Apply to Attribute Definitions –Global indicates whether name property of this attribute must be unique in the DCD can serve as an address for this attribute definition possible values are True and False (default) –ID-Role signals that attribute has unique identifier or unique ID pointer semantics value of property must be a string whose value is one of ID, IDREF, or IDREFS

Slide 26 DCD Vocabulary n Properties Which Apply to Attribute Definitions –Name gives name of the attribute property required for every Attribute resource in DCD may not contain a prefix or a colon –Occurs indicates whether the presence of the Attribute is required can take one of two values –Required –Optional

Slide 27 DCD Vocabulary n Properties Which Apply to Internal Entity Definitions –Name name by which the entity may be invoked property is required for every InternalEntity definition resource in DCD –Value provides replacement text for the internal entity value of this property must match the production labeled Content in the XML specification may contain markup and is well-formed

Slide 28 DCD Vocabulary n Properties Which Apply to External Entity Definitions –Name name by which the entity may be invoked required to be present for every ExternalEntity definition resource in DCD –PublicID provides a public identifier for the entity a string with syntax and semantics similar to XML specifications –SystemID provides system identifier for the entity must be provided for every ExternalEntity resource in DCD

Slide 29 Datatypes n Datatype Specifications –modeled after datatypes supported by SQL & other modern programming languages –purpose specify maximum values on certain datatypes specify syntax to constrain value of particular element/attribute within these maximum values specify acceptable formats for specification of such datatypes –referenced from datatype namespace –some require additional properties to be specified

Slide 30 Datatypes n Datatypes in Instances –provides benefit of datatype support to well- formed documents that may not have an associated DTD or DCD –XML parsers expected to provide assistance in encoding & decoding these datatypes

Slide 31 Datatypes n Picture Constraints –picture is an alphanumeric string consisting of character symbols –each symbol usually one character –may be two characters –can be used to constrain format of strings –in some cases control their conversion to numbers

Slide 32 Examples : Picture Constraints n Used to constrain the format of strings & in some cases control their conversion to numbers A A single alphabetic character. B A single blank character. E The character E, used to indicate floating point numbers. S The leftmost character of a picture indicating a signed number. The characters "+” or "-" may appear in the S position. V An implied decimal sign. The input 1234 validated by a picture 99V99 is converted into X Any character. Z The leftmost leading numeric character that can be replaced by a space character when the content of that content position is a zero. 9 Any numeric character. 1 Any boolean character (0 or 1). 0,/,-,., and, Represent themselves. cs The currency symbol.

Slide 33 Examples : Picture Constraints n Used to constrain the format of strings & in some cases control their conversion to numbers $123,45.90 satisfies picture $999,99.99 $123,45.90 satisfies picture XXXX,XX.XX satisfies picture (Social Security Number) 24E80 satisfies picture 99E99 (floating point) satisfies picture satisfies picture 99V99 (translates to 23.45)

Slide 34 Conclusion n Future Work –DCD’s full potential –requests from database community –several types of constraints required beyond those described Subclassing and Inheritance Database Interface The &-Connector

Slide 35 References n Document Content Description for XML – n Namespaces in XML – n Resource Description Framework Model & Syntax Specification –