P
pstachy
Hi all,
I've got this problem declaring attribute for the element. W3C
Validator doesn't find this ok. I really dont know how to declare the
attribute for the tag which has simle content(doesn't have other tags
in itself). In this case:
<price curr="PLN">12.30</price>
My Schema for that:
<xs:element name="price">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0" />
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:simpleContent>
<xs:attribute name="curr" use="required" type="xs:string"
fixed="PLN" />
</xs:complexType>
</xs:element>
Please, tell me what is wrong. Thx
I've got this problem declaring attribute for the element. W3C
Validator doesn't find this ok. I really dont know how to declare the
attribute for the tag which has simle content(doesn't have other tags
in itself). In this case:
<price curr="PLN">12.30</price>
My Schema for that:
<xs:element name="price">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0" />
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:simpleContent>
<xs:attribute name="curr" use="required" type="xs:string"
fixed="PLN" />
</xs:complexType>
</xs:element>
Please, tell me what is wrong. Thx