Working with XSLT Files

The Display Format drop-down in the Report Builder contains an XSLT option that allows you to apply your own custom formatting to your XML output. If you choose this option, you can specify an existing style sheet or upload a new one.

When creating a new *.xslt style sheet, you may be able to save time by downloading the following example file and adapting it to suit your needs:

XFRACASXSLT_simpleIncident_example.xslt

This example file generates a simple table and contains the following code, which illustrates how to apply a green background and bold text to any cells containing a value of "Open":

<xsl:for-each select="Incidents/Incident">

<tr>

<xsl:for-each select="*[not(local-name() = '' or local-name() = 'NULL')]">

<xsl:if test="(current()='Open')"> <td class="pfvvalue" align="middle" style="background-color:#c4df9b; font-weight: bold;"><xsl:value-of select ="current()"/></td></xsl:if>

<xsl:if test="not(current()='Open')"> <td class="pfvvalue" align="middle"><xsl:value-of select ="current()"/></td></xsl:if>

</xsl:for-each>

</tr>

</xsl:for-each>


Note that this example can be adapted to other types of records, such as problems.