This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hi, There seems to be a bug in the HTML validator. Im validating a snippet of HTML, so Im using the Validate by Direct input tab, and furthermore have set the checkboxes in the more options to Validate HTML fragment and Use Doctype HTML 4.01. The validator inserts code at the beginning and end to make a complete HTML document. Unfortunately, the inserted code itself creates many errors! This sure makes it hard to find the errors in ones own snippet. Kind regards, Ed
(In reply to comment #0) > The validator inserts code at the beginning and end to make a complete HTML > document. Unfortunately, the inserted code itself creates many errors! Not as far as I know. There may be incompatibilities with the code you are pasting in, could you give a sample?
Thanks for replying. I couldn't reproduce the error this morning, but believe I will be able to with a bit of trying. I did get a clue as to the nature of the problem when I did try again this morning. This combination did correctly detect an error in my code, since it used the strict Doctype. I discovered that I could ask for the transitional doctype and all was well with my code. This surprised me - I would have thought that with "Validate HTML fragment" checked, the 1st "Use Doctype" field (with the drop down list) would be ignored. But this is the clue to help me reproduce the error - I'm sure I selected a different Doctype. It's a long weekend in Canada, so I'll play with this at home to reproduce the error. Please keep this one open until at least Tuesday. Thanks! Ed Brandon Webmaster Canadian Public Health Association
Please send me an E-mail address I can send things to.
(In reply to comment #3) > Please send me an E-mail address I can send things to. If you want to send code snippets, this bugzilla (use the attachment feature), or www-validator@w3.org would do. If this is something you'd rather not share publicly, you could send it to me only but I suspect you can just remove whatever private info and send publicly, that would help the transparency in bug tracking.
Ed, ping? Without a test case, I am inclined to close this bug.
Hi ot@w3.org, I think I know what the problem is - it occurs only when testing code snippets. Below is what I tried to validate: -------------------------------- <h2>Resolutions & Motions</h2> <ul> <li><a href="2000s/2006/final06e.pdf">2006 resolutions</a> (PDF: 25k)</li> <li><a href="2000s/2004/final04e.pdf">2004 resolutions</a> (PDF: 74k)</li> <li><a href="2000s/2003/final03e.pdf">2003 resolutions</a> (PDF: 145k )</li> <li><a href="2000s/2002/res2002e.pdf">2002 resolutions</a> (PDF: 313k)</li> <li><a href="2000s/2001/final01e.pdf">2001 resolutions</a> (PDF: 272k)</li> <li><a href="2000s/2000/PPLC_2000_eng.pdf">2000 resolutions</a> (PDF: 201k)</li> <li><a href="1990s/list.htm#1999">1999 resolutions</a></li> <li><a href="1990s/list.htm#1998">1998 resolutions</a></li> <li><a href="2000s/2002/res2002e.pdf">1997 resolutions</a> (PDF: 142k)</li> <li><a href="2000s/2002/res2002e.pdf">1996 resolutions</a> (PDF: 106k)</li> <li><a href="2000s/2002/res2002e.pdf">1995 resolutions</a> (PDF: 109k)</li> <li><a href="archive.htm">Archives</a></li> </ul> -------------------------------- And below are the settings (I had expanded the more options button): -------------------------------- Use Doctype: XHTML 1.0 transitional BUT Validate HTML fragment was selected. It should have ignored the Use Doctype. -------------------------------- I recall that this problem occurred by my bouncing back and forth between testing snippets and complete pages, and not changing the Use Doctype value setting. IO believe this is a simple fix to make, to simply ignore this with code snippets. Hope this helps - Ed
That's right, the full document doctype should be ignored when validating a fragment wrapped in the chosen doctype template. Fixed in CVS, will be in 0.8.6.
Fixed in 0.8.6.