W3C home > Mailing lists > Public > www-validator@w3.org > February 2007

using tidy in Markup Validator

From: olivier Thereaux <ot@w3.org>
Date: Wed, 7 Feb 2007 16:54:46 +0100
Message-Id: <9BEC0538-D994-4266-A618-EFFAEA9B9E50@w3.org>
To: www-validator Community <www-validator@w3.org>

Per http://www.w3.org/Bugs/Public/show_bug.cgi?id=1265 I have started  
looking at how we could make the validator output some automatically  
cleaned-up markup for users who would prefer not to fix errors by hand.

A quick hour of hacking gave me:
http://qa-dev.w3.org/wmvs/HEAD/check?uri=http://qa-dev.w3.org/wmvs/ 
HEAD/dev/tests/xhtml1-bogus-element.html;ss;st=1#tidy

It's only at the "proof of concept" level for now, but I was  
wondering if anyone had thoughts on how to make it useful, or could  
suggest better wording, etc.

A few things already crossed my mind, I'll write them down here,  
mostly for the record, but also as basis for discussion...

* One thing I thought at first was that if the "tidy" option is ON,  
we could replace the source display with the tidied source. However,  
given that error messages link to the display of the original source,  
it may be a bad idea.

* It does add up to the prerequisites of the software, who are  
already a few. libtidy is not hard to install, but at this point, its  
perl wrapper HTML::Tidy appears to be broken and need to be force- 
installed.

* Tidy's great, but not perfect. I can already see complaints or  
sarcasm from users who ran their markup through tidy, saved, and were  
disappointed to see that the result was not necessarily perfect/valid.

* I suspect there may be pathological cases where tidy just gives up  
cleaning some source code. Would have to be tested and properly caught.

Any thought?
-- 
olivier
Received on Wednesday, 7 February 2007 15:54:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:23 GMT