Re: WD-html-in-xml body declaration

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 UTC