type_substitution_simpletype.xsd 1.98 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
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
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:this="www.example.org/type/substitution/simpletype"
 targetNamespace="www.example.org/type/substitution/simpletype">


<xsd:element name="head" type="string" />

<xsd:element name="head_" type="string" />

<xsd:element name="head2" type="this:stringtype" />

<xsd:simpleType name="stringtype">
	<xsd:restriction base="string"/>
</xsd:simpleType>

<xsd:simpleType name="stringtype2">
	<xsd:restriction base="this:stringtype">
		<xsd:length value="5"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:element name="int" type="xsd:integer"/>

<xsd:simpleType name="extInt">
	<xsd:restriction base="xsd:integer"/>
</xsd:simpleType>



<!-- Test if the elements are changed in a complextype -->
<xsd:element name="elem" type="base64Binary"/>

<xsd:simpleType name="CrypBinary">
	<xsd:restriction base="base64Binary">
	</xsd:restriction>
</xsd:simpleType>

<xsd:element name="SignatureValue" type="this:Signature"/> 

<xsd:complexType name="Signature">
	<xsd:simpleContent>
		<xsd:extension base="base64Binary">
			<xsd:attribute name="Id" type="ID"/>
		</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>


<xsd:element name="Data" type="this:DataType"/> 

<xsd:complexType name="DataType">
	<xsd:sequence>
		<xsd:choice>
			<xsd:element name="SKI" type="base64Binary"/>
			<xsd:element name="Cert" type="base64Binary"/>
		</xsd:choice>
	</xsd:sequence>
</xsd:complexType>

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!-- Bug 569238 - xsd2ttcn creates cyclical definitions -->
<xsd:simpleType name="Head569238">
  <xsd:restriction base="xsd:token">
    <xsd:pattern value="[0-9]{6,15}"/>
  </xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Type569238">
  <xsd:restriction base="this:Head569238"/>
</xsd:simpleType>
<xsd:complexType name="Complex569238">
  <xsd:choice>
<xsd:element name="head" type="this:Head569238"/>
<xsd:element name="type" type="this:Type569238"/>
  </xsd:choice>
</xsd:complexType>

Elemer Lelik's avatar
Elemer Lelik committed
78
79

</xsd:schema>