Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: A simple newbie question

From: "Stan Kitsis [MSFT]" <skits@---------.--->
To: 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) 




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