Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


A simple newbie question

From: =?ISO-8859-1?Q?L=FCpher_Cypher?= <lupher.cypher@-------.--->
To: 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)


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent