W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

Re: embedded space

From: Jamie Funk <jfunk@wolfgang.com>
Date: Mon, 2 Oct 2000 14:34:33 -0400
Message-ID: <007501c02c9f$6999e750$da020117@rmic.com>
To: <www-xml-schema-comments@w3.org>
What version will allow the restriction node?  I am working with
http://www.w3.org/1999/XMLSchema, and when XMLSpy gets to the restriction
tag, it says it is unexpected.  Am I just working with outdated tools?


----- Original Message -----
From: Martin Gudgin <marting@develop.com>
To: Jamie Funk <jfunk@wolfgang.com>; <www-xml-schema-comments@w3.org>
Sent: Saturday, September 30, 2000 6:14 AM
Subject: Re: embedded space


> Hi Jamie,
>
> The AttributeType element is from XDR ( XML-Data Reduced ), this mailing
> list is for XSD ( XML Schema Definition ).
>
> You can achieve the required behaviour in XSD by saying (roughly);
>
>
> <simpleType name='mylistofsizes' >
>   <restriction base='string'>
>     <enumeration value='small' />
>     <enumeration value='medium' />
>     <enumeration value='large' />
>     <enumeration value='very large' />
>   </restriction>
> </simpleType>
>
> <attribute name='size' type='mylistofsizes' />
>
> or alternatively if you don't need to reuse the mylistofsizes type
anywhere
> else then;
>
> <attribute name='size'>
>   <simpleType>
>     <restriction base='string'>
>       <enumeration value='small' />
>       <enumeration value='medium' />
>       <enumeration value='large' />
>       <enumeration value='very large' />
>     </restriction>
>   </simpleType>
> </attribute>
>
>
> The following would all be valid attributes per either of the type
> defintions above;
>
> size='small'
> size='medium'
> size='large'
> size='very large'
>
> I can't remember off the top of my head how you would attempt this in XDR
> ( or if it is even possible )
>
> Regards
>
> Martin Gudgin
> DevelopMentor
>
>
> ----- Original Message -----
> From: "Jamie Funk" <jfunk@wolfgang.com>
> To: <www-xml-schema-comments@w3.org>
> Sent: Friday, September 29, 2000 9:03 PM
> Subject: embedded space
>
>
> How can I have a space in an attribute value in a schema?  Does anyone
> know the syntax to do this?
>
> I want to write something like:
>
> <AttributeType name="size" values="small medium large very large"/>
>
> where the values are "small", "medium", "large", and "very large".
>
> Thanks,
>
> Jamie
>
>
>
>
Received on Monday, 2 October 2000 14:37:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:48 GMT