Re: [xml] XMLSchema-Instance broken in 2.6.22 ?


On Wed, 2005-11-23 at 16:51 +0100, Julien Lamy wrote:
Hi folks,
As the title indicates, XMLSchema-Instance seems to be broken in version 
2.6.22 of libxml2.

Consider the following person.xsd file :

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd=""; >
         <xsd:element name="person" type="typePerson" />

         <xsd:complexType name="typePerson">
                 <xsd:element name="name" type="xsd:string" />


And a corresponding person.xml file :

<?xml version="1.0"?>
<person xmlns:xsi="";

When I create a schema validation context with the NULL value (so that 
it will look for the schema references in the document), the call to 
xmlSchemaValidateDoc fails with version 2.6.22 saying that:
person.xml:2: element person: Schemas validity error : Element 'person': 
No matching global declaration available for the validation root.

Using version 2.6.18, the same call works fine.

Pre-parsing the schema works fine in both versions.

Is this a bug, or am i doing something wrong ?

Yes, it's a bug. A return value of a function was not used; this
caused a lookup for the @noNamespaceSchemaLocation attribute to fail.
I used @schemaLocation for the few tests that I ran with XSI-driven
schema acquisition, so actually @noNamespaceSchemaLocation was never
tested :-(

Fixed now in CVS, xmlschemas.c revision 1.182.

Thanks for the report!



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