I have a working Javdoc -> PDF system.  It seems like Alexandria would be a
natural place to put it; I would like to donate it.

The system consists of a doclet that outputs the Javadoc as an XML file, and
a stylesheet that converts that file to XSL FO.  You can then use FOP to
render the FO as PDF.  I based the doclet on the XML doclet that is ( around
here somewhere? ); there is no dependency on the Sun XML doclet.

The XSL FO transform works well on my Javadoc, but I would like to see it
run against some other code bases in order to refine it further.

I'm including an example of the PDF output and the Javadoc XML file that
generated it.





andy pruitt


Attachment: gen_javadoc.pdf
Description: Adobe PDF document

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE javadoc PUBLIC "-//APACHE//DTD JavaDoc V0.7//EN"
                         "javadoc-v07draft.dtd">
<javadoc>
    <package name="com.privity.common.exceptions"
        inPackage="com.privity.common.exceptions" qualified-name="com.privity.common.exceptions">
        <class name="ConfigurationException"
            inPackage="com.privity.common.exceptions"
            qualified-name="com.privity.common.exceptions.ConfigurationException"
            extensibility="default" access="public">
            <extends qualified-name="com.privity.common.exceptions.SystemException"/>
            <author name="andy pruitt" email="[EMAIL PROTECTED]"/>
            <constructor name="ConfigurationException" access="public">
                <parameter name="s" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
            </constructor>
            <constructor name="ConfigurationException" access="public">
                <parameter name="s" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
                <parameter name="t" dimension=""
                    qualified-type="java.lang.Throwable" simple-type="Throwable"/>
            </constructor>
        </class>
        <class name="SystemException" inPackage="com.privity.common.exceptions"
            qualified-name="com.privity.common.exceptions.SystemException"
            extensibility="default" access="public">
            <extends qualified-name="java.lang.RuntimeException"/>
            <author name="andy pruitt" email="[EMAIL PROTECTED]"/>
            <constructor name="SystemException" access="public">
                <parameter name="s" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
            </constructor>
            <constructor name="SystemException" access="public">
                <parameter name="s" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
                <parameter name="t" dimension=""
                    qualified-type="java.lang.Throwable" simple-type="Throwable"/>
            </constructor>
            <method access="public" name="getRootException"
                extensibility="default" native="false" synthetic="false"
                static="false" synchronized="false">
                <returns dimension="" qualified-type="java.lang.Throwable" simple-type="Throwable"/>
            </method>
            <method access="public" name="getThrowable" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <returns dimension="" qualified-type="java.lang.Throwable" simple-type="Throwable"/>
            </method>
        </class>
    </package>
    <package name="com.privity.common.utils"
        inPackage="com.privity.common.utils" qualified-name="com.privity.common.utils">
        <description>
            <lead>Documentation for the utils package.</lead>
            <all>Documentation for the utils package. This package is for basic
                utility classes.</all>
        </description>
        <class name="CreationDateComparator"
            inPackage="com.privity.common.utils"
            qualified-name="com.privity.common.utils.CreationDateComparator"
            extensibility="default" access="public">
            <extends qualified-name="java.lang.Object"/>
            <implements qualified-name="java.util.Comparator"/>
            <author name="andy pruitt" email="[EMAIL PROTECTED]"/>
            <constructor name="CreationDateComparator" access="public"/>
            <method access="public" name="compare" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <description>
                    <lead>Compares its two arguments for order.</lead>
                    <all>Compares its two arguments for order.  Returns a
                        negative integer,  zero, or a positive integer as the
                        first argument is less than, equal  to, or greater than
                        the second.<p/>   The implementor must ensure that
                            <tt>sgn(compare(x, y)) ==  -sgn(compare(y, x))</tt>
                        for all <tt>x</tt> and <tt>y</tt>.  (This  implies that
                            <tt>compare(x, y)</tt> must throw an exception if
                        and only  if <tt>compare(y, x)</tt> throws an
                        exception.)<p/>   The implementor must also ensure that
                        the relation is transitive:  <tt>((compare(x, y)&gt;0)
                            &amp;&amp; (compare(y, z)&gt;0))</tt> implies
                            <tt>compare(x, z)&gt;0</tt>.<p/>   Finally, the
                        implementer must ensure that <tt>compare(x, y)==0</tt>
                        implies that <tt>sgn(compare(x, z))==sgn(compare(y,
                        z))</tt> for all  <tt>z</tt>.<p/>   It is generally the
                        case, but <i>not</i> strictly required that
                            <tt>(compare(x, y)==0) == (x.equals(y))</tt>.
                        Generally speaking,  any comparator that violates this
                        condition should clearly indicate  this fact.  The
                        recommended language is &quot;Note: this comparator
                        imposes orderings that are inconsistent with equals.&quot;</all>
                </description>
                <parameter name="o1" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <parameter name="o2" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <returns dimension="" qualified-type="int" simple-type="int"/>
                <throws qualified-type="java.lang.ClassCastException" simple-type="ClassCastException">
                    <description>
                        <lead>if the arguments&apos; types prevent them from
                            being compared by this Comparator.</lead>
                        <all>if the arguments&apos; types prevent them from
                            being compared by this Comparator.</all>
                    </description>
                </throws>
            </method>
        </class>
        <class name="Money" inPackage="com.privity.common.utils"
            qualified-name="com.privity.common.utils.Money"
            extensibility="default" access="public">
            <extends qualified-name="java.lang.Object"/>
            <implements qualified-name="java.lang.Comparable"/>
            <description>
                <lead>Represents an amount of money.</lead>
                <all>Represents an amount of money.  The default currency is USD</all>
            </description>
            <author name="andy pruitt" email="[EMAIL PROTECTED]"/>
            <field name="USD" dimension="" qualified-type="java.lang.String"
                simple-type="String" access="public" extensibility="final"
                static="true" transient="false" volatile="false">
                <description>
                    <lead>American Dollars.</lead>
                    <all>American Dollars.</all>
                </description>
            </field>
            <constructor name="Money" access="public">
                <parameter name="amountInCents" dimension=""
                    qualified-type="long" simple-type="long"/>
            </constructor>
            <constructor name="Money" access="public">
                <parameter name="amountInCents" dimension=""
                    qualified-type="long" simple-type="long"/>
                <parameter name="roundingPolicy" dimension=""
                    qualified-type="short" simple-type="short"/>
            </constructor>
            <constructor name="Money" access="public">
                <parameter name="amountInCents" dimension=""
                    qualified-type="long" simple-type="long"/>
                <parameter name="theCurrency" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
            </constructor>
            <method access="public" name="add" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <parameter name="other" dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
                <returns dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
            </method>
            <method access="public" name="compareTo" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <parameter name="o" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <returns dimension="" qualified-type="int" simple-type="int"/>
                <throws qualified-type="java.lang.ClassCastException" simple-type="ClassCastException">
                    <description>
                        <lead>if the specified object&apos;s type prevents it
                            from being compared to this Object.  Also thrown if
                            the other money  object is of a different currency.</lead>
                        <all>if the specified object&apos;s type prevents it
                            from being compared to this Object.  Also thrown if
                            the other money  object is of a different currency.</all>
                    </description>
                </throws>
            </method>
            <method access="public" name="divideBy" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <description>
                    <lead>Decide on rounding policy here</lead>
                    <all>Decide on rounding policy here</all>
                </description>
                <parameter name="denominator" dimension="" qualified-type="long" simple-type="long"/>
                <returns dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
                <throws qualified-type="java.lang.IllegalArgumentException" simple-type="IllegalArgumentException">
                    <description>
                        <lead>if 0 is passed.</lead>
                        <all>if 0 is passed.</all>
                    </description>
                </throws>
            </method>
            <method access="public" name="equals" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <description>
                    <lead>Indicates whether some other object is &quot;equal
                        to&quot; this one.</lead>
                    <all>Indicates whether some other object is &quot;equal
                        to&quot; this one.  <p/>  The <code>equals</code> method
                        implements an equivalence relation:  &lt;ul&gt;
                        &lt;li&gt;It is <i>reflexive</i>: for any reference
                        value <code>x</code>,      <code>x.equals(x)</code>
                        should return <code>true</code>.  &lt;li&gt;It is
                        <i>symmetric</i>: for any reference values
                        <code>x</code> and      <code>y</code>,
                        <code>x.equals(y)</code> should return
                        <code>true</code> if and only if
                        <code>y.equals(x)</code> returns      <code>true</code>.
                        &lt;li&gt;It is <i>transitive</i>: for any reference
                        values <code>x</code>,      <code>y</code>, and
                        <code>z</code>, if <code>x.equals(y)</code>      returns
                        <code>true</code> and <code>y.equals(z)</code> returns
                        <code>true</code>, then <code>x.equals(z)</code> should
                        return      <code>true</code>.  &lt;li&gt;It is
                        <i>consistent</i>: for any reference values
                        <code>x</code>      and <code>y</code>, multiple
                        invocations of <tt>x.equals(y)</tt>      consistently
                        return <code>true</code> or consistently return
                        <code>false</code>, provided no information used in
                        <code>equals</code> comparisons on the object is
                        modified.  &lt;li&gt;For any non-null reference value
                        <code>x</code>,      <code>x.equals(null)</code> should
                        return <code>false</code>.  &lt;/ul&gt;  <p/>  The
                        <tt>equals</tt> method for class <code>Object</code>
                        implements  the most discriminating possible equivalence
                        relation on objects;  that is, for any reference values
                        <code>x</code> and <code>y</code>,  this method returns
                        <code>true</code> if and only if <code>x</code> and
                        <code>y</code> refer to the same object
                        (<code>x==y</code> has the  value <code>true</code>).</all>
                </description>
                <see qualified-type="java.lang.Boolean" method="hashCode"/>
                <see qualified-type="java.util.Hashtable"/>
                <parameter name="obj" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <returns dimension="" qualified-type="boolean" simple-type="boolean"/>
            </method>
            <method access="public" name="getAtomicAmount"
                extensibility="default" native="false" synthetic="false"
                static="false" synchronized="false">
                <returns dimension="" qualified-type="long" simple-type="long"/>
            </method>
            <method access="public" name="getCurrency" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <returns dimension="" qualified-type="java.lang.String" simple-type="String"/>
            </method>
            <method access="public" name="hashCode" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <description>
                    <lead>Returns a hash code value for the object.</lead>
                    <all>Returns a hash code value for the object. This method
                        is  supported for the benefit of hashtables such as
                        those provided by  <code>java.util.Hashtable</code>.
                        <p/>  The general contract of <code>hashCode</code> is:
                        &lt;ul&gt;  &lt;li&gt;Whenever it is invoked on the same
                        object more than once during      an execution of a Java
                        application, the <tt>hashCode</tt> method      must
                        consistently return the same integer, provided no
                        information      used in <tt>equals</tt> comparisons on
                        the object is modified.      This integer need not
                        remain consistent from one execution of an
                        application to another execution of the same
                        application.  &lt;li&gt;If two objects are equal
                        according to the <tt>equals(Object)</tt>      method,
                        then calling the <code>hashCode</code> method on each of
                        the two objects must produce the same integer result.
                        &lt;li&gt;It is <em>not</em> required that if two
                        objects are unequal      according to the <see
                            qualified-type="java.lang.Object" method="equals"/>
                        method, then calling the <tt>hashCode</tt> method on
                        each of the      two objects must produce distinct
                        integer results.  However, the      programmer should be
                        aware that producing distinct integer results      for
                        unequal objects may improve the performance of
                        hashtables.  &lt;/ul&gt;  <p/>  As much as is reasonably
                        practical, the hashCode method defined by  class
                        <tt>Object</tt> does return distinct integers for
                        distinct  objects. (This is typically implemented by
                        converting the internal  address of the object into an
                        integer, but this implementation  technique is not
                        required by the  Java&lt;font
                        size=&quot;-2&quot;&gt;<sup>TM</sup>&lt;/font&gt;
                        programming language.)</all>
                </description>
                <see qualified-type="java.lang.Object" method="equals"/>
                <see qualified-type="java.util.Hashtable"/>
                <returns dimension="" qualified-type="int" simple-type="int"/>
            </method>
            <method access="public" name="isSameCurrency"
                extensibility="default" native="false" synthetic="false"
                static="false" synchronized="false">
                <parameter name="other" dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
                <returns dimension="" qualified-type="boolean" simple-type="boolean"/>
            </method>
            <method access="public" name="multiply" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <parameter name="multiplier" dimension="" qualified-type="long" simple-type="long"/>
                <returns dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
            </method>
            <method access="public" name="subtract" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <parameter name="lessThisMuch" dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
                <returns dimension=""
                    qualified-type="com.privity.common.utils.Money" simple-type="Money"/>
            </method>
            <method access="public" name="toString" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <returns dimension="" qualified-type="java.lang.String" simple-type="String"/>
            </method>
        </class>
        <class name="NameComparator" inPackage="com.privity.common.utils"
            qualified-name="com.privity.common.utils.NameComparator"
            extensibility="default" access="public">
            <extends qualified-name="java.lang.Object"/>
            <implements qualified-name="java.util.Comparator"/>
            <description>
                <lead><p/>This Comparator allows you to sort any objects that
                    have a name.</lead>
                <all><p/>This Comparator allows you to sort any objects that
                    have a name.  <p/>This class is especially useful   for
                    sorting entity beans.</all>
            </description>
            <author name="andy href pruitt" email="[EMAIL PROTECTED]"/>
            <see qualified-type="com.privity.common.markers.Named"/>
            <see qualified-type="java.util.Comparator"/>
            <see qualified-type="com.privity.common.exceptions.SystemException" method="getRootException"/>
            <see qualified-type="com.privity.common.utils.CreationDateComparator"/>
            <constructor name="NameComparator" access="public"/>
            <method access="public" name="compare" extensibility="default"
                native="false" synthetic="false" static="false" synchronized="false">
                <description>
                    <lead>Compares its two arguments for order.</lead>
                    <all>Compares its two arguments for order.  Returns a
                        negative integer,  zero, or a positive integer as the
                        first argument is less than, equal  to, or greater than
                        the second.<p/>   The implementor must ensure that
                            <tt>sgn(compare(x, y)) ==  -sgn(compare(y, x))</tt>
                        for all <tt>x</tt> and <tt>y</tt>.  (This  implies that
                            <tt>compare(x, y)</tt> must throw an exception if
                        and only  if <tt>compare(y, x)</tt> throws an
                        exception.)<p/>   <see
                            qualified-type="com.privity.common.exceptions.SystemException">a
                            random link </see>
                        <see
                            qualified-type="com.privity.common.exceptions.ConfigurationException"
                            method="getMessage">another link  </see>
                        <see
                            qualified-type="com.privity.common.utils.NameComparator"
                            method="compare">third link </see>  The implementor
                        must also ensure that the relation is transitive:
                            <tt>((compare(x, y)&gt;0) &amp;&amp; (compare(y,
                        z)&gt;0))</tt> implies  <tt>compare(x, z)&gt;0</tt>.<p/>
                        Finally, the implementer must ensure that <tt>compare(x,
                        y)==0</tt>  implies that <tt>sgn(compare(x,
                            z))==sgn(compare(y, z))</tt> for all
                        <tt>z</tt>.<p/>   It is generally the case, but
                        <i>not</i> strictly required that  <tt>(compare(x,
                            y)==0) == (x.equals(y))</tt>.  Generally speaking,
                        any comparator that violates this condition should
                        clearly indicate  this fact.  The recommended language
                        is &quot;Note: this comparator  imposes orderings that
                        are inconsistent with equals.&quot;</all>
                </description>
                <parameter name="o1" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <parameter name="o2" dimension=""
                    qualified-type="java.lang.Object" simple-type="Object"/>
                <returns dimension="" qualified-type="int" simple-type="int"/>
                <throws
                    qualified-type="com.privity.common.exceptions.SystemException" simple-type="SystemException">
                    <description>
                        <lead>if a communication error occurs</lead>
                        <all>if a communication error occurs</all>
                    </description>
                </throws>
                <throws qualified-type="java.lang.ClassCastException" simple-type="ClassCastException">
                    <description>
                        <lead>if the arguments&apos; types prevent them from
                            being compared by this Comparator.</lead>
                        <all>if the arguments&apos; types prevent them from
                            being compared by this Comparator.</all>
                    </description>
                </throws>
            </method>
        </class>
        <class name="Sequence" inPackage="com.privity.common.utils"
            qualified-name="com.privity.common.utils.Sequence"
            extensibility="default" access="public">
            <extends qualified-name="java.lang.Object"/>
            <description>
                <lead>Provides the next available value for database ids.</lead>
                <all>Provides the next available value for database ids.</all>
            </description>
            <author name="andy pruitt" email="[EMAIL PROTECTED]"/>
            <constructor name="Sequence" access="public"/>
            <method access="public" name="getSequence" extensibility="default"
                native="false" synthetic="false" static="true" synchronized="false">
                <description>
                    <lead>Get a new key value.</lead>
                    <all>Get a new key value. Guarranteed unique.</all>
                </description>
                <parameter name="tableName" dimension=""
                    qualified-type="java.lang.String" simple-type="String"/>
                <returns dimension="" qualified-type="int" simple-type="int"/>
                <throws
                    qualified-type="com.privity.common.exceptions.SystemException" simple-type="SystemException">
                    <description>
                        <lead>if an error occurs retrieving the next value</lead>
                        <all>if an error occurs retrieving the next value</all>
                    </description>
                </throws>
            </method>
        </class>
    </package>
</javadoc>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to