Skip to content

Instantly share code, notes, and snippets.

@sm-Fifteen
Created November 8, 2018 01:24
Show Gist options
  • Save sm-Fifteen/1f8853963e3df3b53a3065d67796139e to your computer and use it in GitHub Desktop.
Save sm-Fifteen/1f8853963e3df3b53a3065d67796139e to your computer and use it in GitHub Desktop.
Test XML schema
<?xml version = "1.0"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:element name = 'blazon'>
<xs:complexType>
<xs:sequence>
<xs:element name = 'ecu' type = 'EcuType' minOccurs = '0' maxOccurs = '1' />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name = "EcuType">
<xs:sequence minOccurs = '0' maxOccurs = '1'>
<xs:element name = "champ" type = "QuartierType"/>
</xs:sequence>
<xs:attribute name = 'forme' type = 'xs:string'/>
</xs:complexType>
<xs:complexType name = "PartitionType">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name = "quartier" type = "QuartierType"/>
</xs:sequence>
<xs:attribute name = 'division' type = 'xs:string' use="required"/>
</xs:complexType>
<xs:complexType name = "QuartierType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name = "partition" type = "PartitionType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name = 'couleur' type = 'xs:string'/>
</xs:complexType>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment