- From: BLANC Cedric - LYO ( CeBlanc@lyon-partdieu.sema.slb.com ) <CeBlanc@lyon-partdieu.sema.slb.com>
- Date: Wed, 09 Apr 2003 10:58:29 +0200
- To: html-tidy@w3.org
I am progressing : I've removed some configuration codelines which I had added a long time ago (I don't remember why...) : setClean(true); setXmlTags(true); And now Tidy generates this : <input name="login" type="text" size="20"/> This is precisely what I wanted it to do :) Something is surprising : the result is the same if the XHTML property is set to 'true' or 'false' ; do you think it may be because the input file doctype (automatically inserted by my HTML editor ; I can change it if necessary) is HTML 4.01 Transitional ? But there's a new (little) problem (else it would be too easier...) : ' Tidy (vers 4th August 2000) Parsing "InputStream" line 9 column 1 - Warning: <table> lacks "summary" attribute InputStream: Doctype given is "-//W3C//DTD XHTML 1.0 Transitional//EN" InputStream: Document content looks like HTML 4.01 Transitional 1 warnings/errors were found! ' I don't understant why Tidy displays this warning, because the 'summary' attribute is optional in HTML 4.01... But the main thing is that I don't have any problem with INPUT tags ; good news of the day :) Cedric -----Message d'origine----- De : Ben Noblet [mailto:ben@lateralsystems.com.au] Envoye : mercredi 9 avril 2003 10:08 A : html-tidy@w3.org Objet : RE: Problem with INPUT tags Yes I understand .. If you use the "output-xhtml: yes" option it should (and does) produce compliant XHTML. Your problem is how Tidy decides where to close the tag. I agree it should just add a trailing slash to an <input> tag resulting in <input id="x"/> as I can't really see any valid reason to have any data within <input></input> tags. This is exactly what it does with <img> tags quite successfully. I have had similar (and harder to solve) problems with things like unclose <marquee> tags (ugh!, not my content!)... Because a marquee tag expects data between the <marquee> and </marquee> tags, sometimes tidy decides to close it way down the page resulting in a whole page scrolling marquee :) Because IE arbitrarily ends the marquee when it encounters another tag like a </td> the invalid document displays fine before tidying, but looks terrible after. The same problem can occur with many other unclosed tags in bad HTML like <strong> etc. There is no easy solutions for these ones, as who can say what the author really intended, but tags like <input> should be easily solved. Cheers Ben -----Original Message----- From: BLANC Cedric - LYO ( CeBlanc@lyon-partdieu.sema.slb.com ) [mailto:CeBlanc@lyon-partdieu.sema.slb.com] Sent: Wednesday, 9 April 2003 5:41 PM To: Ben Noblet Subject: RE: Problem with INPUT tags The perfect solution would be that Tidy produces XHTML from my HTML input file, because the org.w3c.dom.Document produced is manipulated with DOM4J afterwards... That's why every tag has to be closed correctly. Cheers Cedric -----Message d'origine----- De : Ben Noblet [mailto:ben@lateralsystems.com.au] Envoye : mercredi 9 avril 2003 02:33 A : html-tidy@w3.org Objet : RE: Problem with INPUT tags Sorry I had assumed you were tidying to XHTML as that is primarily what I use tidy for! I presume Cedric was also tidying to XHTML, so you would also have to do that to reproduce his problem. Cheers Ben -----Original Message----- From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] Sent: Wednesday, 9 April 2003 10:14 AM To: Ben Noblet Cc: html-tidy@w3.org Subject: Re: Problem with INPUT tags * Ben Noblet wrote: >> I am unable to reproduce this, maybe this is caused by other errors >> or > >> your configuration options? Using the latest JTidy available I get >Your output is invalid as the INPUT tag is not closed. For HTML output, the <input> element must not have an end tag, for XHTML output, Tidy will print <input ... />; choosing XHTML output does not cause the behaivour you describe.
Received on Wednesday, 9 April 2003 04:56:17 UTC