Your SlideShare is downloading. ×
Standards / XML / Validation / Transformation / ESRI
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Standards / XML / Validation / Transformation / ESRI

155
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
155
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • XML is a metamarkup language (explained later) The example shows an XML element, with a start and end tag, its value (the text “element value”), an attribute and its value (the text “attribute value”).
  • XML describes a means for marking up information. It does not provide a predefined set of tags for all users. In this sense it is a meta markup language. Instead, implementers are free to define their own set of tags.
  • This is an example from ESRI ArcGIS 10 metadata. idCitation is an element that contains other elements.
  • This is an example of the same data encoded according to ISO 19139.
  • The top example is well-formed XML. The second example is not well-formed. The following errors exist: There’s more than one root element (idCitation and idPurp) The start and end tag name of resTitle are different (ResTitle is considered different because of the character case) The element createDate has no closing tag
  • The XML here encodes a date, and specifically a creation date. This is expressed in the markup.
  • Some real XML
  • This is a sample from an XSD schema – actually from ISO 19139. The first thing to note is that it is encoded in XML.
  • This XML conforms to the previous XSD schema snippet.
  • Schematron is another type of schema language for XML. It is written in XML too. It’s an ISO standard – ISO 19757-3 (this is not one of the ISO / TC 211 standards).
  • XSD schema is unable to perform certain tests that are necessary to validate ISO 19115 metadata. Schematron plugs the gap.
  • ISO 19115 contains constraints which can not be tested with XSD schema. They can be tested with Schematron.
  • The overall validation process looks like this – for metadata.
  • MEDIN provides applications, such as Metadata Maestro, that implement all the necessary validation steps. This is a screen shot from the validation application of Metadata Maestro.
  • MEDIN provides applications, such as Metadata Maestro, which provide a means of applying XSL Stylesheets (version 1.0) to XML.
  • At version 10 of ESR ArcGIS there has been a change in the metadata encoding. It has been consolidated because ESRI need to support a range of different profiles. More information can be found at: http://blogs.esri.com/Dev/blogs/arcgisdesktop/archive/2011/01/03/A-new-approach-for-Metadata-with-ArcGIS-10.aspx
  • A screenshot of ESRI ArcCatalog. Users can select the metadata style – which includes INSPIRE metadata. Note that, no matter which style is selected, the metadata are still encoded according to the ESRI core metadata encoding. The style selected in options controls how metadata are imported and exported.
  • The metadata editing interface of ArcCatalog: A table of contents – select sections of metadata to edit – includes common names recognisable from ISO 19115 The data entry fields and controls Context help is displayed for data entry controls when they have focus Metadata can be saved
  • It’s necessary to apply an XSL stylesheet to transform from ESRI metadata to MEDIN metadata. MEDIN supplies stylesheets for this purpose. There’s one for ArcGIS version 9 and one for ArcGIS version 10. You can also use the Validate button in Arc 10.1 to do this.
  • Stylesheets can be implemented using Metadata Maestro or the ArcGIS 9 or 10 ArcToolBox
  • Transcript

    • 1. MEDIN Standards Workshop Standards / XML / Validation / Transformation / ESRI
    • 2. Introduction– XML– Schema and Validation • XSD Schema • Schematron– Transformation • Stylesheets– ESRI ArcGIS– Search
    • 3. XML
    • 4. XML•Extensible Markup Language (XML) – A metamarkup language – The basic unit is called an element Element <tag attribute="attribute value">element value</tag> AttributeOpening tag Closing tag – Apparently similar to HTML but…
    • 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 needsExamples • Office Open XML (ISO/IEC 29500) • Geography Markup Language (ISO 19136)
    • 6. Markup – ESRI ArcGIS 10 XML<idCitation> <resTitle>Title</resTitle> <date> <createDate>20110906</createDate> </date></idCitation>
    • 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. 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. Well-Formed <idCitation> <resTitle>Title</resTitle> <date> <createDate>20110906</createDate> </date> </idCitation> <idCitation> Opening and closing tags <resTitle>Title</ResTitle> are different <date>Two root elements <createDate>20110906 No closing tag </date> </idCitation> <idPurp>Summary</idPurp>
    • 10. Structure•The markup defines data structure: – It signifies which elements are associated – It can define semantics: <date> <createDate>20110906</createDate> </date> – It says nothing about how to display data (there are exceptions to this rule)
    • 11. XML is machine readable•And… – Human readable… honestly
    • 12. Schema and Validation
    • 13. Schema•Schemas document the elements that arepermitted 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
    • 14. XML Schema Definition Language<xs:complexType name="CI_Citation_Type"> ... <xs:complexContent> <xs:extension base="gco:AbstractObject_Type"> <xs:sequence> <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"/> ... </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
    • 15. 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>
    • 16. 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/
    • 17. Why use Schematron?•XSD schema is unable to test someconstraints: – 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
    • 18. Validation Workflow XSD Schema Validation Schematron Validation
    • 19. Validation ToolsSelect profileXSD Schema Schematron schemas
    • 20. Transformation
    • 21. XSLT•Extensible Stylesheet LanguageTransformations (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
    • 22. ESRI XML to MEDIN XML•MEDIN XML must be follow the ISO 19139 XMLencoding – 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
    • 23. Stylesheet Tools
    • 24. ESRI ArcGIS
    • 25. 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?
    • 26. ESRI ArcCatalog – Options
    • 27. ESRI ArcCatalog
    • 28. Transformatione.g. Internal use e.g. External / Publish to DACArcGIS 9 Metadata Transformation MEDIN MetadataArcGIS 10 Metadata
    • 29. 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