> i would like to define a type with restrictions, i used the following schema
> but i get an error
[quoted text clipped - 19 lines]
> it does not recognize the LatitudeType.
> i want Latitude to be a double with restriction
You have not shown us your XML instance document.
When I use the following schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0">
<xs:simpleType name="LatitudeType">
<xs:restriction base="xs:double">
<xs:minInclusive value="-90.0" />
<xs:maxInclusive value="90.0" />
</xs:restriction>
</xs:simpleType>
<xs:element name="Latitude">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="LatitudeType">
<xs:attribute name="Units" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="Latitude" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
and the following instance
<?xml version="1.0" encoding="UTF-8"?>
<root
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test2004092701Xsd.xml">
<Latitude Units="degree">90</Latitude>
<Latitude Units="degree">188.5</Latitude>
</root>
then both Xerces-Java as well as MSXML 4 flag an error for the 188.5 value.
If the above doesn't work for you then please tell us which XML parser
you are using and what else is different in your schema.

Signature
Martin Honnen
http://JavaScript.FAQTs.com/