Created
September 18, 2021 11:12
-
-
Save andylolz/b537ff3b3c8f96440de64ea6dd4a227e to your computer and use it in GitHub Desktop.
An XSD for validating the updated mapping.xml file (i.e. including validation-rules)
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:element ref="validation-rules" minOccurs="1" maxOccurs="1" /> | |
</xsd:sequence> | |
</xsd:complexType> | |
</xsd:element> | |
<xsd:element name="validation-rules"> | |
<xsd:complexType> | |
<xsd:sequence> | |
<xsd:element ref="validation-rule" minOccurs="1" maxOccurs="unbounded" /> | |
</xsd:sequence> | |
</xsd:complexType> | |
</xsd:element> | |
<xsd:element name="validation-rule"> | |
<xsd:complexType> | |
<xsd:sequence> | |
<xsd:element name="priority" type="xsd:string" minOccurs="1" maxOccurs="1" /> | |
<xsd:element name="severity" type="xsd:string" minOccurs="1" maxOccurs="1" /> | |
<xsd:element name="category" type="xsd:string" minOccurs="1" maxOccurs="1" /> | |
<xsd:element name="id" type="xsd:string" minOccurs="1" maxOccurs="1" /> | |
<xsd:element name="message" type="xsd:string" minOccurs="1" 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