(sound of removing editor's green eye-shade)
Elli Mylonas poses a nice clean question. My first reaction, speaking
as a user, is that either approach is defensible, and neither will get
you into real deep trouble, beyond the obvious ones that EM's sample DTD
fragments need spaces between their tag-omissibility hyphens and a plus
or two at strategic points, thus:
<!ELEMENT H1 - - (H2+ | FRAGMENT+) >
and
<!ELEMENT H - - (H+ | FRAGMENT+) >
The latter has, as EM points out, the advantage of being nestable to
arbitrary depths; this is, as she also points out, also its major
disadvantage, since one might wish to specify a maximum level. EM
proposes a TYPE attribute to do this; that's the main argument against
EM's second formulation as it stands, since the attribute is (a)
redundant, since an application should be able to keep track of nesting,
and (b) possibly problematic, since it's hard to say what should be done
if the user specifies type=1 when actually the heading is four levels
down.
If you want explicit specification of the level (and you may, for
implementation reasons), I would certainly go with the first
formulation, since it allows the explicit specification to be validated.
The second formulation has the virtue of economy; it applies Occam's
Razor. But it would be hard to process the way one usually wants to. I
at least don't know any software that will track heading level and
provide different processing depending on level, except with a lot of
user work. For what it's worth, that's the major reason (as I understand
it) that the TR committee of the TEI chose to leave Occam's razor
unapplied in this one area, and let the level be specified explicitly
in the tag name.
Michael Sperberg-McQueen
|