in reply to Re^5: Regular Expression
in thread Regular Expression

Funny you should mention that (we were discussing this with the <p> tag) - it's not valid because body isn't defined with an EMPTY content model (as is br, hr, etc.)

w3c specs shown here

Replies are listed 'Best First'.
Re^7: Regular Expression
by CountZero (Bishop) on Jun 28, 2005 at 20:20 UTC
    Well, I'm not sure about that.

    The DTD of XHTML defines the <body>-tag as <!ELEMENT body %Block;> and %Block is further defined as

    <!ENTITY % block "p | %heading; | div | %lists; | %blocktext; | fieldset | table"> <!ENTITY % Block "(%block; | form | %misc;)*">

    Watch the * in the definition of %Block: zero or more times! So %Block can be empty, hence <body> can be empty and can be written as <body/>.

    Also the official validator at W3C says it is valid XHTML1.0

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law