[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: list of pre-defined value

From: Michael Kay <mike@saxonica.com>
Date: Sat, 7 Jan 2006 17:37:07 -0000
To: "'dirk dewolf'" <dirkdewolf78@hotmail.com>, <xmlschema-dev@w3.org>
Message-ID: <E1EvI0K-0005TV-7d@aji.w3.org>
dirk dewolf

Define an atomic type derived from NMTOKEN (or simply from string) that
enumerates the allowed values; then define a list type whose item type is
that atomic type.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of dirk dewolf
> Sent: 07 January 2006 12:40
> To: xmlschema-dev@w3.org
> Subject: list of pre-defined value
> 
> 
> How can I define a space separated list of values for an 
> attribute using 
> NMTOKENS. The values one may use must be predefined.
> 
> The below code does not seem to work. The attribute value 
> does not allow for 
> the containment of a LIST of the values; yet appears to be 
> restricted to one 
> value only.
> 
> <xs:simpleType>
> <xs:restriction base="xs:NMTOKENS">
> <xs:enumeration value="value1"/>
> <xs:enumeration value="value2"/>
> <xs:enumeration value="value3"/>
> <xs:enumeration value="value4"/>
> <xs:enumeration value="value5"/>
> </xs:restriction>
> </xs:simpleType>
> 
> many thanks
> d.
> 
> _________________________________________________________________
> Free blogging with MSN Spaces  http://spaces.msn.com/?mkt=nl-be
> 
> 
> 
> 
Received on Saturday, 7 January 2006 17:37:27 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.