New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch which turns doxygen HTML4.01 output in XHTML 1.0 (Origin: bugzilla #519886) #2852

Open
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status REOPENED severity normal in component general for ---
Reported in version 1.6.1-SVN on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2008-03-02 12:43:22 +0000, Francesco Montorsi wrote:

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.

On 2008-03-02 12:46:41 +0000, Francesco Montorsi wrote:

Created attachment 106378
the patch taken against doxygen trunk

On 2008-03-02 12:51:28 +0000, Francesco Montorsi wrote:

Created attachment 106379
archive containing the DTDs and the script used to validate examples' XHTML

On 2008-03-02 12:53:21 +0000, Francesco Montorsi wrote:

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.

On 2008-12-27 14:22:57 +0000, Dimitri van Heesch wrote:

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.

On 2009-05-17 19:07:03 +0000, Dimitri van Heesch wrote:

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% :-)

On 2009-05-17 20:26:46 +0000, Francesco Montorsi wrote:

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!

On 2009-08-20 10:13:16 +0000, Dimitri van Heesch wrote:

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).

On 2009-08-30 20:49:42 +0000, Francesco Montorsi wrote:

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 &raquo entity:

Index: src/definition.cpp
===================================================================
--- src/definition.cpp  (revisione 707)
+++ src/definition.cpp  (copia locale)
@@ -1240,7 +1240,7 @@
     else
     {
       ol.writeString(" ");
-      ol.writeString("&raquo");
+      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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment