This topic describes how to use the Template Viewer tool.
Template Viewer is a BI Publisher desktop tool for testing templates.
You can download the BI Publisher desktop tools from the Oracle BI Enterprise Edition Home page or from the BI Publisher Home page. Use the Start menu to launch the Template Viewer installed on your Windows machine.
With Template Viewer desktop tool, you can:
Debug templates and sub-templates. See Debugging Templates.
Monitor memory used when a template is applied to a data file. See Monitoring Memory Usage.
Profile XSLT to view the time consumed by an XSL code. See Profiling XSLT.
Test the fonts used in a template. See Testing Fonts.
Test translation of a template by selecting the XLIFF file related to the template.
Export the output files to a selected location by using the Export option.
Run the XSLT processor to validate XML documents. See Validating XML Documents.
If you don’t see the expected results in the template preview window, you can use Template Viewer to enable trace settings and view the debug messages to solve the problem.
You can also save and view the intermediate XSL file generated after the sample data and template are merged in the XSL-FO processor. If you already use XSL, you’ll quickly learn the debugging features in Template Viewer.
To preview template with Template Viewer and view log messages:
Open Template Viewer:
From the Windows desktop, click Start, then Programs, then Oracle BI Publisher Desktop, then Template Viewer.
Click Browse to locate the working directory that contains the sample data file and template file. The data file and template file must reside in the same folder.
In the Files tab, select the appropriate option. For example, if you’re testing a .xsl template, select Excel Templates. The Data and Template regions display the data files and template files present in the directory
Click the appropriate data and template files to select them.
Select the log (debug) level.
If you want to test a sub-template, browse and specify the sub-template in the Style Template File field.
If required, set the report parameters in the Setting (Default) tab.
From the Output Format list, select the output format. For example, Excel.
Click Start Processing.
The Template Viewer merges the selected data with the selected master template and sub-template and opens the appropriate viewer. View the log messages in the message box.
To view the generated XSL:
Select the data and template files and choose Excel output.
Select Tools, then Generate XSL file from, then Excel Template.
At the prompt, save the generated XSL file.
Navigate to the saved location and open the XSL file in an appropriate viewer.
In Template Viewer, you can track the memory used when a template is applied to a data file.
You can use Template Viewer to profile XSLT. The XSL template includes time-logging commands that enable time measurements and act as a profiling tool. When you run a template, the log.csv file is generated to record the time for the running of the XSL code.
You can validate an XML document to ensure that it includes the proper code.
You can test fonts to ensure that your reports are displayed correctly.