【发布时间】:2015-07-07 08:21:35
【问题描述】:
我正在尝试创建一个列表,其中一些元素已定义,有些则未定义,没有优先顺序。 我尝试过这种方式,带有任何元素:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="object" mixed="true">
<xs:choice>
<xs:element name="value" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:any namespace="##any" processContents="skip"/>
</xs:choice>
</xs:complexType>
<xs:element name="object" type="object"/>
</xs:schema>
它告诉我这个错误:
:0:0: 错误:复杂类型 'object' 违反了唯一粒子 属性规则在其组件“值”和“##any”中
谁能帮我解决这个问题?
【问题讨论】:
标签: xsd