This xml should validate against this xsd1.0, but it does not
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I attached an xml and an xsd, as well as a script that validates the former against the latter.
This validation fails.
Validation succeeds with Altova XMLSpy.
System details:
C:\Users\
Requirement already satisfied: lxml in c:\users\
C:\[...
Name: lxml
Version: 4.2.4
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
Home-page: http://
Author: lxml dev team
Author-email: <email address hidden>
License: BSD
Location: c:\users\
Requires:
Required-by:
C:\[...
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ## -- PLEASE PROVIDE THE FOLLOWING INFORMATION: --
... import sys
>>> from lxml import etree
>>>
>>> print("%-20s: %s" % ('Python', sys.version_info))
Python : sys.version_
>>> print("%-20s: %s" % ('lxml.etree', etree.LXML_
lxml.etree : (4, 2, 4, 0)
>>> print("%-20s: %s" % ('libxml used', etree.LIBXML_
libxml used : (2, 9, 5)
>>> print("%-20s: %s" % ('libxml compiled', etree.LIBXML_
libxml compiled : (2, 9, 5)
>>> print("%-20s: %s" % ('libxslt used', etree.LIBXSLT_
libxslt used : (1, 1, 30)
>>> print("%-20s: %s" % ('libxslt compiled', etree.LIBXSLT_
libxslt compiled : (1, 1, 30)
>>> ## -----
...
>>> exit()
C:\[...
ERROR: XSD validation failed
... Element 'productref': No match found for key-sequence ['p1'] of keyref 'refProduct'., line 8
XML schema validation is not implemented in lxml but in libxml2.