XSL Template Functionality
In Part 1 of our short series, we discussed multiple templates that Oracle rarely uses, causing them to remain unknown to BI Publishers. Today we will be covering the topic of XSL Templates, what they do, and how to use them correctly.
So what exactly are XSL Templates used for? XSL Templates serve the main purpose of transforming an existing XML in to another XML. Sound strange? Well, the XML generated by JD Edwards when you add a report definition is based on the layout of the report, which works if you want to use tags similar to an RFT template to produce a better looking PDF.
But what if you need to send this somewhere that requires a specific XML format, like a bank or supplier? You can achieve this by creating a custom report, or by cloning an existing one. Once you have done this, you can add the code to create the file in any format you choose. If you have all the information you need in a report, all you need to do is re-arrange it into the desired format in this template. Let’s take a look at a sample.
Unlike E-text Templates, you will not find a sample of this in the BI Publisher desktop installation folder. We will reference a localization XSL template for SEPA payments as a sample. See below:
This is what an XSL Template looks like when pulled up in your system. As you can see, the template type is TS, which means XSL Template. Try looking for a ‘TS Template’ in your system. As I mentioned before, you probably don’t have one as most of these are localized. You may need to read more about XSL to fully understand this concept.
See the image below for a visual example of how XSL should be formatted:
To be able to run the transformation, you will need a source file using the template viewer, just like with the E-text Templates. The output of this formatting will look something like the second image below:
As mentioned in Part 1 of our short series, these templates are very powerful tools if used correctly. We’ve explored the various capabilities of E-text Templates, XSL Templates, and the XML output capabilities of each. Acquiring these “unknown” tools and gaining more experience with them can significantly aid in the efficiency of your BI Publisher skills set.