具有模式1.1的lxml [英] lxml with schema 1.1

查看:67
本文介绍了具有模式1.1的lxml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将lxml与xs:assert验证标签一起使用.我尝试使用此IBM页面上的示例: http://www.ibm.com/developerworks/library/x-xml11pt2/

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>

lxml似乎不支持XML Schema 1.1.

It seems like lxml doesn't support XML Schema 1.1.

有人可以验证吗?哪种XML(适用于Python)引擎支持Schema 1.1?

Can someone validate this? What XML (for Python) engine does support Schema 1.1?

推荐答案

当前支持XSD 1.1的两个模式处理器是Xerces和Saxon,它们都是基于Java的.

The two schema processors that currently support XSD 1.1 are Xerces and Saxon - both Java based.

这篇关于具有模式1.1的lxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆