0

As per this question it appears that Python (which version?) is not yet able to implement XSD 1.1 directly.

Would it be possible to somehow call a specific action by another validation framework (e.g. Saxon; Xerces) from a Python script to e.g. validate an XML instance against an XSD 1.1 schema?

Community
  • 1
  • 1
Michael
  • 285
  • 5
  • 14

2 Answers2

0

Yes you should be able to wrap around Saxon/C the C++ version with Python. You can download it from here:

http://www.saxonica.com/saxon-c/index.xml

It is also worth looking at this third party project called pysaxon, which does exactly what you want: https://github.com/ajelenak/pysaxon

The pysaxon project is designed for the HE edition, but you should be able to make it work with the PE or EE versions.

ond1
  • 691
  • 6
  • 10
  • 1
    Just to add, in case you're not aware, schema validation requires the EE edition of Saxon which needs a paid license. – Michael Kay Feb 07 '17 at 11:31
0

I can suggest xmlschema Python xsd schema validator for 1.1. It is a pure Python solution without a Saxon library dependency.

Cem Polat
  • 101
  • 1
  • 7