Archive for xslt

Documenting XSLT

Currently I´m finishing some XSLT Projects, an during this process i’m looking around for some tools for automatically document XSLT Stylesheets, like JavaDoc does for Java.
Here are my favorites:

pyXSLdoc

An application to produce documentation for XSLT files in XHTML format, similar to what javadoc does for Java files. [..] also remove all comments from a given XSLT set to optimize it for production use

pyXSLdoc parses the information given in XML comments. You can use Javadoc tags to document or reStructuredText. The tool works very well and the output looks like a Javadoc generation output.
The advantage of the tool is at the same time a disadvantage, the fact that you document you xslt in comments makes them good readable and separates them from the stylesheet stuff but makes it nearly unreachable for other commenting or interpreting tools. An other disadvantage is that you need installed Python, installed Pyana and for simple and fully use Docutils. IMO these are quite a lot tools only for documenting my stylesheets.
Beside this the tool is cool! ;o)
Source c THE dot.de

the other one is

XSLTdoc

I like this one very much, and I choose this one!

XSLTdoc is a Javadoc-like tool for all versions of XSLT (1.0, 1.1, 2.0). It defines conventions to document XSL “code elements” directly in the source code. These “documentation elements” are then extracted by the XSLTdoc tool to build a documentation consisting of several linked HTML pages which provide easy browsing through the documentation. The XSLT source code is available with syntax highlighting.

Features:

  • Documentation is embedded in the XSL program
  • Documenting of XSLT 2.0 functions
  • Syntax highlighted source code browsing
  • Generates documentation a whole set of stylesheets
  • Generates documentation for included and imported stylesheets
  • Layout is customizeable with CSS stylesheets
  • Site layout is based on a customizeable/interchangeable html template
  • Easely extensible with new tags
  • Written in XSLT

This tool is based on the above named advantages/disandvantages a kind of vice versa approach. IMO it´s the better more “cleaner” one. An absolutely big point is that all you need to run this tool is a xslt processor which you should already have while dealing with XSL! ;o)
The doc output isn´t realy similar to a Javadoc one, but this it isn´t that bad and beside you´re able to customize it using css and templates!
You can view a Demo output here!

Source: PNP-Software, xsltDoc