Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuse
AppFuse_it
AppFuse_jp
AppFuse_zh
DevelopmentEnvironme...
DevelopmentEnvironme...
DevelopmentEnvironme...
DevelopmentEnvironme...
Downloads
LeftMenu
...and 14 more




JSPWiki v2.2.33

[RSS]


Hide Menu

StrutsResume


Difference between version 32 and version 31:

At line 3 added 90 lines.
!!__2003.10.30__ - Thank you number 2 for the Doclet King
Now that the initial thank you is out of the way, here is Thank You #2. I think you should be declared "Doclet King" for the way you have embraced doclet-related software (probably Erik Hatcher too). In any case, since you love doclets sooo much (xdoclet, junitdoclet, etc.), let me introduce you to [dbdoclet (DocBook Doclet)|http://www.dbdoclet.org/]. This doclet creates DocBook output from Java source documentation (javadoc comments). One of the most common uses for this DocBook output is to convert it into PDF. So, instantly (within reason) you can have PDF javadoc documentation.
Here's what you need to add to your {{build.xml}} (my {{build.xml}} is slightly different from {{struts-resume}}/{{appfuse}}, but you'll figure it out).
----
A portion of my {{build.xml}} __watch out for packagenames="ca.*" (adjust accordingly)__
----
{{{
<!-- ==================== pdfdoc Target ============================= -->
<target name="pdfdoc" depends="compile"
description="Create PDF documentation">
<mkdir dir="${dist.apidocs}"/>
<!-- === docbook === -->
<echo message="Creating docbook"/>
<javadoc sourcepath="${src.dir};${gen.dir}"
destdir="${dist.apidocs}"
packagenames="ca.*">
<classpath refid="compile.classpath"/>
<doclet name="com.mf.doclet.docbook.DocBookDoclet"
path="${dbdoclet.dir}/doclet/lib/dbdoclet.jar">
<param name="-properties" value="dbdoclet.properties"/>
</doclet>
</javadoc>
<!-- === convert to Full XML with XIncluder === -->
<echo message="Running XIncluder"/>
<java classname="com.elharo.xml.xinclude.SAXXIncluder"
failonerror="yes" dir="${dist.apidocs}"
output="${dist.apidocs}/reference-full.xml" fork="yes">
<classpath refid="dbdoclet.xincluder.classpath"/>
<arg line="reference.xml"/>
</java>
<!-- === filter fo.xsl === -->
<copy tofile="${dist.apidocs}/fo.xsl" file="${metadata.dir}/xsl/fo.xsl">
<filterset>
<filter token="DBDOCLET_HOME" value="${dbdoclet.dir}"/>
</filterset>
</copy>
<!-- === convert to pdf === -->
<echo message="Converting to PDF"/>
<java classname="org.apache.fop.apps.Fop"
failonerror="yes" dir="${dist.apidocs}" fork="yes">
<classpath refid="dbdoclet.fop.classpath"/>
<arg line="-xml reference-full.xml"/>
<arg line="-xsl fo.xsl"/>
<arg line="-pdf reference.pdf"/>
</java>
</target>
}}}
----
This portion of {{build.xml}} is dependent on the following {{metadata/xsl/fo.xsl}} file
----
{{{
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="#default"
>
<xsl:import href="file:@DBDOCLET_HOME@/tidbit/docbook/xsl/fo/docbook.xsl"/>
<xsl:param name="insert.xref.page.number">yes</xsl:param>
<xsl:param name="title.margin.left">0pt</xsl:param>
<xsl:param name="use.extensions">1</xsl:param>
<xsl:param name="tablecolumns.extension">0</xsl:param>
<xsl:param name="generate.index">1</xsl:param>
<xsl:param name="admon.graphics">1</xsl:param>
<xsl:param name="admon.graphics.path">@DBDOCLET_HOME@/tidbit/docbook/xsl/image
s/</xsl:param>
<xsl:param name="section.autolabel">1</xsl:param>
<xsl:param name="fop.extensions">1</xsl:param>
<xsl:param name="draft.watermark.image"></xsl:param>
<xsl:param name="section.label.includes.component.label">1</xsl:param>
</xsl:stylesheet>
}}}
I am currently trying to modify the sources for dbdoclet to add the capability of handling custom tags. Right now xdocle-related custom tags just disappear into thin air. I have a working prototype but will wait to hear from the upstream author before making it available.
Any questions, drop me a line.
Regards,\\
--\\
Haroon Rafique [email protected] (reverse the domain to send email)

Back to StrutsResume, or to the Page History.