开发者

lxml with schema 1.1

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:elemen开发者_StackOverflow社区t 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.


Yea, libxml does not support xsd 1.1. Use xmlschema >=1.0.14 instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜