A little wish for short end tags

Paul Prescod papresco at technologist.com
Sat May 16 16:34:26 BST 1998

I had hoped to allow this thread to die, but I can't allow this incorrect
statement to pass. These are the sorts of things that become dogma:

Liam Quin wrote:
> There are no minimisation features in XML.

1. Empty-element tags (XML actually ADDED this to SGML)
2. Doctype declarations of the form <!DOCTYPE FOO SYSTEM "foo.dtd">

Plus there are many alternative representations geared totally toward

3. Predefined entities
4. Alternate literal quoting characters
5. Alternate unicode number syntax (XML actually ADDED this to SGML)

As long as I've already put myself into disrepute by perpetuating the

Another myth that I see floating around often is that XML is simple.
Anybody who believes that has not studied the various types of entities,
their allowed occurrences, order of replacement and interaction with the
standalone declaration. Essentially these features cannot be expressed in
prose text that could be read and understood by a typical reader. That
means that XML's syntax is more complicated than most programming
languages which *can* be (and sometimes are!) described completely in
prose text. I have never looked at the grammars for Python or Java, for
example, but I have a pretty clear idea of what is legal and what is not.

Of course, XML's central concepts are simple, just as SGML's were. But
neither language is syntactically simple. Compared to the complexity of
these features short end tags would make the specification essentially no
more complex. You would add a single question mark to the EBNF as opposed
to hundreds of percent signs for parameter entities. The "keep XML simple"
argument is a non-starter. 

"Minimization is a slippery slope" is also a non-starter. We've already
got minimization and any move towards more is strongly resisted (which is
good...we always need some people to argue against features). The XML
working group is full of people who have the ability to make decisions on
a case by case basis. I think it is an insult to them to propose
otherwise. The logical end-point of the slippery slope argument is "If we
try to make a subset of SGML, we'll start adding SGML features until we
end up with SGML" which obviously did not happen.

"Full end tags help hackers" is a completely valid point. It is the
central point. It is the point that forced the decision in the first
place. Personally, I think that it is quite easy to type:

expandTags myFile.sgm | awk ....

But I recognize that others disagree. It is arguably the case that
downloading and compiling "expandTags" is an unacceptable burden on
Desperate Perl Hackers.

 Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

Can we afford to feed that army, 
 while so many children are naked and hungry?
Can we afford to remain passive, 
 while that soldier-army is growing so massive?
  - "Gabby" Barbadian Calpysonian in "Boots"

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