handling metadata with multiple values

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Tue Aug 12 14:55:34 PDT 2003


> <ucdList>
> 	<ucd> ucd1</ucd>
> 	<ucd> ucd2</ucd>
> </ucdList>

if you want to use containers, why not just have 1-2 kinds of "containers"
which can contain items. The obvious one is "list"; "set" and  "map" are very 
useful but less obvious in pure XML because you have to define equality for
the items (or keys in the map) and the default (deep equality) isn't always
what you want. 

<list>
	<ucd> foo </ucd>
	<ucd> bar </ucd>
</list>

It is easy enough with XPath to extract the appropriate elements from an
object-model while generically taking into account arbitrary depth.

What one doesn't want is the case where an element is understood only by
looking at the parent(s) and thus cannot be extracted and plunked down 
someplace else, such as:

<ucdList>
	<item> foo </item>
	<item> bar </item>
</ucdList>

Here, an item is meaningless out of context.

Anyway, I think it is highly likely that <list>, <map>, and to a lesser extent 
<set> would be very useful constructs if kept general enough. Especially
<list>...

-- 
Patrick Dowler
Tel/Tél: (250) 363-6914                  | fax/télécopieur: (250) 363-0045
Canadian Astronomy Data Centre   | Centre canadien de donnees astronomiques
National Research Council Canada | Conseil national de recherches Canada
Government of Canada                  | Gouvernement du Canada
5071 West Saanich Road               | 5071, chemin West Saanich
Victoria, BC                                  | Victoria (C.-B.)



More information about the registry mailing list