Text output from RPE


RPE does not have a text output driver however you can get one using the XSL-FO format that RPE generates.

XSL-FO stands for XSL Formatting Objects and is very simply put a W3C standard for describing documents using XML. XSL-FO is not meant to be a final format, for the end user to see and use, but as an intermediary format fed to processors that transform it. In many cases the transformation generates PDF but in this case the target is text.

The files for the example discussed below are available here. The package contains:

  • testXSLFO.fo – the FO file as generate by RPE
  • testXSLFO.dta – the RPE template file used to generate the FO from DOORS data
  • testXSLFO.xslt – the XSLT file that defines the transformation rules. Images are replaced by the “– IMAGE –” word and the rest of the content is presented as is minus the formatting tags. Tables will look skewed in the output.
  • display.html – quick way of visualising the output. Tested with FireFox only.
  • output.txt – the result as generated using msxsl.exe (see below).

The HTML file displays the result in a browser and you can copy the content directly from there. An alternative is to use Microsoft’s Command Line Transformation Utility (msxsl.exe) and generate the output file in batch mode. Using the attached files and assuming mxsxsl is copied in the same folder the command to execute is:

msxsl.exe testXSLFO.fo testXSLFO.xslt -o output.txt 

What is important to note is that the RPE template has nothing specifically needed for the transformation. At the same time the template is kept minimal to ensure the transformation is smooth and simple.

Reporting Arena has used a similar approach to generate Excel documents from RPE’s  XSL-FO output. See Reporting Arena Excel Converter for details.

Advertisements

Author: Dragos Cojocari

Architect for Rational Publishing Engine

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