summaryrefslogtreecommitdiff
path: root/libxsd-frontend/tests/schema/element-group/test-000.xsd
blob: 1864b28bbb0e4121889d26dcc9e6130cfe82a585 (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
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">

  <!-- Multiple levels of forward reference. -->

  <complexType name="type">
    <sequence>
      <group ref="t:g1" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>

  <group name="g1">
    <choice>
      <group ref="t:g2" minOccurs="0"/>
      <group ref="t:g3" maxOccurs="unbounded"/>
    </choice>
  </group>

  <group name="g2">
    <choice>
      <element ref="t:foo2"/>
      <element ref="t:bar2" minOccurs="0"/>
    </choice>
  </group>

  <group name="g3">
    <choice>
      <element ref="t:foo3" maxOccurs="unbounded"/>
      <element ref="t:bar3" minOccurs="0" maxOccurs="unbounded"/>
    </choice>
  </group>

  <element name="foo2" type="string"/>
  <element name="bar2" type="string"/>

  <element name="foo3" type="string"/>
  <element name="bar3" type="string"/>

</schema>