>Authoring With Eclipse – Revisited

>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:

xmlns:xalan="http://xml.apache.org/xalan"

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.

Advertisements
This entry was posted in dita, docbook, eclipse, xsl. Bookmark the permalink.

2 Responses to >Authoring With Eclipse – Revisited

  1. matej says:

    >Except that EclipseXSLT and WebTools totally don’t work with my Fedora Eclipse 3.3.2 — I totally get lost in the dependency hell of weird different versions. Oh well.

  2. David Carver says:

    >XSL Tooling will be a better choice, but it requires Eclipse 3.4. An alternative to EclipseXSLT is X-Assist which also is part of the code base for XSL Tooling.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s