aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/hybrid/binary/xdr/test.xsd
blob: 5a2ea34cbbb072301542bccc560516a2f73374e1 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:t="test"
        targetNamespace="test">

  <simpleType name="list">
    <list itemType="int"/>
  </simpleType>

  <simpleType name="union">
    <union memberTypes="int string"/>
  </simpleType>

  <simpleType name="enumeration">
    <restriction base="string">
      <enumeration value="top"/>
      <enumeration value="left"/>
      <enumeration value="bottom"/>
      <enumeration value="right"/>
    </restriction>
  </simpleType>

  <complexType name="base">
    <sequence>
      <element name="a" type="string"/>
    </sequence>
    <attribute name="x" type="int" use="required"/>
  </complexType>

  <complexType name="complex">
    <complexContent>
      <extension base="t:base">
        <sequence>
          <element name="b" type="string" minOccurs="0"/>
	  <element name="c" type="string" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
	<attribute name="y" type="int"/>

        <!-- test default/fixed values -->

        <attribute name="df1" type="int" default="123"/>
	<attribute name="df2" type="int" default="123"/>
	<attribute name="ff1" type="int" fixed="123"/>
	<attribute name="ff2" type="int" fixed="123" use="required"/>

        <attribute name="dv1" type="NMTOKENS" default="aaa bbb ccc"/>
	<attribute name="dv2" type="NMTOKENS" default="aaa bbb ccc"/>
	<attribute name="fv1" type="NMTOKENS" fixed="aaa bbb ccc"/>
	<attribute name="fv2" type="NMTOKENS" fixed="aaa bbb ccc" use="required"/>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="choice">
    <choice>
      <element name="a" type="int" minOccurs="0"/>
      <element name="b" type="string" maxOccurs="unbounded"/>
      <sequence>
        <element name="c" type="double"/>
        <element name="d" type="boolean"/>
      </sequence>
    </choice>
  </complexType>

  <complexType name="type">
    <sequence>
      <element name="list" type="t:list"/>
      <element name="union" type="t:union"/>
      <element name="enumeration" type="t:enumeration"/>
      <element name="complex" type="t:complex" maxOccurs="unbounded"/>
      <element name="choice" type="t:choice" maxOccurs="unbounded"/>

      <!-- integers -->
      <element name="byte"                  type="byte"/>
      <element name="unsigned_byte"         type="unsignedByte"/>
      <element name="short"                 type="short"/>
      <element name="unsigned_short"        type="unsignedShort"/>
      <element name="int"                   type="int"/>
      <element name="unsigned_int"          type="unsignedInt"/>
      <element name="long"                  type="long"/>
      <element name="unsigned_long"         type="unsignedLong"/>
      <element name="integer"               type="integer"/>
      <element name="non_positive_integer"  type="nonPositiveInteger"/>
      <element name="non_negative_integer"  type="nonNegativeInteger"/>
      <element name="positive_integer"      type="positiveInteger"/>
      <element name="negative_integer"      type="negativeInteger"/>


      <!-- boolean -->
      <element name="boolean"               type="boolean"/>


      <!-- floats -->
      <element name="float"                 type="float"/>
      <element name="double"                type="double"/>
      <element name="decimal"               type="decimal"/>


      <!-- strings -->
      <element name="string"                type="string"/>
      <element name="normalized_string"     type="normalizedString"/>
      <element name="token"                 type="token"/>
      <element name="name"                  type="Name"/>
      <element name="name_token"            type="NMTOKEN"/>
      <element name="name_tokens"           type="NMTOKENS"/>
      <element name="ncname"                type="NCName"/>
      <element name="language"              type="language"/>

      <!-- qualified name -->
      <element name="qname"                 type="QName"/>


      <!-- ID/IDREF -->
      <element name="id"     maxOccurs="2"  type="ID"/>
      <element name="id_ref"                type="IDREF"/>
      <element name="id_refs"               type="IDREFS"/>


      <!-- URI -->
      <element name="any_uri"               type="anyURI"/>


      <!-- binary -->
      <element name="base64_binary"         type="base64Binary"/>
      <element name="hex_binary"            type="hexBinary"/>


      <!-- date/time -->
      <element name="date"                  type="date"/>
      <element name="date_time"             type="dateTime"/>
      <element name="duration"              type="duration"/>
      <element name="day"                   type="gDay"/>
      <element name="month"                 type="gMonth"/>
      <element name="month_day"             type="gMonthDay"/>
      <element name="year"                  type="gYear"/>
      <element name="year_month"            type="gYearMonth"/>
      <element name="time"                  type="time"/>
    </sequence>
  </complexType>

  <element name="root" type="t:type"/>

</schema>