Re: [xml] XMLSchema-Instance broken in 2.6.22 ?
- From: Kasimier Buchcik <K Buchcik 4commerce de>
- To: Julien Lamy <julien lamy ircad u-strasbg fr>
- Cc: ML-libxml2 <xml gnome org>
- Subject: Re: [xml] XMLSchema-Instance broken in 2.6.22 ?
- Date: Wed, 23 Nov 2005 17:44:42 +0100
Hi
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="http://www.w3.org/2001/XMLSchema" >
<xsd:element name="person" type="typePerson" />
<xsd:complexType name="typePerson">
<xsd:sequence>
<xsd:element name="name" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
And a corresponding person.xml file :
<?xml version="1.0"?>
<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="person.xsd">
<name>Unknown</name>
</person>
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!
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]