0
我想声明下一个类型的限制:声明与属性和文本的类型时,由图案
<partCode negation="true|false">\*|[0-9]{1,9}</name>
与布尔属性,只有文本的内容,由一个图案(*
或数字)的限制。
我旁边XSD至今:
<xs:complexType name="partCode">
<xs:simpleContent>
<xs:restriction base="xs:string">
<xs:pattern value="\*|[0-9]{1,9}" />
</xs:restriction>
<xs:extension base="xs:string"> <-- error
<xs:attribute name="negation" type="xs:boolean" use="optional" default="false" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
但它包含一个错误:
The 'extension' element already exists in the content model
我怎样才能做到这一点?
请您举个例子,很高兴接受它。 – abatishchev