Debian Codegraph @

tests/test_cases/examples/collection/collection3bis.xsd

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema targetNamespace="http://example.com/ns/collection"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 xmlns="http://example.com/ns/collection">
5 <xs:element name="collection">
6 <xs:complexType>
7 <xs:sequence>
8 <xs:element name="author" type="personType" maxOccurs="unbounded">
9 <xs:key name="author_dn">
10 <xs:selector xpath="."/>
11 <xs:field xpath="@dn"/>
12 </xs:key>
13 </xs:element>
14 <xs:element name="object" type="objType" maxOccurs="unbounded"/>
15 </xs:sequence>
16 </xs:complexType>
17 <xs:keyref name="author_dn_ref" refer="author_dn">
18 <xs:selector xpath="object"/>
19 <xs:field xpath="author"/>
20 </xs:keyref>
21 </xs:element>
22 <xs:element name="person" type="personType"/>
23 <xs:complexType name="personType">
24 <xs:sequence>
25 <xs:element name="name" type="xs:string"/>
26 <xs:element name="born" type="xs:date"/>
27 <xs:element name="dead" type="xs:date" minOccurs="0"/>
28 <xs:element name="qualification" type="xs:string" minOccurs="0"/>
29 </xs:sequence>
30 <xs:attribute name="dn" type="xs:string" use="required"/>
31 </xs:complexType>
32 <xs:complexType name="objType">
33 <xs:sequence>
34 <xs:element name="position" type="xs:int"/>
35 <xs:element name="title" type="xs:string"/>
36 <xs:element name="year" type="xs:gYear"/>
37 <xs:element name="author" type="xs:string"/>
38 <xs:element name="estimation" type="xs:decimal" minOccurs="0"/>
39 <xs:element name="characters" minOccurs="0">
40 <xs:complexType>
41 <xs:sequence>
42 <xs:element ref="person" maxOccurs="unbounded"/>
43 </xs:sequence>
44 </xs:complexType>
45 </xs:element>
46 </xs:sequence>
47 <xs:attribute name="id" type="xs:ID" use="required"/>
48 <xs:attribute name="available" type="xs:boolean" use="required"/>
49 </xs:complexType>
50 </xs:schema>