W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

Re: xml versus xhtml

From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
Date: Mon, 3 Sep 2001 18:20:06 +1200 (NZST)
Message-Id: <200109030620.SAA196596@atlas.otago.ac.nz>
To: html-tidy@w3.org, valen@nic.com
"Paul" <valen@nic.com> wrote:

	<h1>start of  heading
	  <p>paragraph within</p>
	        end of heading
	tidy returns
	<h1>start of heading</h1>
	<p>paragraph within</p>
	<p>end of heading</p>
As it should.  No version of HTML since 2.0 has ever allowed
a paragraph within a heading.

	This seems consistent with earlier observed tidy behavior,
	namely that xhtml1.0 dtd disallows <p> within <h1>. So tidy
	closes the <h1>, etc.  But I didn't specify output-xhtml.  I
	specified output-xml.  Isn't the input to tidy valid h1 'xml'?
	If so, why does tidy seem to force compliance with the xhtml dtd?
Because it is an *HTML* tidier, and it doesn't make sense to put a
<p> element inside an <h[1-6]> element, _whatever_ the output is.

While the input was _well-formed_ XML, to count as "valid", an
XML document must provide a DOCTYPE and conform to it.
Received on Monday, 3 September 2001 02:20:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:50 UTC