- From: Chris Maden <crism@oreilly.com>
- Date: Mon, 4 Jan 1999 12:23:54 -0500 (EST)
- To: www-html@w3.org
[Ghadi Shayban] > In HTML 4.0, the body element couldn't have character data directly > inside of it. HTML 4.0 defined *three* DTDs: strict, transitional, and frameset. The transitional DTD allows text in <body>; the strict DTD does not. HTML 3.2 allowed text in <body>; HTML 2.0 had variable entity declarations depending on whether %HTML.Recommended; was INCLUDE or IGNORE. > 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? It does seem silly to spend time making an XML version of the transitional DTD. XML doesn't permit the laxity of most HTML implementations, so I don't see much point. > There is also an error, I think. Shouldn't the body declaration > be............ > <!ELEMENT body "&body.content;"> ? No. General entity references (&...;) aren't recognized in a DTD, so your content model would be "&body.content;", which isn't legal. And the quotes aren't legal there either, even with a parameter entity reference (%...;); you'd have <!ELEMENT body "(#PCDATA...)*"> after expansion and quotes aren't legal in a content model. The percent signs in the entity declarations above indicate that they're parameter entities, so percent signs must be used in the references to them, not ampersands. -Chris -- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
Received on Tuesday, 5 January 1999 04:39:23 UTC