OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XML Schema Question: specifying restrictions for a list of

[ Lists Home | Date Index | Thread Index ]

Eric van der Vlist wrote:
> On Wed, 2004-04-07 at 14:51, Tom Gaven wrote:
>>You can interleave ('&' connector) the single 'computer with default
>>attribute' with one or more 'computers without default attribute'.
> Very nice.
> What is needed here is probably to require one default attribute equal
> to "true" and others either missing or equal to "false", but your schema
> can easily be adapted:

Seems to me that you can just declare the attribute "default" to be of 
type ID.  That requires its value to be unique.  Then create a 
restriction so that it can only accept the value "true".  Finally, make 
the attribute's presence optional.  Now you are allowed to use it, but 
it must have the value "true" and that value may only appear once.

This method ought to be easier and more interoperable than using "key".

Of course, this won't work if you want to also include many attributes 


Tom P


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS