Skip to content

Instantly share code, notes, and snippets.

@etoyoda
Created April 21, 2013 10:40
Show Gist options
  • Save etoyoda/5429212 to your computer and use it in GitHub Desktop.
Save etoyoda/5429212 to your computer and use it in GitHub Desktop.
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
<title>Requirements not enforceable with XML Schema (Table A.1) of ISO/TS 19139:2006</title>
<ns prefix="gmd" uri="http://www.isotc211.org/2005/gmd"/>
<pattern xml:id="iso19139taba1pat" id="iso19139taba1pat">
<rule context="gmd:CI_ResponsibleParty">
<assert
id="ISO19139.TA1.responsibleParty:"
flag="M-ISO"
test="gmd:individualName or gmd:organisationName or gmd:positionName">count of (individualName + organisationName + positionName) &gt; 0</assert>
</rule>
<rule context="gmd:MD_Metadata">
<let name="hierarchyLevel" value="substring-before(
concat(gmd:hierarchyLevel/*/@codeListValue, ' ', 'dataset '),
' ')" />
<assert
id="ISO19139.TA1.geographic"
flag="M-ISO"
test="($hierarchyLevel != 'dataset') or (count(
gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox) +
count(gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription)
&gt; 0)"
>When hierarchyLevel is dataset, either EX_GeographicBoundingBox or EX_GeographicDescription MUST be documented.</assert>
</rule>
</pattern>
</schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment