Re: xml versus xhtml

That was exactly the question I asked a few days ago, though phrased
differently.

Tidy is designed to fix HTML, not fix XML. I do think there would be some
value for an option within Tidy, or a different version of the tool
(TidyXML?), that would only fix XML, ignoring HTML compliance. Fixing XML
should be infinitely faster, as you can bypass all the logic of what is good
HTML.

And yes, I too thought that output-xml would accomplish that, but it does
not.

    Matt

----- Original Message -----
From: "Paul" <valen@nic.com>
To: <html-tidy@w3.org>
Sent: Sunday, September 02, 2001 3:35 PM
Subject: xml versus xhtml


Hi All,

I am beginning to believe that when there is a discrepancy between me and
Tidy, that Tidy is usually right.  That being said, I'll ask anyway:

When I tidy -

<h1>start of  heading
  <p>paragraph within</p>
        end of heading
</h1>

tidy returns

<h1>start of heading</h1>
<p>paragraph within</p>
<p>end of heading</p>

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?

Thanks for your help.

Cordially,

Paul

Received on Sunday, 2 September 2001 17:48:32 UTC