Why does Javadoc generate non-compliant XHTML?

∥☆過路亽.° 提交于 2019-12-09 06:25:33

问题


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


回答1:


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.




回答2:


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?



来源:https://stackoverflow.com/questions/267140/why-does-javadoc-generate-non-compliant-xhtml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!