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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Multi-valued attributes

[ Lists Home | Date Index | Thread Index ]
  • From: Marcus Carr <mrc@allette.com.au>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Wed, 17 Mar 1999 09:14:10 +1100


John Cowan wrote:

> Marcus Carr wrote:
>
> > I have used
> > ENTITIES quite often to emulate allowing multiple tokens from a token list. NAMES is too loose
> > and I may need more than one value, so a token list is out. By declaring entities and
> > assigning a notation that reflects their meaning, I get the best of both worlds.
>
> I don't understand what you mean by "token" and "token list".  Can
> you give a more concrete example?  Thanks.

Given the following attlist declaration:

<!ATTLIST sometime days (Mon | Tues | Wed | Thur | Fri) #IMPLIED>

the token list is the collection of available values (tokens).

In the event that I wanted an occurrence of the element to contain multiple days, such as the
following:

<sometime days="Mon Wed Fri">

I could not do it because of the restriction that I can only use one day. If the declared content
was NAMES, I couldn't prevent the insertion of Monday, Wednesday, etc or Sat, Sun. If the declared
content is ENTITIES, then I can declare just the five that I want, case sensitively and get the
desired results. There is a danger that entities designed for one element will get mixed up with
another, but OmniMark (my tool of choice) provides access to the notation associated with the
entity, so you could differentiate the notations and perform a semantic check while parsing. I
believe that this is as close as you can get to allowing multiple well-defined tokens to be
available in an attribute value - nearly on par for rigidity with IDREFS. :-)


--
Regards,

Marcus Carr                      email:  mrc@allette.com.au
___________________________________________________________________
Allette Systems (Australia)      www:    http://www.allette.com.au
___________________________________________________________________
"Everything should be made as simple as possible, but not simpler."
       - Einstein



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

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