4

I have an XSD schema with target namespace "ns1" which defines the following type:

<xs:complexType name="type1">
  <xs:sequence>
    <any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  </xs:sequence>
</xs:complexType>

Now another XSD schema with target namespace "ns2" uses this type like this:

<xs:complexType name="type2">
  <xs:complexContent>
    <xs:extension base="ns1:type1"/>
  </xs:complexContent>
</xs:complexType>

##other is defined as "Any well-formed XML that is from a namespace other than the target namespace of the type being defined (unqualified elements are not allowed)" (see).

Will the <any> wildcard in "type2" (inherited from "type1") use "ns2" or "ns1" as excluded namespace?

flyx
  • 35,506
  • 7
  • 89
  • 126

1 Answers1

2

The ##other will always be in the context defined by schema ns1, i.e. ns1 is the excluded namespace.

Petru Gardea
  • 21,373
  • 2
  • 50
  • 62