[lxml-dev] Document is not valid XML Schema
Jeff Cheng
JCheng at opsware.com
Tue Apr 3 22:41:33 CEST 2007
I am trying to validate XML files against their respective schemas.
However, lxml complains that the schemas are not valid.
Python 2.5 (r25:51908, Mar 13 2007, 08:13:14)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
>>> f = file("linux-definitions-schema.xsd")
>>> xmlschema_doc = etree.parse(f)
>>> xmlschema = etree.XMLSchema(xmlschema_doc)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xmlschema.pxi", line 61, in etree.XMLSchema.__init__
etree.XMLSchemaParseError: Document is not valid XML Schema
The schemas are from Mitre
(http://oval.mitre.org/language/download/schema/version5.2/index.html#do
wnloads) and are assumed to be valid.
I am using python-2.5, lxml-1.2.1, and libxml2-2.6.26 on cygwin. Any
help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20070403/888d35d2/attachment.htm
More information about the lxml-dev
mailing list