lxml with schema 1.1

这一生的挚爱 提交于 2019-12-04 04:37:23

问题


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?


回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!