![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Attribute declaration, invalid schema [Thread Next] RE: Attribute declaration, invalid schemaTo: NULL Date: 11/6/2006 4:35:00 PM
Try this:
<xs:element name="price">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="xs:anyType">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0" />
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="curr" use="required"
type="xs:string" fixed="PLN" />
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
--
S. Huseyin Ulger [MSFT]
MSXML Dev
"pstachy" wrote:
> 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:)
>
>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
