Re: checking fragments of HTML

Hi,

I use the attached Perl script to post-process Tidy's output to do exactly 
what you guys want. It also does some other handy things. It's a filtering 
wrapper that runs Tidy on your input, then fine-tunes/strips things from it's 
output depending on which options you specify. Run it from the command line; 
it's usage basically mimics Tidy's. By default, unless you specify options it 
simply returns Tidy's output the same as if you ran Tidy directly. I run it 
with -s option to cleanup HTML fragments that get put into my server-side apps.

Comments within the script should explain it pretty clearly; if not feel free 
to contact me. Note: I use it under Linux/Unix and I have no clue if it works 
on anything else.


>>>>> On Fri, 9 Jun 2000, "Fabrizio" == Fabrizio Pollastri wrote:

  Fabrizio> Hi all.

  Fabrizio> I would like to use tidy to clean my html, but I have my source
  Fabrizio> html split in fragments without the <body> </body> tags. Each
  Fabrizio> fragment is syntactically consistent. This is because I use wml to
  Fabrizio> generate my final html pages.

  Fabrizio> It is possible to use tidy in this case? In which way?

  Fabrizio> If not, it will be fine to add the option to ignore the missing
  Fabrizio> html stuff outside <body> </body> tags inclusive.

  Fabrizio> Thank in advance for any help.

  Fabrizio> Fabrizio Pollastri.
~pete

Received on Friday, 9 June 2000 11:10:19 UTC