|
Posted by Gus Richter on December 15, 2005, 12:34 pm
Please log in for more thread options
Eric Lindsay wrote:
> I'm trying to learn how to read a DTD I wanted to use,
> http://www.w3.org/TR/html4/strict.dtd
> to ensure I was treating each element correctly in terms of being block,
> inline, or flow (either).
There are just block or inline elements.
Flow is an "entity" which may be either inline or block.
> <!ENTITY % block
> "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
> BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
This defines which elements are block type.
The %heading, %list and %preformatted entities are expanded elewhere
(permissable content type for each).
> <!ENTITY % flow "%block; | %inline;">
The % flow entity is defined to be either Block or Inline.
> The way I read that was the block elements included ADDRESS.
Correct. The ADDRESS element is defined to be block type.
> However
> the next item related to ADDRESS was
>
> <!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
> <!ATTLIST ADDRESS
> %attrs; -- %coreattrs, %i18n, %events --
> >
The ADDRESS element may only _contain_ inline element(s) zero or more times.
> This seemed to me to be saying that the element ADDRESS requires opening
> and closing tags, is an INLINE element that can be left out, or used one
> or more times.
>
> Can anyone explain to me what I am misunderstanding?
How to read the HTML DTD:
<http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3>
--
Gus
|