aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/serializer/choice/test.xsd
blob: 2d7e33d4363d836df05b5aec812007b766db58e5 (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
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">

  <complexType name="test-1">
    <choice>
      <element name="a" type="int"/>
      <element name="b" type="int" minOccurs="0"/>
      <element name="c" type="int" maxOccurs="unbounded"/>
    </choice>
  </complexType>

  <complexType name="test-2">
    <choice minOccurs="0">
      <element name="a" type="int"/>
      <element name="b" type="int"/>
    </choice>
  </complexType>

  <complexType name="test-3">
    <choice maxOccurs="unbounded">
      <element name="a" type="int"/>
      <element name="b" type="int"/>
    </choice>
  </complexType>

  <complexType name="test-4">
    <choice>
      <element name="a" type="int"/>
      <choice>
        <element name="b" type="int"/>
        <element name="c" type="int"/>
      </choice>
      <sequence>
        <element name="d" type="int"/>
        <element name="e" type="int"/>
      </sequence>
    </choice>
  </complexType>

  <complexType name="root">
    <sequence>
      <element name="test-1" type="t:test-1" maxOccurs="unbounded"/>
      <element name="test-2" type="t:test-2" maxOccurs="unbounded"/>
      <element name="test-3" type="t:test-3" maxOccurs="unbounded"/>
      <element name="test-4" type="t:test-4" maxOccurs="unbounded"/>
    </sequence>
  </complexType>

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

</schema>