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 ? -- Julien Lamy
Attachment:
julien.lamy.vcf
Description: Vcard