这样的类型 xsd文件该怎么写

最后我发现这样三种方法都可以的

1<xs:element name="姓名">
2<xs:complextype>
3<xs:complexcontent>
4<xs:restriction base="xs:string">
5<xs:attribute name="文种" type="xs:string" use="required"></xs:attribute>
6</xs:restriction>
7</xs:complexcontent>
8</xs:complextype>
9</xs:element>

///////////////////////////////////////////////

1<xs:element name="姓名">
2<xs:complextype>
3<xs:simplecontent>
4<xs:restriction base="">
5<xs:attribute name="文种" type="xs:string" use="required"></xs:attribute>
6</xs:restriction>
7</xs:simplecontent>
8</xs:complextype>
9</xs:element>

///////////////////////////////////////////////

1<xs:element name="姓名">
2<xs:complextype mixed="true">
3<xs:attribute name="文种" use="required"></xs:attribute>
4</xs:complextype>
5</xs:element>

///////////////////////////////////////

Published At
Categories with Web编程
Tagged with
comments powered by Disqus