summaryrefslogtreecommitdiffstats
path: root/libxml2/test/schemas/anyAttr-derive1_0.xsd
blob: bc14d99cc66880396044fd90160f834a155b3bb3 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
	targetNamespace="http://FOO" elementFormDefault="qualified">
	<xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>	
	<xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
	<xsd:element name="foo">
		<xsd:complexType>
		    <xsd:sequence>				
				<!-- Attribute Wildcard Union -->
				<xsd:element name="derive.1_1" type="foo:type.1_1"/>
				<xsd:element name="derive.1_4" type="foo:type.1_4"/>

				<xsd:element name="derive.2_1" type="foo:type.2_1"/>

				<xsd:element name="derive.3_1" type="foo:type.3_1"/>

				<xsd:element name="derive.4_1" type="foo:type.4_1"/>

				<xsd:element name="derive.5_1_a" type="foo:type.5_1_a"/>
				<xsd:element name="derive.5_1_b" type="foo:type.5_1_b"/>
				<xsd:element name="derive.5_2_a" type="foo:type.5_2_a"/>
				<xsd:element name="derive.5_2_b" type="foo:type.5_2_b"/>
				<xsd:element name="derive.5_4_a" type="foo:type.5_4_a"/>
				<xsd:element name="derive.5_4_b" type="foo:type.5_4_b"/>
				<xsd:element name="derive.6_1"   type="foo:type.6_1"/>
				<xsd:element name="derive.6_2"   type="foo:type.6_2"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	
	<!-- Attribute Wildcard Union -->

	<!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
	<xsd:complexType name="type.1_1">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.1_1">
				<xsd:anyAttribute namespace="##any" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.1_1">	
		<xsd:attributeGroup ref="foo:attrGr.1_1"/>			
		<xsd:anyAttribute namespace="##any" processContents="lax"/>	
	</xsd:complexType>
	<xsd:attributeGroup name="attrGr.1_1">
		<xsd:anyAttribute namespace="##any" processContents="lax"/>
	</xsd:attributeGroup>

	<xsd:complexType name="type.1_4">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.1_4">
				<xsd:anyAttribute namespace="http://BAR ##local http://FOO" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
    <xsd:complexType name="type.base.1_4">	
		<xsd:attributeGroup ref="foo:attrGr.1_4"/>			
		<xsd:anyAttribute namespace="##local http://BAR   ##targetNamespace " processContents="lax"/>	
	</xsd:complexType>
	<xsd:attributeGroup name="attrGr.1_4">
		<xsd:anyAttribute namespace="  http://FOO  http://BAR ##local"/>
	</xsd:attributeGroup>

	<!-- 2. If either O1 or O2 is any, then any must be the value. -->
	<xsd:complexType name="type.2_1">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.2_1">
				<xsd:anyAttribute namespace="##any" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.2_1">	
		<xsd:attributeGroup ref="foo:attrGr.2_1"/>			
		<xsd:anyAttribute namespace="##any" processContents="lax"/>	
	</xsd:complexType>
	<xsd:attributeGroup name="attrGr.2_1">
		<xsd:anyAttribute namespace="##local ##targetNamespace"/>
	</xsd:attributeGroup>

	<!-- 3. If both O1 and O2 are sets of (namespace names or ·absent·), 
		then the union of those sets must be the value. -->
	<xsd:complexType name="type.3_1">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.3_1">
				<xsd:anyAttribute namespace="##targetNamespace http://DOO" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.3_1">	
		<xsd:attributeGroup ref="foo:attrGr.3_1"/>			
		<xsd:anyAttribute namespace="##local" processContents="lax"/>	
	</xsd:complexType>
	<xsd:attributeGroup name="attrGr.3_1">
		<xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
	</xsd:attributeGroup>
	<!-- 4 If the two are negations of different values (namespace 
	 names or ·absent·), then a pair of not and ·absent· must be the value. -->
	<xsd:complexType name="type.4_1">	
		<xsd:complexContent>
			<xsd:extension base="imp.type.base.derive.4_1">
				<xsd:anyAttribute namespace="##other" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- 5 If either O1 or O2 is a pair of not and a namespace name and 
	  the other is a set of (namespace names or ·absent·) (call this set S), 
	  then The appropriate case among the following must be true: -->
	<!-- 5.1 If the set S includes both the negated namespace name and 
	  ·absent·, then any must be the value. -->
	<xsd:complexType name="type.5_1_a">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_1_a">
				<xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_1_a">	
		<xsd:anyAttribute namespace="##other" processContents="lax"/>	
	</xsd:complexType>

	<xsd:complexType name="type.5_1_b">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_1_b">
				<xsd:anyAttribute namespace="##other" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_1_b">	
		<xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>	
	</xsd:complexType>

	<!-- 5.2 If the set S includes the negated namespace name but not ·absent·, 
	  then a pair of not and ·absent· must be the value. -->
	<xsd:complexType name="type.5_2_a">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_2_a">
				<xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_2_a">	
		<xsd:anyAttribute namespace="##other" processContents="lax"/>	
	</xsd:complexType>

	<xsd:complexType name="type.5_2_b">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_2_b">
				<xsd:anyAttribute namespace="##other" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_2_b">	
		<xsd:anyAttribute namespace="##targetNamespace http://BAR" processContents="lax"/>	
	</xsd:complexType>
	<!-- 5.3 If the set S includes ·absent· but not the negated namespace name, 
	  then the union is not expressible. -->
	<!--
	<xsd:complexType name="type.5_3_a">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_3_a">
				<xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_3_a">	
		<xsd:anyAttribute namespace="##other" processContents="lax"/>	
	</xsd:complexType>

	<xsd:complexType name="type.5_3_b">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_3_b">
				<xsd:anyAttribute namespace="##other" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_3_b">	
		<xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>	
	</xsd:complexType>
	-->
	<!-- 5.4 If the set S does not include either the negated namespace name 
		or ·absent·, then whichever of O1 or O2 is a pair of not and a namespace 
		name must be the value. -->
	<xsd:complexType name="type.5_4_a">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_4_a">
				<xsd:anyAttribute namespace="http://BAR" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_4_a">	
		<xsd:anyAttribute namespace="##other" processContents="lax"/>	
	</xsd:complexType>

	<xsd:complexType name="type.5_4_b">	
		<xsd:complexContent>
			<xsd:extension base="foo:type.base.5_4_b">
				<xsd:anyAttribute namespace="##other" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="type.base.5_4_b">	
		<xsd:anyAttribute namespace="http://BAR" processContents="lax"/>	
	</xsd:complexType>
	<!-- 6 If either O1 or O2 is a pair of not and ·absent· and the other is a 
	  set of (namespace names or ·absent·) (again, call this set S), then The 
	  appropriate case among the following must be true: -->
	<!-- 6.1 If the set S includes ·absent·, then any must be the value. -->
	<xsd:complexType name="type.6_1">	
		<xsd:complexContent>
			<xsd:extension base="imp.type.base.derive.6">
				<xsd:anyAttribute namespace="##local http://BAR" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- 6.2 If the set S does not include ·absent·, then a pair of not and ·absent· 
	  must be the value. -->
	<xsd:complexType name="type.6_2">	
		<xsd:complexContent>
			<xsd:extension base="imp.type.base.derive.6">
				<xsd:anyAttribute namespace="http://BAR http://DOO" processContents="lax"/>	
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

</xsd:schema>