- From: Jamie Funk <jfunk@wolfgang.com>
- Date: Mon, 2 Oct 2000 14:34:33 -0400
- 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 UTC