This could be a xerces bug (2.6.2) or an XML Schema misunderstanding on my part.
 
I have a schema fragment (in a schema with targetNamespace present and elementFormDefault="qualified") inside a complexType:
 
            <element name="namedInstance" minOccurs="0" maxOccurs="unbounded">
              <complexType>
                <choice>
                  <element name="simpleInstance" type="anySimpleType"/>
                  <any namespace="##other" processContents="skip"/>
                </choice>
                <attribute name="instanceParameterName" type="NCName" use="required"/>
              </complexType>
            </element>
and a corresponding fragment of the instance document like this:
 
        <ups:namedInstance instanceParameterName="foo">
             <instance xmlns="" xsi:type="...">
                       ...
              </instance>
        <ups:instance>
 
and I get this error:
 
26:139 - cvc-complex-type.2.4.a: Invalid content was found starting with element 'instance'. One of '{"http://webalo.com/xmlns/ups":simpleInstance, WC[##other:"http://webalo.com/xmlns/ups"]}' is expected.
 
I assume the WC[...] part of the message means what I wanted: a WildCard element in any namespace but  http://webalo.com/xmlns/ups
 
Does <any namespace="##other"/> prohibit the use of elements in no namespace?
 
Jeff

Reply via email to