Skip to content

Instantly share code, notes, and snippets.

@cklein
Created July 5, 2012 07:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cklein/3051951 to your computer and use it in GitHub Desktop.
Save cklein/3051951 to your computer and use it in GitHub Desktop.
XML-Schema für ORDERS
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="order">
<xs:complexType>
<xs:all>
<xs:element name="empfaenger_iln" type="GLN"/>
<xs:element name="orderid_client" type="xs:string"/>
<xs:element name="anlieferdatum_von" type="xs:date"/>
<xs:element name="anlieferdatum_bis" type="xs:date"/>
<xs:element name="auftragsnr_kunde" type="xs:string"/>
<xs:element name="warenempfaenger" type="warenempfaenger" minOccurs="0" maxOccurs="1"/>
<xs:element name="orderlines" type="orderlines"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:complexType name="warenempfaenger">
<xs:all>
<xs:element name="warenempfaenger_iln" type="GLN" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_name1" type="nonEmptyString" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_name2" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_strasse" type="nonEmptyString" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_plz" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_ort" type="nonEmptyString" minOccurs="0" maxOccurs="1" />
<xs:element name="warenempfaenger_land" type="nonEmptyString" minOccurs="0" maxOccurs="1" />
</xs:all>
</xs:complexType>
<xs:complexType name="orderlines">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="orderline" type="orderline"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="orderline">
<xs:all>
<xs:element name="posnr" type="xs:positiveInteger"/>
<xs:element name="menge" type="xs:nonNegativeInteger"/>
<xs:element name="artnr" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ean" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:complexType>
<xs:simpleType name="GLN">
<xs:restriction base="xs:string">
<xs:length value="13"/>
<xs:pattern value="[0-9]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nonEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment