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

Re: embedded space

From: Martin Gudgin <marting@develop.com>
Date: Sat, 30 Sep 2000 11:14:15 +0100
Message-ID: <003a01c02ac7$3e406540$0300a8c0@arbitrary>
To: "Jamie Funk" <jfunk@wolfgang.com>, <www-xml-schema-comments@w3.org>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC