Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Javadoc generate non-compliant XHTML?

I just pasted some generated javadoc into an eclipse project, to discover none of the HTML is compliant.

There is even cases of closing tags that were never opened.

Is there some way to fix this? Maybe a "be compliant" option...

like image 266
Dean Rather Avatar asked Nov 05 '08 23:11

Dean Rather


2 Answers

After some googling, I discovered XHTML Doclet 0.4.

XHTML Doclet is a standards-compliant alternative to the Javadoc standard HTML doclet. The project revises the document structure to exclude outdated tags and inline styles, creates valid XHTML markup, and provides better hooks for more flexible CSS manipulation.

Looks like someone made a plugin.

Any better options?

Edit: Here's the plugin's Official page as linked to by Sun's Javadoc FAQ.

like image 190
Dean Rather Avatar answered Oct 12 '22 05:10

Dean Rather


The short answer is that JavaDocs predate XHTML.

There was an interesting thread on the Java Posse group about this recently that you might find interesting: why is javadoc stuck in 1997?

like image 23
dshaw Avatar answered Oct 12 '22 06:10

dshaw