My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 539: W3C validation of generated HTML
10 people starred this issue and may be notified of changes. Back to list
 
Reported by o...@yadan.net, Mar 20, 2008
Dynamic applications are hard to validate because much of their html is
generated  by javascript dom manipulation.

FireBug can recreate the html from the dom (right-click html element in the
html tree and click copy-html). 

it would be great if there was an option to send the output of the copy
straight to the w3c validator for validation.
 
Mar 21, 2008
Project Member #1 johnjbar...@johnjbarton.com
This would make a great Firebug extension. 
Labels: -Type-Defect Type-Enhancement html
Mar 21, 2008
#2 o...@yadan.net
and an even greater core enhancement :)
Apr 29, 2009
Project Member #3 johnjbar...@johnjbarton.com
(No comment was entered for this change.)
Labels: extension-request
Aug 20, 2009
#4 fearph...@gmail.com
Is it a valid point that one extension already does this and very well?

http://users.skynet.be/mgueury/mozilla/

Does it need to be duplicated?
Sep 20, 2009
#5 fearph...@gmail.com
FYI, there is another request for duplicating Web Dev Toolbar functionality in  Issue 
271 . It is not similar or related to this ticket. The only thing they have in common 
is the functionality already exists in the linked plugin from comment 4.
Sep 21, 2009
#6 o...@yadan.net
last time I tried the html validatr, I noticed that there is a bug that prevents it
from being useful. I contacted the author which said it's a firefox bug. 
firebug was not effected by the bug because it implements it's own dom->xml
transformation (getElementXML in
http://fbug.googlecode.com/svn/trunk/content/firebug/lib.js)

not sure what the current status is, but if the problem still exists, there is NO
good solution that can validate generated HTML.

Sep 21, 2009
#7 fearph...@gmail.com
There is an option in the HTML Validator's right click menu has an option called 
"Validate Now (HTML Body after JavaScript Execution)" -- not very succinct but 
functional to my knowledge.

Screenshot attached.
tidy80_browser.png
30.9 KB   View   Download
Sep 21, 2009
#8 o...@yadan.net
try to validate this perfectly valid html with the html validator, last I checked
this did not validate.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
</head>
<body>
    <br/>
</body>
</html>
Sep 21, 2009
#9 fearph...@gmail.com
Who said that was valid html? If you pass no doctype, it defaults the looser xhtml 
transitional (not html). For reference, html generally does not have xhtml 
namespaces nor does it close single tags with forward slashes.

http://validator.w3.org/#validate_by_input+with_options

If you use the html parser, it validates with a warning about the missing doctype 
and the following message:
"Info: Document content looks like XHTML 1.0 Transitional"

With the SGML parser (more strict and generally used for XHTML), it fails as it 
should. No doctype == not valid. Serial just tests SGML and if that passes then the 
HTML parser.
Sep 21, 2009
#10 o...@yadan.net
my mistake, bad copy paste. try this one:
normally it passes, but it fails (at least on ff3) when using the validate now option.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
</head>
<body>
    <br/>
</body>
</html>

Sep 21, 2009
#11 fearph...@gmail.com
Valid html. Invalid xhtml. Inline is the same as "check now". You know you can check 
these yourself:

https://addons.mozilla.org/en-US/firefox/addon/249


Sep 21, 2009
#12 o...@yadan.net
that xhtml validates fine, but when I use "validate now" it fails because the <br/>
is transformed into a <br>.
see attached screenshots.

normal.png
55.4 KB   View   Download
validate-now.png
45.6 KB   View   Download
Sep 21, 2009
Project Member #13 johnjbar...@johnjbarton.com
According to  issue 908  and  issue 1252 , the HTMLValidator extension interferes with
Firebug.
Sep 21, 2009
#14 o...@yadan.net
I sense that this enhancement request has gone to hell.
I am not interested in using the html validator, since it's not working very well for
this.
the enhancement request is a request to add the functionality of validating dynamic
html to firebug. somehow it has became a discussion about the problems of html validator.
Sep 21, 2009
#15 fearph...@gmail.com
My point from the beginning was whether it was worth implementing something from 
another extension. Would it be more beneficial to fix the problems identified in 
Comment 13 or would it be better to duplicate the functionality of another addon? 
That decision is not up to me but I wanted to share my opinion that I don't deem it 
worthwhile.

In  Issue 271 , someone is requesting functionality from the web developer toolbar. It 
seems like a slipper slope. Where do you draw the line? How many extensions should/
will you duplicate?
Jul 1, 2010
#16 sebastia...@gmx.de
Note, that Web Developer is also implementing a display for the source after JavaScript execution (without validation), to find at View Source->View Generated Source.
The only reason why HTML resp. SGML validation shouldn't be part of the core of Firebug is the size of the validator. Packed HTML Validator is already 2.7 MB big, which would speak for a Firebug extension instead of implementing this into the core of Firebug.
Of course the best way would then be, that Marc Gueury (developer of HTML Validator) would create this extension. And at http://www.htmlpedia.org/phpBB/viewtopic.php?f=10&t=190 you can read what he's saying to this (my comment on this is at the end).
Jul 2, 2010
Project Member #17 odva...@gmail.com
(No comment was entered for this change.)
Cc: odvarko
Jul 2, 2010
#18 o...@yadan.net
my initial request was very simple and had nothing to do with web-developer:
simply to post the generated html to the w3c validator (http://validator.w3.org/).
this will provide the most important functionality without increasing the size of firebug.
Jul 24, 2011
#19 sebastia...@gmx.de
Sorry for the pretty late reply.
Rethinking this we could add an option to send the contents of the HTML panel to the W3C validator as this is a part of the HTML debugging process.
The same would of course apply to CSS validation.

Non-the-less with HTML validator (via Advanced > Online W3c HTML Validator...) and Web Developer (via Tools > Validate HTML) there are already two possibilities to achieve this.
Status: Triaged
Cc: sebastia...@gmx.de
Mar 23, 2013
Project Member #20 sebastia...@gmail.com
(No comment was entered for this change.)
Cc: sebastia...@gmail.com
Mar 23, 2013
Project Member #21 sebastia...@gmail.com
(No comment was entered for this change.)
Summary: W3C validation of generated HTML (was: Enhancement : Enable easy w3c validation of generated html.)
Cc: -sebastia...@gmx.de
Sign in to add a comment

Powered by Google Project Hosting