GNOME Bugzilla – Bug 519886
patch which turns doxygen HTML4.01 output in XHTML 1.0
Last modified: 2018-07-30 10:28:54 UTC
The attached patch implements many changes to doxygen sources in order to support the generation of XHTML output instead of the old HTML4.01. Most of these changes are discussed in thread "strategies for XHTML support" in doxygen-develop mailing list. Unfortunately there is still much to do, mostly about mismatched tags pairing, specially in the table generation. I post the patch here even if still not complete because I've tried to fix the remaining issues without much success and maybe people which is more used to Doxygen sources, could complete it.
Created attachment 106378 [details] [review] the patch taken against doxygen trunk
Created attachment 106379 [details] archive containing the DTDs and the script used to validate examples' XHTML
I've attached also an archive containing the DTDs and the script I used to validate the XHTML generated by the doxygen's examples. At first, a log of more than 4000 lines was generated. I managed to shrink it down to 700 lines.
This bug report had the version set to "latest". Since this is a moving target I changed it to 1.5.7.1. If you happen to see that the problem is fixed in 1.5.8, then please close it.
Hi Francesco, I'm currently working on getting XHTML support in. I've used your patch as a starting point, but it turned out to be only 10% of the work (it was useful nevertheless). Don't worry though, I'm pretty close to finishing the other 90% :-)
Hi, (In reply to comment #5) > I'm currently working on getting XHTML support in. I've used your patch as a > starting point, but it turned out to be only 10% of the work yes, I know :) > (it was useful nevertheless). good! > Don't worry though, I'm pretty close to finishing the other 90% :-) great! I thought that XHTML output was not something Doxygen was interested to... but now that I know I was wrong, that's very good news! Looking forward to see XHTML output for Doxygen!
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.6.0. Please verify if this is indeed the case and reopen the bug if you think it is not fixed (include any additional information that you think can be relevant).
Hi Dimitri, I took some time to test the new output of Doxygen 1.6.1 and it's really a LOT improved in terms of XHTML-correctness over old versions! Great work! However I've found some problems on a rather large project which uses Doxygen (which is wxWidgets btw). Here are the problems which causes some pages of the doxygen HTML output to be invalid XHTML: 1) typo in » entity: Index: src/definition.cpp =================================================================== --- src/definition.cpp (revisione 707) +++ src/definition.cpp (copia locale) @@ -1240,7 +1240,7 @@ else { ol.writeString(" "); - ol.writeString("»"); + ol.writeString("»"); ol.writeString(" "); } } 2) empty table for file references without contents. If you have a documentation header which, for example, contains only \page commands to generate auxiliary doc pages, doxygen will still generate a "File reference" page for that header which contains an empty table. E.g. in my specific case I see HTML files like this: ... <div class="contents"> <h1>aui.h File Reference</h1><table border="0" cellpadding="0" cellspacing="0"> </table> </div> ... the problem is that for XHTML you cannot have a <table></table> pair. Tables need to be non-empty... I don't know if it's easier to modify doxygen so that it doesn't generate the <table> at all, or rather if it should just add a dummy content instead (probably a <tr><td/></tr> would do the trick). 3) the summary pages for doxy groups are not valid XHTML because they always contain some markup like: ... <h1>The First Group</h1> ... <p><tr>...</tr></p> The problem here is that for the <tr> to be valid, it needs to be embedded into a <table> tag... For an example where this problem occurs, see examples/group/html/group__group1.html. There are some more problems with XHTML output but for now these errors seem to generate most of the logged errors I see from the validator. Btw I think that adding to doxygen SVN the "dtd" folder and the "validate_xhtml.sh" script which I included in the .tar.gz archive a while ago (or something like that), would greatly help in spotting problems with doxygen's XHTML output and to avoid breakage of correct output in the future... Last, please let me know if you prefer to have different bug entries for the various defects correlated to XHTML output or rather if I should use this entry as placeholder. THanks!
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!