Re: Couldn't XML allow and ignore omitted tag minimization

At 12:05 PM 3/4/97, Joe English wrote:
>dgd@cs.bu.edu (David Durand) wrote:
>>   I am sympathetic to this, except for the SGML-imposed requirement that
>> EMPTY tags must take minimization "- O" if they could be pure "noise"
>> elements I wouldn't mind, but explaining that restriction in the context of
>> "compatibility" is sure to be difficult.
>By my interpretation of the standard, this is not actually
>required, only recommended.  SGMLS agrees: it issues a warning
>if it sees <!element foo - - EMPTY> in the DTD but it does flag
>the document as non-conforming.  According to 7.3.1 and 11.2.2,
>the parser doesn't even examine the tag omission parameters
>for EMPTY elements or those with a non-#IMPLIED CONREF attribute.

Right.  And the recommendation is only that it be done for mnemonic
purposes.  (I.e., as a reminder to humans doing manual tag input.)
The parser is guaranteed to ignore it.  Furthermore, in the CONREF
case, the recommendation is not even good advice.  Because when
the CONREF attribute is not specified (which presumably should happen
sometimes, or the element type should have been EMPTY and the attribute
REQUIRED), the omitted tag minimization parameter should be whatever
is appropriate when the CONREF attribute is *not* specified.

>(It would be nice to be able to turn this warning off in SGMLS/SP
>though, especially for elements with CONREF attributes; I'd like
>to be able to specify that the end-tag is always required if no
>content reference attribute is supplied.  But that has nothing
>to do with XML...)

Yet another reason why the perfect parser would have each warning
able to be individually turned off.  Gang-switching all warnings
off just because you're deliberately going to violate one of the
warning conditions and don't want to be flooded with messages isn't

Dave Peterson