Re: [lxml] Error with validating xml file against schema

Wu, Hua, 25.03.2011 13:22:
I am trying using lxml to validate xml files against opengis gml 3.1.1 schema but I got an error.I googled for solutions, I only found similar errors out there but no solutions.Could anyone help me with this error? I use lxml 2.3 and python 2.7.
code snippet:
from lxml import etree
schema = etree.parse("http://www.isotc211.org/2005/gml/gml.xsd") xmlschema = etree.XMLSchema(schema)
I got: Error : local list type: A type, derived by list or union, must have the simple ur-type definition as base type, not '{http://www.opengis.net/gml}doubleList'., line 1
Others run xmllint got similar error http://gis.stackexchange.com/questions/6721/why-doesnt-the-gml-3-1-1-s chema-validate-with-xmllint
Someone thought this could be a bug, does this make sense? http://www.mail-archive.com/xml@gnome.org/msg07477.html
Yes, likely a bug in libxml2. XML Schema support is known to have its rough edges. Could you check if there's a ticket for this on the libxml2 bug tracker? https://bugzilla.gnome.org/buglist.cgi?product=libxml2 Stefan
participants (1)
-
Stefan Behnel