trouble with <table>
I'm trying to use the <table xxx=yyy> <tr xxx=yyy> <th xxx=yyy> <td xxx=yyy>.
In each summary "package for class" or "methods" the /tags are not properly done. The produced javadoc become unusable.
How can i format my class/interface and method comment without alteration on the sumary section ?
Thx
[349 byte] By [
chfaurea] at [2007-9-28 15:16:00]

The </[TAG]> are correctly closed !
Take as a sample the following classes Dummy and Dummy1. Hope this help !
Thanks for any response !!
File src/test/javadoc/Dummy.java
/*
* Dummy.java for project JAVADOCTEST
* Created on 19 mars 2003
*/
package tests.javadoc;
/**
* javadoc test !
*
* <hr>
* <i>Example :</i>
* <table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
* <tr><td bgcolor="#FFFFEF"><pre><code>
*static public void main(String args[]){
*Dummy toIllustrate = new Dummy();
*// call a dummy method
*toIllustrate.method();
*}
* </code></pre></td></tr>
* </table>
*
* <hr>
* <i>History :</i>
* <table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
* <tr bgcolor="yellow" color="blue">
*<th width=120 >Version</th><th width=100>Date</th><th >Descriptions</th>
* </tr>
* <tr bgcolor="#DEDEFF" ><td>1.0</td><td>19 mars 2003</td><td>Creation</td></tr>
* </table>
*
* <b>Copyright ?2003 <i>XXX XXXX</i></b> All Rights Reserved.
*
* @author Ch. FAURE
* @version 1.0 (19 mars 2003)
*/
public class Dummy {
/**
* Some Comments
*<table border=0> <tr><td>XXX XXX XXX</td></tr></table>
*/
public void method(){
// doNothing
}
/**
* Some Comments
*<table border=0> <tr><td>XXX XXX XXX</td></tr></table>
*/
static public void main(String args[]){
Dummy toIllustrate = new Dummy();
// call a dummy method
toIllustrate.method();
}
}
-
File src/test/javadoc/Dummy1.java
/*
* Dummy1.java for project JAVADOCTEST
* Created on 19 mars 2003
*/
package tests.javadoc;
/**
* javadoc test !
*
* <hr>
* <i>Example :</i>
* <table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
* <tr><td bgcolor="#FFFFEF"><pre><code>
*static public void main(String args[]){
*Dummy toIllustrate = new Dummy();
*// call a dummy method
*toIllustrate.method();
*}
* </code></pre></td></tr>
* </table>
*
* <hr>
* <i>History :</i>
* <table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
* <tr bgcolor="yellow" color="blue">
*<th width=120 >Version</th><th width=100>Date</th><th >Descriptions</th>
* </tr>
* <tr bgcolor="#DEDEFF" ><td>1.0</td><td>19 mars 2003</td><td>Creation</td></tr>
* </table>
*
* <b>Copyright ?2003 <i>XXX XXXX</i></b> All Rights Reserved.
*
* @author Ch. FAURE
* @version 1.0 (19 mars 2003)
*/
public class Dummy1 {
/**
* Some Comments
*<table border=0> <tr><td>XXX XXX XXX</td></tr></table>
*/
public void method(){
// doNothing
}
/**
* Some Comments
*<table border=0> <tr><td>XXX XXX XXX</td></tr></table>
*/
static public void main(String args[]){
Dummy toIllustrate = new Dummy();
// call a dummy method
toIllustrate.method();
}
}
..........................................
It looks like something funny is going on in Javadoc. It should
pass those tables through just fine, but is not. I believe there
is a problem with javadoc trying to determine the end of the first
sentence and it is deleting the <tr> and <td> tags from the
first sentence, so the table looks like this:
<table border=0> XXX XXX XXX</td>
Do you want these tables to appear in the method summaries?
In other words, did you intentionally make them part of the
first sentence? If you put a period at the end of "Some Comments."
as follows, then the tables appear correctly.
/**
* Some Comments.
*<table border=0> <tr><td>XXX XXX XXX</td></tr></table>
*/
If you really want tables to appear in the first sentence,
please submit a bug as described at:
http://java.sun.com/j2se/javadoc/faq/index.html#submitbugs
-Doug Kramer
javadoc team
Okay, finally i encoutered this problem as you all guys, but i found a good solution i geuss ;). Well using the -tag option in the javadoc tool.
here is the scenario :
I created the table in the javadoc using the usual <table>...</table>
and i putted it in the class description, but when generating the javadocs i found an awfull layout in the package description since my table and the table created by the javadoc collapsed together. The solution is easy, in the case that i wanted this table to apear in the class description only but not the package description i created a custom tag, let name it @table and when runnig the javadoc i passed this argument: -tag table:t:"
"
Your smart guys so know how to procede when you want to input this tag in a method, field or constructor javadoc :)