It seems like an eternity ago that I was at university there - but after only a couple of hours and a fine Balti in a BYOB restaurant, I felt like I'd never left.
Anyway, enough of my weekend! Let's get back to XSL-TEXT templates.
Excluding XSL-FO, there are 3 different types of XSLT script templates available in BI Publisher. These are currently not greatly documented in the BIP User Guide. However, the difference between them is the format of the output created by the XSLT script i.e.:
XSL-HTML | A XSLT script to transform an XML document into a HTML file |
XSL-XML | A XSLT script to transform an XML document into another XML document |
XSL-TEXT | A XSLT script to transform an XML document into a TEXT file |
Note: The XSL element used to set the output type is:

Generally, it is a lot simpler to use an RTF or eText template to create the report layout - and I would ALWAYS recommend using an RTF or eText template where possible for this reason.
However, there comes a time when it may be easier to write XSL and XPATH directly rather than live with any shortcomings of the RTF or eText template type.
One such example of this is to add blank lines and additional formatting logic into eText templates.
In a previous blog on R12 Payments and eText templates, I built the following text file using an eText template:

Here is a XSL-TEXT template to build the same text file using the same R12 Payments XML data source:

A simple XSLT example... however, the point is that I can reference any XSL element, XPATH or extended SQL function directly. I have complete control over the layout of the text file being created.
Here are the source files:
Sample XML Data File
XSL-TEXT template
I built and tested this example using the BIP Enterprise Server (but this works equally well from Oracle E-Business Suite.)
To test this example using the BIP Server:
1) Create a new report and register the XML file as a data source:

2) Upload the XSL-TEXT layout template:

3) View the final transformed output:
