I'm trying to use lxml with the xs:assert validation tag. I've tried using the example from this IBM page: http://www.ibm.com/developerworks/library/x-xml11pt2/
<xs:element name="dimension">
<xs:complexType>
<xs:attribute name="height" type="xs:int"/>
<xs:attribute name="width" type="xs:int"/>
<xs:assert test="@height < @width"/>
</xs:complexType>
</xs:element>
It seems like lxml doesn't support XML Schema 1.1.
Can someone validate this? What XML (for Python) engine does support Schema 1.1?
The two schema processors that currently support XSD 1.1 are Xerces and Saxon - both Java based.
来源:https://stackoverflow.com/questions/7559263/lxml-with-schema-1-1