You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by "Scott M. Stirling" <ss...@mediaone.net> on 2001/01/04 06:55:16 UTC

Jakarta Tag Library Doc Kit

I am attaching a sample "kit" that anyone can use to auto-generate their
taglib HTML doc (for the main doc page such as
http://jakarta.apache.org/taglibs/doc/application-doc/index.html) and
their TLD file.  

The contents of the kit are self-documented quite a bit, with an example
template that can easily be edited and customized.

taglib-doc-kit contents:
 
./taglib-doc-build.xml - an Ant build file with a gen-docs target (see
below)

./xml/footer.xsl - an auxiliary style sheet included by taglib-doc.xsl

./xml/taglib-doc.xsl - the main XSL for generating the HTML doc from an
input XML (e.g., taglib-template-tags.xml)

./xml/taglib-template-tags.xml - the input XML file for both main XSL
sheets

./xml/taglib.css - a CSS referenced by the generated HTML doc, and
copied to the appropriate location by gen-docs

./xml/tld.xsl - the main XSL for generating the TLD from an input XML
(e.g., taglib-template-tags.xml) This file was authored originally by
Craig McClanahan.

The file to edit to create all your own docs is
taglib-template-tags.xml.  Note that by default, the gen-docs target
looks for input XML files ending in *-tags.xml.  To edit the format of
the output HTML, you can edit taglib-doc.xsl.  If it's a matter of
formatting the JSP syntax highlighting in the HTML, edit the CSS sheet.

This kit requires Ant with a functioning style task.  I'm using Ant 1.3,
fairly recent build, with Xalan and Xerces.

Steps:

- Unzip and untar the attached file
- Peruse the files in the unpacked xml dir
- Peruse the taglib-doc-build.xml file.  This is a typical Jakarta
taglib build file with three added properties and one added target
("gen-docs" in the Utility section at the bottom):

        xml.src                  Location of XSL, XML, and CSS files for
doc gen
        tld.xsl                    Name of XSL for creating the TLD from
XML
        html.xsl                  Name of XSL for creating HTML doc from
XML 

- There's no need to change the property values -- they're ready to go
for purposes of the demo.
- To run the template sample, cd to taglib-doc-kit and execute:
   ant -buildfile taglib-doc-build.xml gen-docs

Then look in the newly created conf and doc dirs at the resultant files.
Browse to the HTML file so you can see the HTML output and CSS
formatting.

Let me know what you think.  I can tell you some things that need to be
added, which I will add shortly unless someone else does first.  Mainly,
the <teiclass> element and scripting variable data need to be
incorporated.  I'm sure I'll add to/modify it as I progress with the Ant
taglib.  I am open to suggestions and offers of help in both these
tasks.  Your input is appreciated. 

Best regards,

Scott Stirling
West Newton, MA