W3C home > Mailing lists > Public > www-html@w3.org > January 1999

Re: WD-html-in-xml body declaration

From: Nir Dagan <nir@nirdagan.com>
Date: Sat, 02 Jan 1999 17:34:47
Message-Id: <3.0.6.16.19990102173447.2b47e514@nirdagan.com>
To: Ghadi Shayban <shaybang@yahoo.com>, www-html@w3.org
At 17:37 1/01/99 -0800, Ghadi Shayban wrote:
>
>Correct me if I'm wrong:
>
>In HTML 4.0, the body element couldn't have character data directly
>inside of it.  For example, this is illegal:
><html>
><body>
>asdf
></body>
></html>

It is invalid in the strict DTD but valid with the loose DTD.
(well, the example is invalid as there is no TITLE before BODY)
The differences between the content models of the strict and loose
DTDs are not emphasized in the verbal part of the HTML4.0 spec.

>
>In WD-html-in-xml, these pieces of the DTD define the body element:
><!ENTITY % Block "(#PCDATA | %block; | %misc;)*">
><!ENTITY % body.content "%Block;">
><!ELEMENT body %body.content;>
>
>That states that the body element can have cdata directly inside. 
>This seems like a significant change from HTML 4.  Can someone
>enlighten me on this?

In principle it is possible to write modular DTDs with different
content models for strict and loose, but this requires overriding 
many entity declarations, and make it more difficult to follow. 

The strictness of the strict HTML4.0 dtd is more of "suggesting good
practice" to authors as even with the strict DTD one can have 
a DIV as the only child of BODY and DIV allows for #PCDATA as 
well as %block;.

Regards,


Nir Dagan
Assistant Professor of Economics
Universidad Pompeu Fabra
Ramon Trias Fargas 25
08005 Barcelona
Spain

http://www.nirdagan.com
mailto:nir@nirdagan.com

"There is nothing quite so practical as a good theory." 
-- A. Einstein
Received on Saturday, 2 January 1999 11:32:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:38 GMT