Created
September 16, 2021 07:38
-
-
Save andylolz/c283123e4424e31926e41f424b971559 to your computer and use it in GitHub Desktop.
A minimal XSD for validating the mapping.xml file in http://github.com/IATI/IATI-Codelists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> | |
<xsd:element name="mappings"> | |
<xsd:complexType> | |
<xsd:sequence> | |
<xsd:element ref="mapping" minOccurs="1" maxOccurs="unbounded" /> | |
</xsd:sequence> | |
</xsd:complexType> | |
</xsd:element> | |
<xsd:element name="mapping"> | |
<xsd:complexType> | |
<xsd:sequence> | |
<xsd:element name="path" type="xsd:string" minOccurs="1" maxOccurs="1" /> | |
<xsd:element name="codelist" minOccurs="1" maxOccurs="1"> | |
<xsd:complexType> | |
<xsd:attribute name="ref" type="xsd:string" use="required" /> | |
</xsd:complexType> | |
</xsd:element> | |
<xsd:element name="condition" type="xsd:string" minOccurs="0" maxOccurs="1" /> | |
</xsd:sequence> | |
</xsd:complexType> | |
</xsd:element> | |
</xsd:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment