problem with validation using XMLSchema
Hi all, I am not sure that this is the same as in previous posts, so I am sending it: I am trying to validate an xml against a complex xml schema (similar to gml that was reported not to work earlier) My xml file is: http://users.ntua.gr/tzotsos/temp/organization.xml The schema I am trying to validate against is: http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd My python code is: tmp="http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd" gmd = lxml.etree.parse(tmp) xsd = lxml.etree.XMLSchema(gmd) result = xsd.validate(e) The error I get is: Traceback (most recent call last): File "./test_iso.py", line 51, in <module> xsd = lxml.etree.XMLSchema(gmd) File "xmlschema.pxi", line 105, in lxml.etree.XMLSchema.__init__ (src/lxml/lxml.etree.c:128508) lxml.etree.XMLSchemaParseError: 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 136 Is this a known issue? I have tried both lxml 2.2 and 2.3 on GNU/Linux with python 2.6 and 2.7 libxml2 is within the suggested requirements Please advise, I am using lxml as part of the project http://pycsw.org/ and is very crucial to get validation working. Regards, Angelos -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos
Angelos Tzotsos, 01.04.2011 11:57:
I am trying to validate an xml against a complex xml schema (similar to gml that was reported not to work earlier) [...] The schema I am trying to validate against is: http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd [...] lxml.etree.XMLSchemaParseError: 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 136
Is this a known issue? I have tried both lxml 2.2 and 2.3 on GNU/Linux with python 2.6 and 2.7 libxml2 is within the suggested requirements
I don't know if it's a known issue, but in any case, it's libxml2 that's at charge here. So always try the newest version of that first, and if that fails, report the bug over there. Stefan
On 04/02/2011 05:56 PM, Stefan Behnel wrote:
Angelos Tzotsos, 01.04.2011 11:57:
I am trying to validate an xml against a complex xml schema (similar to gml that was reported not to work earlier) [...] The schema I am trying to validate against is: http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd [...] lxml.etree.XMLSchemaParseError: 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 136
Is this a known issue? I have tried both lxml 2.2 and 2.3 on GNU/Linux with python 2.6 and 2.7 libxml2 is within the suggested requirements
I don't know if it's a known issue, but in any case, it's libxml2 that's at charge here. So always try the newest version of that first, and if that fails, report the bug over there.
Stefan
Thank you Stefan, Angelos -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos
participants (2)
-
Angelos Tzotsos
-
Stefan Behnel