1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsd:schema xmlns:foo="http://FOO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="http://IMPORT"
3	targetNamespace="http://FOO" elementFormDefault="qualified">
4	<xsd:import namespace="http://IMPORT" schemaLocation="anyAttr.importA.1_0.xsd"/>
5	<xsd:import schemaLocation="anyAttr.importB.1_0.xsd"/>
6	<xsd:element name="foo">
7		<xsd:complexType>
8		    <xsd:sequence>
9				<!-- Import -->
10				<xsd:element ref="import:imp.element"/>
11				<xsd:element name="imp.attribute">
12					<xsd:complexType>
13						<xsd:attribute ref="import:imp.attribute"/>
14					</xsd:complexType>
15				</xsd:element>
16				<xsd:element name="imp.group">
17					<xsd:complexType>
18						<xsd:group ref="import:imp.group"/>
19					</xsd:complexType>
20				</xsd:element>
21				<!-- Basic -->
22				<xsd:element name="basic.A" type="foo:type.basic.A"/>
23				<xsd:element name="basic.B" type="foo:type.basic.B"/>
24				<xsd:element name="basic.C" type="foo:type.basic.C"/>
25				<xsd:element name="basic.D" type="foo:type.basic.D"/>
26				<xsd:element name="basic.E" type="foo:type.basic.E"/>
27				<!-- Attribute Wildcard Intersection -->
28				<xsd:element name="inters.1_1" type="foo:type.inters.1_1"/>
29				<xsd:element name="inters.1_2" type="foo:type.inters.1_2"/>
30				<xsd:element name="inters.1_3" type="foo:type.inters.1_3"/>
31				<xsd:element name="inters.1_4" type="foo:type.inters.1_4"/>
32
33				<xsd:element name="inters.2_1" type="foo:type.inters.2_1"/>
34
35				<xsd:element name="inters.3_1" type="foo:type.inters.3_1"/>
36
37				<xsd:element name="inters.4_1" type="foo:type.inters.4_1"/>
38
39				<!--xsd:element name="inters.5_1" type="type.inters.5_1"/-->
40				<xsd:element name="inters.6_1" type="foo:type.inters.6_1"/>
41			</xsd:sequence>
42		</xsd:complexType>
43	</xsd:element>
44
45	<!-- Basic -->
46	<xsd:complexType name="type.basic.A">
47		<xsd:anyAttribute namespace="##any" processContents="lax"/>
48	</xsd:complexType>
49	<xsd:complexType name="type.basic.B">
50		<xsd:anyAttribute namespace="##other" processContents="lax"/>
51	</xsd:complexType>
52	<xsd:complexType name="type.basic.C">
53		<xsd:anyAttribute namespace="##local" processContents="lax"/>
54	</xsd:complexType>
55	<xsd:complexType name="type.basic.D">
56		<xsd:anyAttribute namespace="##targetNamespace" processContents="lax"/>
57	</xsd:complexType>
58	<xsd:complexType name="type.basic.E">
59		<xsd:anyAttribute namespace="##targetNamespace ##local http://BAR" processContents="lax"/>
60	</xsd:complexType>
61	<!-- Attribute Wildcard Intersection -->
62
63	<!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
64	<xsd:complexType name="type.inters.1_1">
65		<xsd:attributeGroup ref="foo:attrGr.inters.1_1"/>
66		<xsd:anyAttribute namespace="##any" processContents="lax"/>
67	</xsd:complexType>
68	<xsd:attributeGroup name="attrGr.inters.1_1">
69		<xsd:anyAttribute namespace="##any"/>
70	</xsd:attributeGroup>
71	<xsd:complexType name="type.inters.1_2">
72		<xsd:attributeGroup ref="foo:attrGr.inters.1_2"/>
73		<xsd:anyAttribute namespace="##other" processContents="lax"/>
74	</xsd:complexType>
75	<xsd:attributeGroup name="attrGr.inters.1_2">
76		<xsd:anyAttribute namespace="##other"/>
77	</xsd:attributeGroup>
78	<xsd:complexType name="type.inters.1_3">
79		<xsd:attributeGroup ref="foo:attrGr.inters.1_3"/>
80		<xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
81	</xsd:complexType>
82	<xsd:attributeGroup name="attrGr.inters.1_3">
83		<xsd:anyAttribute namespace="##local  ##targetNamespace"/>
84	</xsd:attributeGroup>
85	<xsd:complexType name="type.inters.1_4">
86		<xsd:attributeGroup ref="foo:attrGr.inters.1_4"/>
87		<xsd:anyAttribute namespace="##local http://BAR   ##targetNamespace " processContents="lax"/>
88	</xsd:complexType>
89	<xsd:attributeGroup name="attrGr.inters.1_4">
90		<xsd:anyAttribute namespace="  ##targetNamespace  http://BAR ##local"/>
91	</xsd:attributeGroup>
92
93	<!-- 2. If either O1 or O2 is any, then the other must be the value. -->
94	<xsd:complexType name="type.inters.2_1">
95		<xsd:attributeGroup ref="foo:attrGr.inters.2_1"/>
96		<xsd:anyAttribute namespace="##any" processContents="lax"/>
97	</xsd:complexType>
98	<xsd:attributeGroup name="attrGr.inters.2_1">
99		<xsd:anyAttribute namespace="##local ##targetNamespace"/>
100	</xsd:attributeGroup>
101	<!-- 3. If either O1 or O2 is a pair of not and a value (a namespace name or �absent�)
102	  and the other is a set of (namespace names or �absent�), then that set, minus the
103	  negated value if it was in the set, minus �absent� if it was in the set, must be the value. -->
104	<xsd:complexType name="type.inters.3_1">
105		<xsd:attributeGroup ref="foo:attrGr.inters.3_1"/>
106		<xsd:anyAttribute namespace="##other" processContents="lax"/>
107	</xsd:complexType>
108	<xsd:attributeGroup name="attrGr.inters.3_1">
109		<xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
110	</xsd:attributeGroup>
111	<!-- 4. If both O1 and O2 are sets of (namespace names or �absent�), then the
112	  intersection of those sets must be the value. -->
113	<xsd:complexType name="type.inters.4_1">
114		<xsd:attributeGroup ref="foo:attrGr.inters.4_1"/>
115		<xsd:anyAttribute namespace="##local ##targetNamespace http://BAR" processContents="lax"/>
116	</xsd:complexType>
117	<xsd:attributeGroup name="attrGr.inters.4_1">
118		<xsd:anyAttribute namespace="##local ##targetNamespace"/>
119	</xsd:attributeGroup>
120	<!-- 5. If the two are negations of different namespace names,
121	  then the intersection is not expressible. -->
122	  <!--
123	<xsd:complexType name="type.inters.5_1">
124		<xsd:attributeGroup ref="import:attrGr.inters.5_1"/>
125		<xsd:anyAttribute namespace="##other" processContents="lax"/>
126	</xsd:complexType>
127	-->
128	<!--6. If the one is a negation of a namespace name and the other is a negation of �absent�,
129	  then the one which is the negation of a namespace name must be the value.
130
131	  This one uses an attribute group from an imported schema with no targetNamespace.
132	-->
133	<xsd:complexType name="type.inters.6_1">
134		<xsd:attributeGroup ref="attrGr.inters.6_1"/>
135		<xsd:anyAttribute namespace="##other" processContents="lax"/>
136	</xsd:complexType>
137
138	<xsd:attributeGroup name="attrGrA">
139		<xsd:anyAttribute namespace="##targetNamespace"/>
140	</xsd:attributeGroup>
141
142</xsd:schema>
143
144
145