Re: HTML 5 and Tidy
Marc Gueury <[email protected]> Tue, 19 Oct 2010 21:15:37 +0200
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Restarting from scratch with a HTML5 compliant parser is a very extreme solution, I was not expecting. But why not, it is surely the right way forward. A first way is the http://about.validator.nu/htmlparser/. I just tried it. It is quite interesting and would be a good base for a new version in Java. The good side of this, is that the program could be easily shared and reused in several forms: standalone program, browser extension, website and so on... Another way would be to use the HTML parser of a "compliant" browser with a browser extension and clean the DOM tree with Javascript. Also, it would allow to convert HTML pages between different versions of HTML easily too. Or maybe a combination of all this. For testcases, I hope that http://www.validator.nu/ has a set of HTML5 testcases for the validation tool. It could be a good base. I will check a little more in validator.nu to see what it is possible. Maybe the people of validator.nu would be happy to have a "" Tidy "" program using or being part in their already huge program :-) Thanks for the good ideas, Marc On 18/10/2010 10:49, Dave Raggett wrote: > An updated version of Tidy would indeed be valuable, and could be built > as a post processor to an existing HTML5 compliant parser, see e.g. [1]. > This would involve a complete code rewrite. New Postprocessors could > also be written for cleaning up the markup exported by the likes of > Microsoft Office. In all these cases, it is a matter of establishing a > suite of before and after examples as a basis for development and > testing. It is a question of what kinds of clean up are justified, and > what kinds of authoring mistakes (or just sloppiness) it would be worth > addressing. > > If I was starting afresh I would consider starting with a browser > extension as the debugging facilities in browsers are now pretty good. > Essentially, read an HTML page (perhaps via XMLHttpRequest), run an > expert system over the DOM tree, then serialize as XML and post back to > the server. Once the code was developed, it could then be ported to a > standalone tool. > > So the starting point should be a collection of examples of the kinds of > things that a new version of Tidy could address. What are the use cases, > and low hanging fruit vs medium sized problems vs stretch challenges? > > [1] http://about.validator.nu/htmlparser/ > > On Mon, 2010-10-18 at 00:07 +0200, Marc Gueury wrote: >> Hi all, >> >> I know the question will look strange and simple for people deeply >> involved in HTML 5. Unlike me. >> >> But here is my problem, Firefox 4 is going out with a lot of changes and >> I have to release >> a new Firefox version of the extension: Html Validator with a lot of >> changes. >> >> So, because HTML 5 is going out of the wood, I try to read about it. >> I would like to be able to check HTML 5 locally too in the browser. >> >> So, >> * OpenSP and SGML are not able to parse HTML 5 anymore. >> * The official Validator.nu is hugely complex about 300Mb and impossible >> to ship with a Firefox extension. >> * HTML Tidy does not evolve a lot these days and does not support HTML 5 >> at all >> >> It is a pity, since I am quite convinced that Html Tidy could be easily >> modified to >> lead to a simple HTML5 "checker" and "cleaner" (probably not a perfect >> one but who cares...) >> >> I begin to think that I will have to say goodbye to offline HTML 5 >> validation on local machine ? >> >> The only way will be to validate a HTML page will be to send the HTML >> page to an external website. >> HTML tidy cleaner will also disappear.... >> >> It seems a step back to prehistoric times :-) >> I wonder if one of you has some thought about this ? >> >> Thanks, >> >> Marc >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Download new Adobe(R) Flash(R) Builder(TM) 4 >> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >> Flex(R) Builder(TM)) enable the development of rich applications that run >> across multiple browsers and platforms. Download your free trials today! >> http://p.sf.net/sfu/adobe-dev2dev >> _______________________________________________ >> Tidy-develop mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/tidy-develop >> ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev