You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Br...@alltel.com on 2001/07/12 22:36:14 UTC
generation of taglib doc
Can someone tell me how the documentation for the Struts taglibs
(http://jakarta.apache.org/struts/struts-html.html) is currently
generated? I first assumed that this doc was generated from the .tld
files via XSLT or some other method. However, the tld doesn't contain
all of the necessary information, i.e."description", to generate those
pages. I'm wanting to incorporate the changes I've made to the Struts
tags into the doc for my company, but don't want to spend a lot of time
writing/maintaining HTML. I assume I could add my own tags to the .tld
files for "description" and whatever else I needed, then write some XSL
to display it -- but I would like to know how others are approaching
this issue. Also, I remember hearing at Java One that this type of doc
generation will be better facilitated in JSP 1.2 and after looking at
the JSP 1.2 PFD2, it looks like several tags have been added to the .tld
files, one being "description". I'd appreciate any suggestions.
Thanks!
Brennan O'Shea
Re: generation of taglib doc
Posted by Roland Huss <Ro...@consol.de>.
<Br...@alltel.com> writes:
> Can someone tell me how the documentation for the Struts taglibs
> (http://jakarta.apache.org/struts/struts-html.html) is currently
> generated? I first assumed that this doc was generated from the .tld
> files via XSLT or some other method.
Nearly correct, but the source documents are not the *.tld files, but
the corresponding *.xml files found in $STRUTS/doc
(e.g. struts-html.xml). Hence, if you like to extend a taglib it is
recommended that you adapt those XML docs and use
$STRUTS/doc/stylesheets/tld.xsl to generate the taglib descriptors and
$STRUTS/doc/stylesheets/struts.xsl to generate the documentation.
Or even better you could use the attached Java class to merge your
extensions into the original Struts tags documents for making update
of Struts less painful. You could use an ant task like
<!-- Generate combined taglib docs -->
<target name="gen.xtaglib.docs" depends="compile.ext">
<mkdir dir="${build.work.taglibs}"/>
<java classname="org.strutsx.util.build.MergeStrutsTaglibDoc">
<arg line="${src.doc}/struts/struts-html.xml
${src.doc.taglibs}/strutsx-html.xml
${build.work.taglibs}/strutsx-html-full.xml"/>
<classpath>
<pathelement location="${build.classes}"/>
<pathelement location="${lib}/xerces.jar"/>
</classpath>
</java>
</target>
to include the merge into your build process.
cu....
--
...roland huss
consol.de