读书人

XMLSchema怎么用来表示类和枚举

发布时间: 2012-02-08 19:52:21 作者: rapoo

XMLSchema如何用来表示类和枚举?
请教各位,XMLSchema如何用来表示类和枚举?

[解决办法]
枚举可以用下面这个


<xsd:simpleType name= "standardColorOptionType "
final= "restriction "
id= "catalog.standardColorOption.sType ">
<xsd:annotation>
<xsd:documentation xml:lang= "en ">
Color selection is limited.
The colors apply to unit and
bulk items.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base= "xsd:token ">
<xsd:enumeration value= "cyan "/>
<xsd:enumeration value= "magenta "/>
<xsd:enumeration value= "yellow "/>
<xsd:enumeration value= "black "/>
</xsd:restriction>
</xsd:simpleType>

表示类的我还没遇见过。。

[解决办法]
“类”说的是类别,还是面向对象的“类”?
[解决办法]
没有XSD只有基本的数据类型.

如果你希望定义一个类,你可以自己设计复杂类型来实现.

读书人网 >XML SOAP

热点推荐