Subject: | Schema validation issue with latest XML::LibXML 1.66 version |
Date: | Sat, 4 Oct 2008 15:45:30 +0530 |
To: | bug-XML-LibXML [...] rt.cpan.org |
From: | Chandu <chandu.komali [...] gmail.com> |
Hi,
I have been using XML::LibXML-1.58 version(libxml2-2.6.8). I have no
problems with it. Recently I have upgrade the libraries to XML-LibXML (1.66)
and libxml2-2.7.1 to get benefits from InputCallback framework. After
upgrading to the newer versions, schema validation is failing. Even a basic
version of xsd file is not working. Please look at the below error messages:
Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name':
'xml:base' is not a valid value of the atomic type 'xs:NCName'.
Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name':
'xml:base' is not a valid value of the atomic type 'xs:NCName'
Element '{http://www.w3.org/2001/XMLSchema}element': The attribute
'minOccurs' is not allowed.
Element '{http://www.w3.org/2001/XMLSchema}element': The attribute
'maxOccurs' is not allowed.
Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name':
'xml:base' is not a valid value of the atomic type 'xs:NCName'.
Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'use'
is not allowed.
I have the below code(snipped version) in the xsd file:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
The code I use for creating the Schema object is:
my $schema =
XML::LibXML::Schema->new(location => $schema_file);
I have verified the same functionality working well with XML-LibXML(1.66) +
libxml2-2.6.16. In the README of 1.66 distribution, it is said that,
libxml2-2.6.16 or higher can be used. I have also installed the
prerequisites such as SAX, Namespace Support modules. I think it is a bug in
the 2.7.1 compatibility. Could you please update the documentation if
libxml2-2.7.1 is not compatiable?
Thanks,
Chandu.