>A while ago Chris Aniszczyk and Lawrence Mandel wrote a brief article describing how to use the Web Tools Platform, Docbook, and a plugin called Orangevolt XSL (aka. EclipseXSLT) to write technical documentation. While much of the article is still valid, some of it is starting to show it’s age. So, I’m in the process of updating the article again. The XSL stylesheet was recently updated by Peter Friese, see bug 225714.
Part of the reason for doing this is to help showcase the abilities of the XSL Tooling project and how it can be used in a real world eclipse application. We all need to write documentation at some point during eclipse projects, and more than likely the information has to be put into multiple output formats, such as HTML, PDF, MAN, Text, WordML, OpenDocument, Eclipse Help, etc. By leveraging Docbook or DITA, one can do this all with eclipse based tools.
The article is being updated to show case the XSL launching and transformation abilities of the XSL Tooling project, but it will also provide an update eclipse help XSL stylesheet to help create those pesky Toc.xml and html help files that we all love so much.
By going through this process I did discover a couple of pesky bugs for XSL launch configurations. See bugs 234757 and 234761 for more information. If you are using the XSL Tooling plugins, please help us improve them by filing bugs and feature requests.
Xalan Indent Annoyance
XSL has an xsl:output element that supports an indent attribute. By setting this indent attribute to yes, the output is supposed to be pretty printed. However, while Xalan does support the indent attribute, it has the default spacing set to zero, thus always making the indent value act like it was set to “no”. In order to get Xalan to indent, you need to add the following namespace to your stylesheet:
Then on the xsl:output add xalan:indent-amount=”3″ to set indentation to three spaces.
<xsl:output indent="yes" xalan:indent-amount="3"/>
That will correctly allow Xalan to pretty-print your output. This little tip comes from the Xalan website.