XML-Data, "&" and inheritance

Andrew Layman andrewl at microsoft.com
Tue Apr 28 00:31:08 BST 1998


Paul Prescod wrote "In reviewing XML Data for another project, I note that
the XML Data
"subclass" mechanism depends on the XML-Data equivalent of the ampersand
operator that was removed from XML. I'm not convinced that putting that
operator back in was a good idea. It was left ouf of XML because it
complicates implementation.".

This is a valid criticism, and we need to think about it more.  The
motivating factor for including the ampersand operator in XML-Data is the
significant number of customers who have asked for it.  In discussing DTDs
with me and others, they showed examples like the following:

	<!ELEMENT person
((firstname|middlename|lastname|age|shoesize|hair|eyes|height|weight)*) >

When I've asked what this construction means, they said, in effect "What I
mean is that the elements can occur in any order, but there isn't any good
way to say that in XML DTDs."

I suspect a number of other people have seen similar examples.

I know we could argue that people should not allow variation in element
order, but customers have adamantly stated that they sometimes want
forgiving sequence.  For example, RDF specifies that order does not matter
for RDF data.

So we have a funny situation in XML in which we've tried to make processing
easier by forbidding certain things in the DTD, but the result is that
people either avoid DTDs altogether or write bogus DTDs that don't fully
describe the real syntax.  That is, we've simplified the implementation by
being unable to express the intended syntax. 

Anyway, I wanted to add to the discussion some of the factors that led the
authors of XML-Data to propose including the ampersand operator.


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/
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