Why doesn't XML have Bag? Uh, "set"

Marcus Carr mrc at allette.com.au
Sun Mar 28 06:42:26 BST 1999


Roger L. Costello wrote:

> Thanks Dave for clarifying terminology.  It is "set" that I meant, not
> "bag".  Just to make certain that I understand, an XML DTD cannot
> express the following:
>
> "A <Kitchen> element contains exactly three child elements: one instance
> of <Sink>, one instance of <Stove>, and one instance of <Refrigerator>,
> and these child elements can appear in any order."
>
> Correct?

XML cannot, but as has been pointed out, SGML can. This is a classic situation where the use
of an SGML validation stage may be cheap and useful. You can check the structure with the
rigid model, then make the appropriate assumptions when using the XML. The XML content model
might not reflect your strict requirements of the data, but the overall process does.

The role of semantic checking may at some stage be taken over by a schema, but until then an
SGML parse can provide the rigidity that you need. This might be as simple as just remapping a
single parameter entity and applying a different parser.


--
Regards,

Marcus Carr                      email:  mrc at 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 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