#41 Let DOM Save output be XHTML

open
nobody
2
2009-10-15
2009-10-14
No

ViewSourceWith is an excellent tool!
Using a short shell script as "editor", it can be used to easily validate script generated (X)HTML output using the W3C validator.
It could even help do validate the source after processing the document.write() JavaScript calls.
But unfortunately the DOM Save output does not validate even for valid sources.
It would be a nice feature if this could be changed.
Probably there are only two points in the DOM Save output that prohibit successful validation:
1st: "<!DOCTYPE HTML PUBLIC ..." should be "<!DOCTYPE html PUBLIC ..."
2nd: "<meta ...>" should be "<meta ... />" (same with all self-closing elements like <img .../>, <input ... /> etc.)
Thank you very much!

Discussion

  • Davide Ficano

    Davide Ficano - 2009-10-15
    • milestone: 484023 -->
     
  • Rainer Perske

    Rainer Perske - 2009-10-15

    Thanks for your response!

    Yes, the standard VSW output works perfectly for me and is always the first file sent to the validator.

    And yes, you have understood me correctly :-)

    But indeed, I don't agree yet :-)

    My purpose is to check the source fragments inserted by document.write(), too; that would be done best after JavaScript execution but before DOM parsing. (The validator does not check these fragments because it does not execute the JavaScript commands.)

    Unfortunately there is (probably) no way at all to extract from Firefox the HTML source as it appears at that (virtual) stage of processing. But at least the source fragments after DOM parsing are available. Some mistakes get hidden by the DOM processing, but other mistakes can be found even then, e.g. typing mistakes in element names like with document.write('<stromg>');

    (For now, I've written a small helper that makes the two described changes to the DOM Save output before sending it to the validator. That solution works perfectly for me, thus I lower the priority of this feature request.)

    Thank you very much!

     
  • Rainer Perske

    Rainer Perske - 2009-10-15
    • priority: 5 --> 2
     
  • Rainer Perske

    Rainer Perske - 2009-10-15

    Thanks for your response!

    Yes, the standard VSW output works perfectly for me and is always the first file sent to the validator.

    And yes, you have understood me correctly :-)

    But indeed, I don't agree yet :-)

    My purpose is to check the source fragments inserted by document.write(), too; that would be done best after JavaScript execution but before DOM parsing. (The validator does not check these fragments because it does not execute the JavaScript commands.)

    Unfortunately there is (probably) no way at all to extract from Firefox the HTML source as it appears at that (virtual) stage of processing. But at least the source fragments after DOM parsing are available. Some mistakes get hidden by the DOM processing, but other mistakes can be found even then, e.g. typing mistakes in element names like with document.write('<stromg>');

    (For now, I've written a small helper that makes the two described changes to the DOM Save output before sending it to the validator. That solution works perfectly for me, thus I lower the priority of this feature request.)

    Thank you very much!

     
  • Davide Ficano

    Davide Ficano - 2009-10-16

    Now it is more clear what you need and it is a very interesting feature.

    I've some little technical doubt about implementation but I'll try to do something.

    When I start to make some experiment I will alert you using this tracker and I hope you should help me with testing :P

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks