Schema validation does not work with un-defining a namespace
Bug #866849 reported by
Gabriel Petrovay
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/
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:
<xs:sequence>
<xs:any namespace="##other" processContents
<
</xs:
</xs:element>
The above type allows any element to be a child of "elem" except the elements in the schema's target namespace.
To post a comment you must log in.
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.