Re: questions about HTML DTD 1995/03/29

Keith M. Corbett (kmc@specialform.com)
Thu, 27 Apr 95 14:48:20 EDT

At 07:27 PM 4/26/95 EDT, Baird-Joshi, Susan wrote:

>under IMAGES
> 1. "EMPTY" in <!ELEMENT IMG - O EMPTY> means no end tag is required?

EMPTY specifies that the element must not have content. The "- O" specifies
that the start tag is required, but the end tag may be omitted. Basically,
the IMG start tag is a placeholder for attributes.

>under PARAGRAPHS
> 1. "(%text)" in <!ELEMENT IMG - O (%text)> means text must follow?

I believe you're referring to the definition of the P element, which in the
2.0 DTD is defined as follows:

<!ELEMENT P - O (%text)*>

which means that P elements may contain zero or more occurrences of the
model group specified by the "text" parameter entity. With the replacement
text for "text" we have the definition

<!ELEMENT P - O (#PCDATA | A | IMG | BR)*>

which means that P elements may contain zero or more occurrences of any of
the elements A, IMG, or BR; and/or parsed character data, i.e. plain text
comprised of valid SGML characters.

-kmc