summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/parser/polyroot/supermen.xsd
blob: 090b66213789b2dc08ceefae087c201416ab941d (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
<?xml version="1.0"?>

<!--

file      : examples/cxx/parser/polyroot/supermen.xsd
author    : Boris Kolpackov <boris@codesynthesis.com>
copyright : not copyrighted - public domain

-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:complexType name="person">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="person" type="person"/>

  <xsd:complexType name="superman">
    <xsd:complexContent>
      <xsd:extension base="person">
        <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="batman">
    <xsd:complexContent>
      <xsd:extension base="superman">
        <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

</xsd:schema>