Why doesn't XML have Bag?
Paul Janssens
paul.janssens at skynet.be
Fri Mar 26 18:15:53 GMT 1999
Frank Boumphrey wrote:
>
> In SGML you can put
> (a&b&c) whicch means that eachelement must appear only once but in any
> order.
...
>
> My understanding was that it was ommited because of the requirement
>
> "XML software shall be easy to write"
>
> It takes only a few lines of C code to validate the second requirement but a
> LOT more to validate the first.
>
How about expanding it as you parse the DTD (bottom-up coding)
node ampersand(node a node b) {
return or(concat(a,b),concat(clone(b),clone(a)));
}
that's just adding three lines to your code.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at 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 at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list