Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML and Validation Tools Schema Schematron. XML eXtensible Markup Language (XML) –A metamarkup language. –The basic unit is called an element –Fairly.

Similar presentations


Presentation on theme: "XML and Validation Tools Schema Schematron. XML eXtensible Markup Language (XML) –A metamarkup language. –The basic unit is called an element –Fairly."— Presentation transcript:

1 XML and Validation Tools Schema Schematron

2 XML eXtensible Markup Language (XML) –A metamarkup language. –The basic unit is called an element –Fairly similar to HTML Pa ge 2 element value Element Attribute Opening tag Closing tag

3 Metamarkup? What does metamarkup mean? –There is no predefined and fixed set of tags for XML –XML allows implementers to define their own set of tags to meet their needs Pa ge 3 Examples Office Open XML (ISO/IEC 29500) Geography Markup Language (ISO 19136)

4 Markup – ESRI ArcGIS 10 XML Pa ge 4 Title 20110906

5 Markup – ISO 19139 XML Pa ge 5 Title 2011-09-06 creation

6 Well-Formed XML has strict rules, e.g.: –There must be one, and only one root element –All elements must have an opening and closing tag –Element names are case sensitive: is different from –XML conforming to the rules is said to be well-formed Pa ge 6

7 Well-Formed Pa ge 7 Title 20110906 Title 20110906 Summary No closing tag Opening and closing tags are different Two root elements

8 Structure The markup defines data structure: –It signifies which elements are associated –It can define semantics: –It says nothing about how to display data (there are exceptions to this rule) Pa ge 8 20110906

9 XML is machine readable And… –Human readable… honestly Pa ge 9

10 Pa ge 10

11 Schema and Validation

12 Schema Schemas document the elements that are permitted in an XML application –XML that conforms to a schema is said to be schema-valid –XML that does not conform to a schema is said to be invalid Pa ge 12

13 XML Schema Definition Language Pa ge 13... <xs:element name="title" type="gco:CharacterString_PropertyType"/> <xs:element name="alternateTitle" type="gco:CharacterString_PropertyType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="date" type="gmd:CI_Date_PropertyType" maxOccurs="unbounded"/>...

14 Markup – ISO 19139 XML Pa ge 14 Title 2011-09-06 creation

15 Schematron Schematron is: –A schema language for XML Document Schema Definition Language (DSDL) –Written in XML –It’s an ISO Standard – ISO 19757-3 Find out more at: http://www.schematron.com/ Pa ge 15

16 Why use Schematron? XSD schema is unable to test some constraints: –The ability to specify a choice of attributes –The ability to vary the content model based on the value of an element or attribute (this sort of constraint is common in the ISO 19115 logical model) Implementing profiles (e.g. MEDIN): –With Schematron there’s no need to edit the underlying standardised XSD Pa ge 16

17 Pa ge 17

18 What’s in a name? Schematron’s a funny name… –It’s just a reaction to the common use of acronyms – MEDIN ;-) – according to the author, Rick Jelliffe –It was originally to be called the Pink Schematron apparently see http://www.xmlhack.com/read.php?item=1 21&v=1 Pa ge 18

19 Validation Workflow Pa ge 19 XSD Schema ValidationSchematron Validation

20 Validation Tools Pa ge 20 Select profile XSD Schema Schematron schemas


Download ppt "XML and Validation Tools Schema Schematron. XML eXtensible Markup Language (XML) –A metamarkup language. –The basic unit is called an element –Fairly."

Similar presentations


Ads by Google