我想在XSD从xs:string
的Name
属性的类型更改为xs:int
,像下面XSD - 可以改变属性类型的扩展型
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.my.own/2013/XMLSchema">
<xs:complexType name="AType">
<xs:attribute name="Name" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="BType">
<xs:complexContent>
<xs:extension base="AType">
<xs:sequence>
<xs:choice>
<xs:element name="Content" type="xs:string"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="Name" type="xs:int" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
这是XSD有效吗?如果不是,是否存在其他解决方案来更改属性的类型?
是'Nane'在基础'ATTY'错字? – SparKot 2013-02-26 11:35:38
你的问题是什么可以改变或是否有效? – chiru 2013-02-26 13:38:32
1.错字固定。 2.其实我对这两个问题的答案都感兴趣 – CAMOBAP 2013-02-26 13:47:40