XSLdoc Overview
XSLdoc is a tool for performing real-time documentation of XSL stylesheets. XSLdoc dynamically parses and renders the API for an XSL stylesheet, including your comments, in HTML format.
There are now 2 ways to use XSLdoc. The first way is to download the Java Jar version of XSLdoc, which can document an entire directory of stylesheets. Both versions require the Java Runtime Environment. The second is to use a web interface to document a single stylsheet on the web.
Usage: Java Jar
Download XSLdoc 1.5.4 Jar
Extract xmlparserv2.jar, oscache-2.4.1.jar, commons-logging.jar from xsldoc.jar and place them in the same location as the xsldoc-1.5.4.jar itself.
java -jar xsldoc-1.5.4.jar [sourcePath] [destinationPath] [host] [-i]
- sourcePath
- The directory of your stylesheets. XSLdoc will attempt to document all stylsheets (.xsl and .xslt file extensions) in this directory as well as all subdirectories. sourcePath must NOT contain spaces.
- destinationPath
- The directory where your documentation is saved. All files in this directory and all subdirectories are overwritten. destinationPath must NOT contain spaces.
- host
-
The URI for which all relative XSL imports and includes are resolved. (e.g.
http://localhost/,file://c:/web/) Defaults tohttp://localhost/ - -i
- Will not show included or imported xsl:stylesheet documentation
Usage: Web
To document a single stylesheet on the web, use the following form:
- Enter a URL in the text field below that references a stylesheet.
- Hit enter or click "document".
Commenting Stylesheets
XSL comments should use the form <!-- -->, since the XSLT element xsl:comment is not allowed in some places where comments are useful. XSLdoc will display the first preceding sibling comment for the following XSLT elements:
- xsl:attribute-set
- xsl:attribute
- xsl:decimal-format
- xsl:key
- xsl:param
- xsl:stylesheet
- xsl:template
- xsl:param
- xsl:variable
The following top-level elements are supported in the xsldoc namespace:
- xsldoc:author
- xsldoc:date
- xsldoc:version
If used, they can contain a single text node or a node-set (a.k.a. HTML) with the author, date, and version of your stylesheet.
Recommendations
Since comments in XSLT are treated as text, you may include HTML within your comments. This is useful for creating links to material related to your stylesheet. Your HTML must be well-formed and should adhere to the HTML 4.01 specification.