summaryrefslogtreecommitdiff
path: root/tests/schema/restriction/test.xsd
blob: 331ba785697de0f60b3d275483872013328ff34c (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
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
	    xmlns:test="http://www.codesynthesis.com/xmlns/test"
            targetNamespace="http://www.codesynthesis.com/xmlns/test">

  <!-- Simple content. -->

  <xsd:complexType name="SimpleBase">
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="lang" type="xsd:language"/>
        <xsd:attribute name="note" type="xsd:string"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>

  <xsd:complexType name="SimpleType">
    <xsd:simpleContent>
      <xsd:restriction base="test:SimpleBase">
        <xsd:maxLength value="255"/>
        <xsd:attribute name="lang">
          <xsd:simpleType>
            <xsd:restriction base="xsd:language">
	      <xsd:enumeration value="en"/>
              <xsd:enumeration value="es"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:simpleContent>
  </xsd:complexType>

  <!-- Complex content. -->

  <xsd:complexType name="ComplexBase">
    <xsd:sequence>
      <xsd:element name="lang" type="xsd:language"/>
      <xsd:element name="note" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:complexType name="ComplexType">
    <xsd:complexContent>
      <xsd:restriction base="test:ComplexBase">
        <xsd:sequence>
          <xsd:element name="lang" type="xsd:language"/>
          <xsd:element name="note" type="xsd:string"/>
        </xsd:sequence>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="AnyType">
    <xsd:complexContent>
      <xsd:restriction base="xsd:anyType">
        <xsd:sequence>
          <xsd:element name="lang" type="xsd:language"/>
          <xsd:element name="note" type="xsd:string"/>
        </xsd:sequence>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

</xsd:schema>