1 / 31

MEDIN Standards Workshop

MEDIN Standards Workshop. Standards / XML / Validation / Transformation / ESRI. Introduction. XML Schema and Validation XSD Schema Schematron Transformation Stylesheets ESRI ArcGIS Search. XML. XML. Extensible Markup Language (XML) A metamarkup language

tanner
Download Presentation

MEDIN Standards Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MEDIN Standards Workshop Standards / XML / Validation / Transformation / ESRI

  2. Page 2 Introduction • XML • Schema and Validation • XSD Schema • Schematron • Transformation • Stylesheets • ESRI ArcGIS • Search

  3. XML

  4. Page 4 XML • Extensible Markup Language (XML) • A metamarkup language • The basic unit is called an element • Apparently similar to HTML but… Element <tagattribute="attribute value">element value</tag> Attribute Opening tag Closing tag

  5. Page 5 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 • Examples • Office Open XML (ISO/IEC 29500) • Geography Markup Language (ISO 19136)

  6. Page 6 Markup – ESRI ArcGIS 10 XML <idCitation> <resTitle>Title</resTitle> <date> <createDate>20110906</createDate> </date> </idCitation>

  7. Page 7 Markup – ISO 19139 XML <gmd:citation> <gmd:CI_Citation> <gmd:title> <gco:CharacterString>Title</gco:CharacterString> </gmd:title> <gmd:date> <gmd:CI_Date> <gmd:date> <gco:Date>2011-09-06</gco:Date> </gmd:date> <gmd:dateType> <gmd:CI_DateTypeCodecodeList="...#CI_DateTypeCode" codeListValue="creation">creation</gmd:CI_DateTypeCode> </gmd:dateType> </gmd:CI_Date> </gmd:date> </gmd:CI_Citation> </gmd:citation>

  8. Page 8 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: • <citation/> is different from <Citation/> • XML conforming to the rules is said to be well-formed

  9. Page 9 Opening and closing tags are different Two root elements No closing tag Well-Formed <idCitation> <resTitle>Title</resTitle> <date> <createDate>20110906</createDate> </date> </idCitation> <idCitation> <resTitle>Title</ResTitle> <date> <createDate>20110906 </date> </idCitation> <idPurp>Summary</idPurp>

  10. Page 10 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) <date> <createDate>20110906</createDate> </date>

  11. Page 11 XML is machine readable • And… • Human readable… honestly

  12. Page 12

  13. Schema and Validation

  14. Page 14 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

  15. Page 15 XML Schema Definition Language <xs:complexTypename="CI_Citation_Type"> ... <xs:complexContent> <xs:extensionbase="gco:AbstractObject_Type"> <xs:sequence> <xs:elementname="title" type="gco:CharacterString_PropertyType"/> <xs:elementname="alternateTitle" type="gco:CharacterString_PropertyType" minOccurs="0" maxOccurs="unbounded"/> <xs:elementname="date" type="gmd:CI_Date_PropertyType" maxOccurs="unbounded"/> ... </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>

  16. Page 16 Markup – ISO 19139 XML <gmd:citation> <gmd:CI_Citation> <gmd:title> <gco:CharacterString>Title</gco:CharacterString> </gmd:title> <gmd:date> <gmd:CI_Date> <gmd:date> <gco:Date>2011-09-06</gco:Date> </gmd:date> <gmd:dateType> <gmd:CI_DateTypeCodecodeList="...#CI_DateTypeCode" codeListValue="creation">creation</gmd:CI_DateTypeCode> </gmd:dateType> </gmd:CI_Date> </gmd:date> </gmd:CI_Citation> </gmd:citation>

  17. Page 17 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/

  18. Page 18 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

  19. Page 19

  20. Page 21 XSD Schema Validation Schematron Validation Validation Workflow

  21. Page 22 Validation Tools Select profile XSD Schema Schematron schemas

  22. Transformation

  23. Page 24 XSLT • Extensible Stylesheet Language Transformations (XSLT) • Specifies rules for transforming one XML instance into another XML instance • The output XML instance will have a different structure from the input XML instance

  24. Page 25 ESRI XML to MEDIN XML • MEDIN XML must be follow the ISO 19139 XML encoding • Users may wish to use other software to create and manage metadata (e.g. ESRI desktop GIS) • ESRI software manages metadata using XML • The XML does not following the ISO 19139 standard • The XML can be transformed to ISO 19139 • MEDIN provides resources to support this

  25. Page 26 Stylesheet Tools

  26. ESRI ArcGIS

  27. Page 28 Versions • ArcGIS 9 • FGDC / ISO • ArcGIS 10 • ESRI Core Metadata • Both use XML encoding • The encodings are slightly different • Why the change at version 10?

  28. Page 29 ESRI ArcCatalog – Options

  29. Page 30 ESRI ArcCatalog

  30. Page 31 Transformation e.g. Internal use e.g. External / Publish to DAC ArcGIS 9 Metadata MEDIN Metadata Transformation ArcGIS 10 Metadata

  31. Page 32 Transform Options • Use MEDIN stylesheets • ArcGIS 9 version • ArcGIS 10 version (or the Validate button) • Implementation • Any XSL stylesheet processor (version1.0), e.g: • ArcGIS 9 or 10 ArcToolBox • Metadata Maestro

More Related