'Re: "[xml] Schema validation failing for xs:all element"'


on 9/22/2004 10:33 AM Stuart Dootson wrote:
I have a schema which has an xs:all construct. XML files written
against this validate at libxml2 2.6.11, but not at 2.6.12/13. The
validation fails in 2.6.12/13 with the error:

Schemas validity error : Element 'x:a' [CT local]: The element
content is not valid.

A minimal schema/XML file pair illustrating the problem is below -
using 'xmllint --schema test.xsd test.xml' illustrates teh error
message. I think the problem is related to namespaces, because the XML
validates against the schema if the targetNamespace attribute is
removed (and the namespace declaration/prefixes removed from the
elements in the XML)

Yes, exactly, its related to namespaces; good that you put a finger on 
it. It is one of the TODOs, since it needs additional help from the 
regex engine. A leftover from the enabling of namespace awareness of the 
content model validation.

Is this a bug in libxml2 or am I doing something wrong? (My money's on
a bug, as the XML validates against the schema with XMLSpy, MSXML,
System.XML in .Net and Xalan :-)

Yes, the bug is definitely on libxml2's schema processor side :-(
Feel free to bugzilla it [1].

[... snip (test files) ...]

[1] http://bugzilla.gnome.org/buglist.cgi?product=libxml2

Regards & hope to fix it soon,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]