Re: Comment Declarations

Paul Grosso (paul@arbortext.com)
Thu, 25 May 95 11:11:06 EDT

> From: dillo%stieltjes.smc.univie.ac.at@arbortext.com (Dieter Baron)
>
> Glenn Adams (glenn@stonehand.com) wrote:
> : 2.2.5.2. Comment Declarations
> :
> : When a comment is required in a context where other markup is not used,
> : a comment declaration may be used; for example, within the content of
> : an element.
> :
> : A comment declaration is composed of a markup declaration open
> : delimiter '<!' followed by one or more simple comments separated
> : by whitespace and terminated by a markup declaration close delimiter '>'.
>
> i might be mistaken, but as i understand it, `<!>' -- an empty markup
> declaration is also kind of a comment, which should be ignored.
>
> so, whouldn't be ``followed by zero or more simple comments'' be a
> better wording?

True, provided you read "zero or more simple comments separated
by whitespace and terminated by a markup declaration close delimiter"
to mean that there can be no whitespace if there are zero comments.
That is, <!> is valid, but <! > is not. Production 91 of 8879
defines a comment declaration as:

MDO,
( comment,
( s | comment )*
)?,
MDC

where MDO is "<!" and MDC is ">" (without the quotes) in the
reference concrete syntax and 'comment' is what Glenn is calling
a simple comment and 's' is whitespace. Note that, since everything
but MDO and MDC is optional, <!> is a valid comment declaration.

paul

Paul Grosso
VP Research, ArborText, Inc.
and
Chief Technical Officer, SGML Open

Email: paul@arbortext.com