我有这样的XML架构:任何添加到复杂类型
<xs:element name="lineinfo">
<xs:complexType>
<xs:all>
<xs:element name="done" type="xs:unsignedInt" />
</xs:all>
<xs:attribute name="id" type="xs:long" />
<xs:anyAttribute processContents="skip" />
</xs:complexType>
</xs:element>
,但我想允许任何其他额外的元素在lineinfo
标签:
<lineinfo state="assigned" id="175">
<done>4</done>
<todo>6</todo>
</lineinfo>
我尝试添加<xs:any />
的<xs:all>
内,但它似乎不被允许。
我得到的,但'sequence'将描述元素的顺序。我想要订单是免费的。 – 2014-10-08 10:07:45
是的,你是对的。您是否尝试过为您的解决方案使用xs:anyType,以便移除xs:sequence。 – Xstian 2014-10-08 10:10:13
我仍然需要标签的名称。我只是希望模式验证'done'是在'lineinfo'里面,并忽略其中的任何其他标签。 – 2014-10-08 10:12:39