1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
| <!-- TD1 Exercice 2 XML Schéma -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.commande.org"
xmlns="http://www.commande.org"
elementFormDefault="qualified" >
<xsd:element name="Commande">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Coord" ref="Commande"/>
<xsd:element name="date" ref="Commande" minOccurs="1"/>
<xsd:element name="total" ref="Commande" minOccurs="1"/>
<xsd:element name="lignecommande" ref="Commande" minOccurs="1"/>
<xsd:element name="nom" ref="Coord" type="xsd:string"/>
<xsd:element name="prenom" ref="Coord" type="xsd:string"/>
<xsd:element name="sociale" ref="Coord" type="xsd:string"/>
<xsd:element name="adresse" ref="Coord" type="xsd:string"/>
<xsd:element name="codepost" ref="Coord" type="xsd:int"/>
<xsd:element name="ville" ref="Coord" type="xsd:string"/>
<xsd:element name="pays" ref="Coord" type="xsd:string"/>
<xsd:element name="tel" ref="Coord" type="tel" minOccurs="1"/>
<xsd:element name="mail" ref="Coord" type="mail"/>
<xsd:attribute name="tel" default="fixe">
<xsd:simpleType name="tel">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="fax"/>
<xsd:enumeration value="mobile"/>
<xsd:enumeration value="fixe"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:element name="mail" type="mail"/>
<xsd:simpleType name="mail">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-zA-Z0-9]([a-zA-Z0-9_.]+)/@[a-zA-Z0-9]([a-zA-Z0-9_.-]+)/.[a-zA-Z]{2,4}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="typeClient" type="typeClient" ref="Commande"/>
<xsd:simpleType name="typeClient">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="net"/>
<xsd:enumeration value="tel"/>
<xsd:enumeration value="courrier"/>
<xsd:enumeration value="agence"/>
<xsd:enumeration value="mail"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="numCommande" type="numCommande" ref="Commande"/>
<xsd:simpleType name="numCommande">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-zA-Z0-9]{1}/-[0-9]{2}/-[0-9]{6}/-[0.0-9.0]{6}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="refClient" type="refClient" ref="Commande"/>
<xsd:simpleType name="refClient">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-zA-Z0-9]{4}/-[0-9]{2}/-[0.0-9.0]{3}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="date">
<xsd:restriction base="xsd:dateTime">
<xsd:enumeration value="commande"/>
<xsd:enumeration value="livraison"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="total">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="HT"/>
<xsd:enumeration value="TTC"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="reference" ref="lignecommande"/>
<xsd:element name="designation" ref="lignecommande"/>
<xsd:element name="prix" ref="lignecommande" minOccurs="1"/>
<xsd:simpleType name="reference">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{3}/-[a-zA-z0-9]{6}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="total">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="HT"/>
<xsd:enumeration value="TTC"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="prixType" type="prixType" ref="lignecommande"/>
<xsd:simpleType name="prixType">
<xsd:restriction base="xsd:int">
<xsd:enumeration value="unitaire HT"/>
<xsd:enumeration value="total TTC"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="quantite" ref="lignecommande"/>
<xsd:element name="numCommande" type="numCommande" ref="Commande"/> |
Partager