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
| <?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/schema" xmlns:tns="http://www.example.org/schema" elementFormDefault="qualified">
<element name="Bibli" >
<complexType>
<sequence>
<element ref="tns:Auteur" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:Livre" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<keyref name="Auteurref" refer="tns:keyAuteur">
<selector xpath="Livre/RefAuteur"/>
<field xpath="@auteur"/>
</keyref>
<key name="keyAuteur">
<selector xpath="Auteur"/>
<field xpath="@id"/>
</key>
</element>
<element name="Livre">
<complexType>
<sequence>
<element ref="tns:Description" minOccurs="1" maxOccurs="1"/>
<element ref="tns:RefAuteur" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="int" use="required"/>
</complexType>
</element>
<element name="Description" type="string"></element>
<element name="Auteur">
<complexType>
<attribute name="id" type="int" use="required"/>
<attribute name="nom" type="string" use="required"/>
</complexType>
</element>
<element name="RefAuteur">
<complexType>
<attribute name="auteur" type="int"/>
</complexType>
</element>
</schema> |
Partager