#1903 Generated Report: Inaccurate DOCTYPE

Branch_+_Trunk
closed-fixed
1
2009-05-08
2009-04-29
Liisachan
No

WinMerge version: 2.13.6

The Report (Tools - Generate Report...) identifies itself as
HTML 4.0 Transitional, but the DOCTYPE is inaccurate.
HTML 4.01 is recommended.

Current:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">

Which will get this warning from the Validaterion Service:
"Mismatch between Public and System identifiers in the DOCTYPE declaration
This document uses an inconsistent DOCTYPE declaration.
The Public Identifier -//W3C//DTD HTML 4.0 Transitional//EN
declares the HTML 4.0 Transitional document type,
but the associated System Identifier
http://www.w3.org/TR/REC-html40/loose.dtd
does not match this document type."

It can be easily fixed by updating the DOCTYPE like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Almost like a cosmetic problem, but technically the current one is incorrect.

See:
http://www.w3.org/QA/2002/04/valid-dtd-list.html
http://en.wikipedia.org/wiki/Document_Type_Declaration

Discussion

  • Liisachan

    Liisachan - 2009-04-29

    WinMerge configuration log

     
  • Liisachan

    Liisachan - 2009-04-29

    Report sample

     
  • Liisachan

    Liisachan - 2009-04-29

    Getting this Warning

     
  • Liisachan

    Liisachan - 2009-04-29

    Fixed sample - No more warning

     
  • Liisachan

    Liisachan - 2009-04-29

    Report sample - Can be fixed like this

     
  • Liisachan

    Liisachan - 2009-04-29
    • priority: 5 --> 1
     
  • Kimmo Varis

    Kimmo Varis - 2009-04-29
    • assigned_to: nobody --> gerundt
     
  • Kimmo Varis

    Kimmo Varis - 2009-04-29

    Tim, do you want to handle this?

     
  • Tim Gerundt

    Tim Gerundt - 2009-05-08

    Ok, this problem is easy to fix!

    Index: MergeDoc.cpp

    --- MergeDoc.cpp (Revision 6717)
    +++ MergeDoc.cpp (Arbeitskopie)
    @@ -2906,8 +2906,8 @@

    String header = 
        Fmt\(
    

    - _T("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n")
    - _T("\t\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n")
    + _T("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n")
    + _T("\t\"http://www.w3.org/TR/html4/loose.dtd\">\n")
    _T("<html>\n")
    _T("<head>\n")
    _T("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n")

    Btw, the DOCTYPE from the Folder Compare HTML report is correct.

     
  • Tim Gerundt

    Tim Gerundt - 2009-05-08
    • milestone: --> Branch_+_Trunk
     
  • Tim Gerundt

    Tim Gerundt - 2009-05-08

    Committed to SVN:

    * In Revision 6718 (Trunk)
    * In Revision 6719 (Branch R2_12)

    Thank you for the bug report! :)

     
  • Tim Gerundt

    Tim Gerundt - 2009-05-08
    • status: open --> closed-fixed
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks