Bonjour je ve faire un park automobile ayant plusieurs voitures
chaque voiture a un proprietaire que l on ressortir dans l exercice
pour cela il faut utiliser les contraintes referencielles
voici mon code mais j'ai une erreur et je ne sais pas pourquoi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?xml version="1.0" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="Parking"> <xsd:complexType> <xsd:sequence> <xsd:element name="voiture" /> <xsd:element name="personne" /> </xsd:sequence> </xsd:complexType> <!-- code voiture --> <xsd:key name="clePrimVoiture"> <xsd:selector xpath="voiture"/> <xsd:field xpath="codeV"/> </xsd:key> <!-- code personne --> <xsd:key name="clePrimPersonne"> <xsd:selector xpath="personne"/> <xsd:field xpath="codeP"/> </xsd:key> <!-- cle ref personne --> <xsd:keyref name="codeProprietaire" refer="clePrimVoiture"> <xsd:selector xpath="voiture"/> <xsd:field xpath="codeP"/> </xsd:keyref> </xsd:element> <xsd:complexType name="voiture"> <xsd:sequence> <xsd:element name="codeV" ref="clePrimVoiture"/> <xsd:element name="modele" type="xsd:string"/> <xsd:element name="marque" type="xsd:string"/> <xsd:element name="proprietaire" ref="codeProprietaire"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="personne"> <xsd:sequence> <xsd:element name="codeP" ref="clePrimPersonne"/> <xsd:element name="nom" type="xsd:string"/> <xsd:element name="adresse" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema>
Partager