Re: Patch for "HTML5" support
Marc Gueury <[email protected]> Mon, 07 Nov 2011 11:07:46 +0100
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============0284707198772187820== Content-Type: multipart/alternative; boundary="------------090701020601090504030807" This is a multi-part message in MIME format. --------------090701020601090504030807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Bjoern, I have seen no answer for this good idea yet. I do not know exactly what to think about it and I am probably not the best person to answer this. The real problem is that Tidy should not create a file with more error after cleanup of the HTML than before cleanup. If it is the case for nearly all the cases, then it is very nice ! _/A. Commit the patch or not/_ - if such change does not happen, I think that we can say goodbye to Tidy in the next years when all is HTML5. - I think that there is no replacement about a feature like Tidy in HTML5 for now. So, for these reasons alone, I think it is a good move. Your code should be checked in and tested with real pages to check. Even if the program is not perfect yet. _/B. HTML 5 validator comparison /_ - I have personally currently not a lot of free time and I have never read the HTML5 spec fully - While I understand that there is a parser algorithm part of the HTML5 spec - I do not understand where is the new "conformance checker" specification defined ? I know only that it is a sum of - some hand written code (to parse?) - schema validation - and some XPATH verification of the tree. Due to the ""some hand written code"", I do not see why to let Tidy live in parallel with this ? Maybe if maybe at a later time the parser part of the code could be taken to do some kind of Tidy work ? _/C. Your last issues /_I think there is a UTF8 output to Tidy and with it, the entities issue is not very relevant. When the output is ASCII only, I think the entities becomes then relevant. Does it answer your question ? Thanks, Marc On 05/11/2011 05:51, Bjoern Hoehrmann wrote: > * Bjoern Hoehrmann wrote: >> If there is enough interest in this that we get some test reports to the >> [email protected] mailing list, and people can't find major >> bugs, I might polish the patch and commit it. > http://lists.w3.org/Archives/Public/www-archive/2011Nov/0007.html has a > bit more polished version, I sorted some table entries, this should deal > with data-* attributes, and I made the tidyAttrIsProp changes I noted. I > also note that none of the "HTML5" named character references are added. > I am unsure how the logic for those should work, four problems: > > * It is unclear to me that this new feature has been properly tested > in the real world, supporting all the new ones may break things. > > * There are now "foo" and "foo;" entities to accomodate the "missing > semicolon" problem to some degree. Tidy could do the same simply by > keeping the semicolon around with an appropriately changed table > > * Some entities apparently resolve the multiple characters now. That > is a bit of a problem as it makes generating the entities from the > characters a good bit harder; also, this would require changes to > the data tables, would probably have to write { 0xABCD, 0x0000 } or > some such for lack of Unicode escape support in old compilers. > > * Some of these entities are fairly new. When should Tidy generate > the new ones? Should there be an option to control this? > > Generally, I would probably put support for them on the "someday, maybe" > pile along with inline SVG and MathML support, when there is evidence of > these features being supported (by, say, all major search engines, where > such support matters). --------------090701020601090504030807 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi Bjoern,<br> <br> I have seen no answer for this good idea yet. <br> I do not know exactly what to think about it and I am probably not the best person to answer this.<br> <br> The real problem is that Tidy should not create a file with more error after cleanup of the HTML than before<br> cleanup. If it is the case for nearly all the cases, then it is very nice !<br> <br> <u><i>A. Commit the patch or not</i></u><br> <br> - if such change does not happen, I think that we can say goodbye to Tidy in the next years when all is HTML5.<br> - I think that there is no replacement about a feature like Tidy in HTML5 for now.<br> <br> So, for these reasons alone, I think it is a good move. Your code should be checked in and<br> tested with real pages to check. Even if the program is not perfect yet.<br> <br> <u><i>B. HTML 5 validator comparison </i></u><br> <br> - I have personally currently not a lot of free time and I have never read the HTML5 spec fully <br> - While I understand that there is a parser algorithm part of the HTML5 spec<br> - I do not understand where is the new "conformance checker" specification defined ? I know only that it is a sum of<br> - some hand written code (to parse?)<br> - schema validation<br> - and some XPATH verification of the tree.<br> <br> Due to the ""some hand written code"", I do not see why to let Tidy live in parallel with this ? <br> Maybe if maybe at a later time the parser part of the code could be taken to do some kind of Tidy work ?<br> <br> <u><i>C. Your last issues<br> </i></u>I think there is a UTF8 output to Tidy and with it, the entities issue is not very relevant.<br> When the output is ASCII only, I think the entities becomes then relevant.<br> Does it answer your question ?<br> <br> Thanks,<br> <br> Marc<br> <br> <br> <br> On 05/11/2011 05:51, Bjoern Hoehrmann wrote: <blockquote cite="mid:[email protected]" type="cite"> <pre wrap="">* Bjoern Hoehrmann wrote: </pre> <blockquote type="cite"> <pre wrap="">If there is enough interest in this that we get some test reports to the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing list, and people can't find major bugs, I might polish the patch and commit it. </pre> </blockquote> <pre wrap=""> <a class="moz-txt-link-freetext" href="http://lists.w3.org/Archives/Public/www-archive/2011Nov/0007.html">http://lists.w3.org/Archives/Public/www-archive/2011Nov/0007.html</a> has a bit more polished version, I sorted some table entries, this should deal with data-* attributes, and I made the tidyAttrIsProp changes I noted. I also note that none of the "HTML5" named character references are added. I am unsure how the logic for those should work, four problems: * It is unclear to me that this new feature has been properly tested in the real world, supporting all the new ones may break things. * There are now "foo" and "foo;" entities to accomodate the "missing semicolon" problem to some degree. Tidy could do the same simply by keeping the semicolon around with an appropriately changed table * Some entities apparently resolve the multiple characters now. That is a bit of a problem as it makes generating the entities from the characters a good bit harder; also, this would require changes to the data tables, would probably have to write { 0xABCD, 0x0000 } or some such for lack of Unicode escape support in old compilers. * Some of these entities are fairly new. When should Tidy generate the new ones? Should there be an option to control this? Generally, I would probably put support for them on the "someday, maybe" pile along with inline SVG and MathML support, when there is evidence of these features being supported (by, say, all major search engines, where such support matters). </pre> </blockquote> <br> </body> </html> --------------090701020601090504030807-- --===============0284707198772187820== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 --===============0284707198772187820== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Tidy-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tidy-develop --===============0284707198772187820==--