我正在尝试将 lxml 与 xs:assert 验证标记一起使用。我尝试使用此 IBM 页面中的示例: 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>
Run Code Online (Sandbox Code Playgroud)
看来 lxml 不支持 XML Schema 1.1。
有人可以验证这一点吗?什么 XML(对于 Python)引擎支持 Schema 1.1?