Schema validation does not work with un-defining a namespace

Bug #866849 reported by Gabriel Petrovay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Invalid
High
Gabriel Petrovay

Bug Description

I have added a test for this:
test/rbkt/zorba/schemas/any
For example, in the query:
validate {
  <any:elem>
    <any_elem xmlns:any=""/>
  </any:elem>
}
any_elem, is not in the any namespace anymore. Schema validation fails (which is wrong) if elem has the following type:

 <xs:element name="elem">
    <xs:complexType>
      <xs:sequence>
        <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

The above type allows any element to be a child of "elem" except the elements in the schema's target namespace.

Tags: schema
Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

The meaning of xs:any namespace="##other" (quote from Definitive XMLSchema by Priscilla Wemsley page 279):
"If it is ##other, the replacement elements can be in any namespace other than the target namespace of the schema document, BUT THEY HAVE MUST BE IN A NAMESPACE."

So the error that is returned is the correct answer for your case.

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote :

I see now that also in the spec they say:

"unqualified elements are not allowed"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.