Terry Allen <[log in to unmask]> wrote:
> >This isn't strictly legal according to proposed DTD. You need to
> place a before the first element. This is an
> unfortunate consequence of how the SGML spec is defined. It is
> very restrictive for when you can omit the start tag of elements.
> According to a quick test (confirming what an eyeballing of the
> DTD indicates), you can indeed specify that the start tag of
> COLGROUP is omissible. It contains only an element (COL) that
> can appear nowhere else, and has no REQUIRED attributes.
What did you test this with?
Start-tag omission is only possible for elements which are
contextually required (which COLGROUP is not) and non-empty
(in addition to not having any #REQUIRED attributes, et cetera).
Even if COLGROUP were made contextually required:
^ currently "*"
then sgmls complains about a "Start-tag omitted from COLGROUP
with empty content" for every TABLE that lacks a COLGROUP.
This would require authors to enter a tag whenever
they *didn't* want to specify any column defaults, which is
clearly not desirable.
[Besides that, given the widespread confusion in the user
community about the HEAD and BODY elements, I think that start-tag
omission is probably a bad idea to begin with...]
[log in to unmask]