Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Schema Matthias Hauswirth. Agenda 4 W3C Process 4 XML Schema Requirements 4 The Specifications 4 Schema Tools.

Similar presentations


Presentation on theme: "XML Schema Matthias Hauswirth. Agenda 4 W3C Process 4 XML Schema Requirements 4 The Specifications 4 Schema Tools."— Presentation transcript:

1 XML Schema Matthias Hauswirth

2 Agenda 4 W3C Process 4 XML Schema Requirements 4 The Specifications 4 Schema Tools

3 The W3C Process Working Draft Candidate Recommendation Proposed Recommendation Recommendation Technical Reports (TR) Note Proposals Working Group Others

4 XML Schema: Status Working Drafts (Part 0, 1, 2) Candidate Recommendation Proposed Recommendation Recommendation Technical Reports (TR) Requirements DCDXML-Data Schema Working Group Others SOXDDML

5 XML Schema Requirements 4 Structural –namespaces –primitive types & structural schema integration –inheritance 4 Data type –integers, dates, … (like in languages) –user-defined (constrain some properties) 4 Conformance –processors, validity

6 Design Principles 4 More expressive than DTDs 4 Expressed in XML 4 Self-describing 4 Usable by various XML applications 4 Simple enough

7 The Specifications 4 Part 0: Primer –non-normative introduction 4 Part 1: Structures –define structure –constraining contents 4 Part 2: Datatypes –specify datatypes on elements and attributes

8 An Example Document (1/2) Matthias Hauswirth 4500 Brookfield Dr. Boulder CO 80303 Brian Temple 1234 Strasse Boulder CO 80302...

9 An Example Document (2/2) Brian pays Porsche 1 129400.00 Need a new one Ferrari 2 189000.25 1999-05-21

10 An Example Schema (1/3)...

11 An Example Schema (2/3) <xsd:attribute name=“country” type=“xsd:NMTOKEN” use=“fixed” value=“US”/>...

12 An Example Schema (3/3)

13 Part 1: Structures  Type Definitions  Attribute Declarations  Element Declarations  Attribute Group Definitions  Model Group Definitions  Notation Declarations  Annotations

14 DTD vs. Schema Structure 4 DTD  Schema

15 Referential/Uniqueness Integrity  Define Constraints using XPath expressions 4

16 Part 2: Datatypes 4 Value Space –defined axiomatically (primitive types) –enumerated outright –defined by restricting value space of other type –combination of values of other type (list)  has certain properties (e.g. cardinality, equality, ordered) 4 Lexical Space –set of literals for a type (e.g. 100 and 1.0E2 denote same value) 4 Facets –fundamental facets (define the type) –constraining facets (allow to constrain the value space)

17 Fundamental Facets  Fundamental facets can’t be changed 4 Equal –all types provide an equality relation 4 Order –some types provide an ordering relation 4 Bounds –upper bound and lower bound 4 Cardinality –finite, infinite 4 Numeric –yes or no

18 Constraining Facets 4 length 4 minLength 4 maxLength 4 pattern 4 enumeration 4 maxInclusive / maxExclusive 4 minInclusive / minExclusive 4 precision 4 scale 4 encoding 4 duration 4 period

19 Primitive vs. Derived Types 4 Primitive Types –string –boolean –float –double –decimal –timeDuration –recurringDuration –binary –uriReference –ID –IDREF –ENTITY –NOTATION –QName  exist ab initio 4 Derived Type –by restriction use constraining facets <pattern value=“\d{3}-[A-D]{4}”/> –by list next slide

20 Built-in vs. User-Derived Types 4 Built-in types –primitive –derived language IDREFS long int short positiveInteger time month recurringDay... 4 User-derived types –derived-only

21 Atomic vs. List Types 4 Atomic –values indivisible 10.5 4 List –sequence of values of atomic type 8 10 10.5

22 Tools 4 XML Schema-aware Parser –Xerces-J –Oracle XML Schema Processor 4 XML Schema Validator (XSV, online) 4 DTD to Schema Conversion Tools 4 XML Schema Editor –Extensibility’s XML Authority 4 XML Schema-aware Instance Editor –Extensibility’s XMLInstance –ChannelPoint’s Merlot (maybe in future)


Download ppt "XML Schema Matthias Hauswirth. Agenda 4 W3C Process 4 XML Schema Requirements 4 The Specifications 4 Schema Tools."

Similar presentations


Ads by Google