Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: A simple newbie question A simple newbie questionTo: NULL Date: 1/2/2006 6:03:00 AM Hi,
I need to define an element which can take on predefined values and has
an optional attribute.
<xs:simpleType name="type__on_off">
<xs:restriction base="xs:token">
<xs:enumeration value="on" />
<xs:enumeration value="off" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="type_errors">
<xs:simpleContent>
<xs:restriction base="xs:token">
<xs:enumeration value="none" />
<xs:enumeration value="hidden" />
<xs:enumeration value="top" />
<xs:enumeration value="bottom" />
<xs:attribute name="stack" type="type__on_off"
use="optional" default="off" />
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
This gives me a validation error "XMLSchema:string is used as a base for
complex type restriction".
What am I doing wrong?
Thanks!
--
- lüpher
---------------------------------------------
"Man sieht nur das, was man weiß" (Goethe)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
