W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Re: checking fragments of HTML

From: <html-tidy@war-of-the-worlds.org>
Date: Tue, 20 Jun 2000 14:24:13 -0500
Message-Id: <p04320402b57570d1d56d@[216.229.13.10]>
To: html-tidy@w3.org
Fabrizio Pollastri <fabrizio@cstv.to.cnr.it> wrote:

>I would like to use tidy to clean my html, but I have my source html
>split in fragments without the <body> </body> tags. Each fragment is
>syntactically consistent. This is because I use wml to generate my final
>html pages.
>
>It is possible to use tidy in this case? In which way?

How consistent?  There may be problems if they're not consistently legal
BODY content, such as a series of table rows without a TABLE tag.

You might be able to get by by putting a comment "cut line" at the start
and end of your snippet, running Tidy, and then extracting only the parts
between those comments for your fragment file.  The instances where your
fragment's content could slip out of those section-delimiting comments are
limited.

Tidy could have an option added to automatically insert such markers in the
document, note their positions, tidy the document as if it were complete
(but suppressing errors occurring outside the markers), then only output
the text between the markers.
Received on Tuesday, 20 June 2000 15:24:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT