File: issue_086.xsd

package info (click to toggle)
python-xmlschema 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,208 kB
  • sloc: python: 39,174; xml: 1,282; makefile: 36
file content (39 lines) | stat: -rw-r--r-- 1,328 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xs:element name="foo" type="Foo" />

    <xs:complexType name="Foo">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="header" type="Header" />
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:sequence minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="a" type="Bar" />
                </xs:sequence>
                <xs:sequence minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="b" type="Bar" />
                </xs:sequence>
                <xs:sequence minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="c" type="Bar" />
                </xs:sequence>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="Header">
        <xs:restriction base="xs:nonNegativeInteger" />
    </xs:simpleType>

    <xs:complexType name="Bar">
        <xs:all minOccurs="1">
            <xs:element name="spam" minOccurs="0" type="Spam" />
        </xs:all>
    </xs:complexType>

    <xs:simpleType name="Spam">
        <xs:restriction base="xs:string" />
    </xs:simpleType>

</xs:schema>