You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
6.1 KiB

<?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>
<!-- Import -->
<xsd:element ref="import:imp.element"/>
<xsd:element name="imp.attribute">
<xsd:complexType>
<xsd:attribute ref="import:imp.attribute"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="imp.group">
<xsd:complexType>
<xsd:group ref="import:imp.group"/>
</xsd:complexType>
</xsd:element>
<!-- Basic -->
<xsd:element name="basic.A" type="foo:type.basic.A"/>
<xsd:element name="basic.B" type="foo:type.basic.B"/>
<xsd:element name="basic.C" type="foo:type.basic.C"/>
<xsd:element name="basic.D" type="foo:type.basic.D"/>
<xsd:element name="basic.E" type="foo:type.basic.E"/>
<!-- Attribute Wildcard Intersection -->
<xsd:element name="inters.1_1" type="foo:type.inters.1_1"/>
<xsd:element name="inters.1_2" type="foo:type.inters.1_2"/>
<xsd:element name="inters.1_3" type="foo:type.inters.1_3"/>
<xsd:element name="inters.1_4" type="foo:type.inters.1_4"/>
<xsd:element name="inters.2_1" type="foo:type.inters.2_1"/>
<xsd:element name="inters.3_1" type="foo:type.inters.3_1"/>
<xsd:element name="inters.4_1" type="foo:type.inters.4_1"/>
<!--xsd:element name="inters.5_1" type="type.inters.5_1"/-->
<xsd:element name="inters.6_1" type="foo:type.inters.6_1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- Basic -->
<xsd:complexType name="type.basic.A">
<xsd:anyAttribute namespace="##any" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="type.basic.B">
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="type.basic.C">
<xsd:anyAttribute namespace="##local" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="type.basic.D">
<xsd:anyAttribute namespace="##targetNamespace" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="type.basic.E">
<xsd:anyAttribute namespace="##targetNamespace ##local http://BAR" processContents="lax"/>
</xsd:complexType>
<!-- Attribute Wildcard Intersection -->
<!-- 1. If O1 and O2 are the same value, then that value must be the value. -->
<xsd:complexType name="type.inters.1_1">
<xsd:attributeGroup ref="foo:attrGr.inters.1_1"/>
<xsd:anyAttribute namespace="##any" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.1_1">
<xsd:anyAttribute namespace="##any"/>
</xsd:attributeGroup>
<xsd:complexType name="type.inters.1_2">
<xsd:attributeGroup ref="foo:attrGr.inters.1_2"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.1_2">
<xsd:anyAttribute namespace="##other"/>
</xsd:attributeGroup>
<xsd:complexType name="type.inters.1_3">
<xsd:attributeGroup ref="foo:attrGr.inters.1_3"/>
<xsd:anyAttribute namespace="##local ##targetNamespace" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.1_3">
<xsd:anyAttribute namespace="##local ##targetNamespace"/>
</xsd:attributeGroup>
<xsd:complexType name="type.inters.1_4">
<xsd:attributeGroup ref="foo:attrGr.inters.1_4"/>
<xsd:anyAttribute namespace="##local http://BAR ##targetNamespace " processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.1_4">
<xsd:anyAttribute namespace=" ##targetNamespace http://BAR ##local"/>
</xsd:attributeGroup>
<!-- 2. If either O1 or O2 is any, then the other must be the value. -->
<xsd:complexType name="type.inters.2_1">
<xsd:attributeGroup ref="foo:attrGr.inters.2_1"/>
<xsd:anyAttribute namespace="##any" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.2_1">
<xsd:anyAttribute namespace="##local ##targetNamespace"/>
</xsd:attributeGroup>
<!-- 3. If either O1 or O2 is a pair of not and a value (a namespace name or <20>absent<6E>)
and the other is a set of (namespace names or <20>absent<6E>), then that set, minus the
negated value if it was in the set, minus <20>absent<6E> if it was in the set, must be the value. -->
<xsd:complexType name="type.inters.3_1">
<xsd:attributeGroup ref="foo:attrGr.inters.3_1"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.3_1">
<xsd:anyAttribute namespace="##local ##targetNamespace http://BAR"/>
</xsd:attributeGroup>
<!-- 4. If both O1 and O2 are sets of (namespace names or <20>absent<6E>), then the
intersection of those sets must be the value. -->
<xsd:complexType name="type.inters.4_1">
<xsd:attributeGroup ref="foo:attrGr.inters.4_1"/>
<xsd:anyAttribute namespace="##local ##targetNamespace http://BAR" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGr.inters.4_1">
<xsd:anyAttribute namespace="##local ##targetNamespace"/>
</xsd:attributeGroup>
<!-- 5. If the two are negations of different namespace names,
then the intersection is not expressible. -->
<!--
<xsd:complexType name="type.inters.5_1">
<xsd:attributeGroup ref="import:attrGr.inters.5_1"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
-->
<!--6. If the one is a negation of a namespace name and the other is a negation of <20>absent<6E>,
then the one which is the negation of a namespace name must be the value.
This one uses an attribute group from an imported schema with no targetNamespace.
-->
<xsd:complexType name="type.inters.6_1">
<xsd:attributeGroup ref="attrGr.inters.6_1"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:attributeGroup name="attrGrA">
<xsd:anyAttribute namespace="##targetNamespace"/>
</xsd:attributeGroup>
</xsd:schema>