Debian Codegraph @

tests/test_cases/examples/collection/collection3.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:element name="object" type="objType" maxOccurs="unbounded"/>
10 </xs:sequence>
11 </xs:complexType>
12 <xs:keyref name="author_dn_ref" refer="author_dn">
13 <xs:selector xpath="object"/>
14 <xs:field xpath="author"/>
15 </xs:keyref>
16 <xs:key name="author_dn">
17 <xs:selector xpath="author"/>
18 <xs:field xpath="@dn"/>
19 </xs:key>
20 </xs:element>
21 <xs:element name="person" type="personType"/>
22 <xs:complexType name="personType">
23 <xs:sequence>
24 <xs:element name="name" type="xs:string"/>
25 <xs:element name="born" type="xs:date"/>
26 <xs:element name="dead" type="xs:date" minOccurs="0"/>
27 <xs:element name="qualification" type="xs:string" minOccurs="0"/>
28 </xs:sequence>
29 <xs:attribute name="dn" type="xs:string" use="required"/>
30 </xs:complexType>
31 <xs:complexType name="objType">
32 <xs:sequence>
33 <xs:element name="position" type="xs:int"/>
34 <xs:element name="title" type="xs:string"/>
35 <xs:element name="year" type="xs:gYear"/>
36 <xs:element name="author" type="xs:string"/>
37 <xs:element name="estimation" type="xs:decimal" minOccurs="0"/>
38 <xs:element name="characters" minOccurs="0">
39 <xs:complexType>
40 <xs:sequence>
41 <xs:element ref="person" maxOccurs="unbounded"/>
42 </xs:sequence>
43 </xs:complexType>
44 </xs:element>
45 </xs:sequence>
46 <xs:attribute name="id" type="xs:ID" use="required"/>
47 <xs:attribute name="available" type="xs:boolean" use="required"/>
48 </xs:complexType>
49 </xs:schema>