using tidy in Markup Validator

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 UTC