I'd like to see the old HEAD content model back, at least
when %HTML.Recommended; is turned on.
Earlier I wrote:
> Inclusion exceptions are evil (Ouch! My knee just jerked.)
Allow me to elaborate...
The desired specification is that <HEAD>'s subelements
can appear in any order, but some (like TITLE) can only
appear once. Unfortunately, SGML doesn't provide a
convenient way to specify that, so the (previous) content
model said that HEAD contains
a required TITLE,
an optional BASE,
a *sequence* of zero or more META elements, and
a *sequence* of zero or more LINK elements,
in any order.
The new model (with inclusion and exclusion exceptions)
says that:
HEAD contains a TITLE and an optional BASE, in any order;
LINK and META elements can appear anywhere inside HEAD;
And by the way, TITLE can't include LINK or META.
While this definition is functionally equivalent to
the desired specification, it's an awkward way to express it.
The HEAD element is an unordered collection, so the subelements
should be able to appear in any order. But since the order
doesn't matter, one order is just as good as any other, and it
*might* as well be prescribed! In other words, a SEQ group
<!ELEMENT HEAD O O (TITLE, BASE?, LINK*, META*)>
would work just as well, were it not for the body of existing
documents that include these in different orders.
If it were possible to start over from scratch, the
following would be more consistent with SGML conventions
from other DTDs:
<!ELEMENT HEAD O O (TITLE & BASE? & LINKS? & METAINFO?) >
<!ELEMENT LINKS - - (LINK+)>
<!ELEMENT METAINFO - - (META+)>
This has the advantage of keeping all the LINK elements
and all the META elements together in one place (as does the
previous content model).
Since it's not possible to start over from scratch, the more awkward:
<!ELEMENT HEAD O O (TITLE & BASE? & LINK* & META*) >
gives *almost* the desired results.
Using inclusion and exclusion exceptions does give
the desired results, but it's an extremely awkward
specification. The only reason I can see for using it is
to make valid some currently invalid documents; the
more restrictive model is otherwise perfectly workable.
My opinion is that the DTD should remain as it was,
without the inclusion/exclusion exceptions on HEAD and TITLE.
And someone should ask the authors of Internet Assistant
to test the output of their product.
If nothing else, the previous content model (without inclusions)
should be used if %HTML.Recommended; is turned on.
--Joe English
joe@art.com