Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - A simple newbie question [Thread Next] Re: A simple newbie questionTo: NULL Date: 1/4/2006 2:31:00 PM <xs:simpleType name="type__on_off">
<xs:restriction base="xs:token">
<xs:enumeration value="on" />
<xs:enumeration value="off" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="newType">
<xs:restriction base="xs:token">
<xs:enumeration value="none" />
<xs:enumeration value="hidden" />
<xs:enumeration value="top" />
<xs:enumeration value="bottom" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="type_errors">
<xs:simpleContent>
<xs:extension base="newType">
<xs:attribute name="stack" type="type__on_off" use="optional"
default="off" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
ttp://www.microsoft.com/info/cpyright.htm
"Lüpher Cypher" <lupher.cypher@v...> wrote in message
news:im3uf.3254$tJ1.916@trndny01...
> 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 | |||
|
