0
在我的xml我有一个价格标签,我想做出限制在十进制数字量和一种货币,我有这样的:复杂类型的模式
`<unit_price currency="$"> 4.00 </unit_price>`
在XSD I'm出现此错误:
E [Xerces] cos-applicable-facets:facet'fractionDigits'不允许通过类型#AnonType_Price。
这是我的代码,pl如何修复它? Thnks。
<xsd:complexType name="basePrice">
<xsd:simpleContent>
<xsd:extension base="xsd:double">
<xsd:attribute name="currency" fixed="$"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Price">
<xsd:simpleContent>
<xsd:restriction base="basePrice">
*<xsd:fractionDigits value="2"/>*
</xsd:restriction >
</xsd:simpleContent>
</xsd:complexType>