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 Saturday, 30 September 2000 06:15:21 UTC