Table of Contents

TapeTrack XML Stylesheet

The TapeTrack XML Stylesheet file, normally named tapetrack.xslt, controls how TapeTrack billing XML is displayed in a web browser or compatible Desktop UI.

The stylesheet is used by TMSS10LogStatsProcess when producing TapeTrack billing XML.

The generated XML contains billing information such as:

The stylesheet converts this XML data into a readable layout for review.

The stylesheet does not calculate charges, select a billing package, or change the underlying billing information. Billing calculations are performed by TMSS10LogStatsProcess using the Customer Description Map, Package Map and Billing Rules.

Purpose

The tapetrack.xslt stylesheet provides a consistent and readable presentation of TapeTrack billing XML.

The file can be used to:

The stylesheet separates the presentation of billing information from its calculation.

Component Purpose
Billing XML Contains the calculated billing data.
tapetrack.xslt Defines how the billing data is displayed.
Desktop UI or browser Applies the stylesheet and displays the formatted billing information.

File Location

The tapetrack.xslt file can be stored in any directory accessible to the account running the billing process and the application displaying the XML. For ease of administration, it is recommended that the stylesheet is stored with the other approved billing configuration files.

Example Windows location:

C:\Program Files\TapeTrack\TapeTrack Framework Server\etc\billing\tapetrack.xslt

Example Linux location:

/etc/tapetrack/billing/tapetrack.xslt

The location of the stylesheet can be supplied to TMSS10LogStatsProcess using the -X argument. Omitting the -X argument when running TMSS10LogStatsProcess, the program will default to tapetrack.xslt.

File Format

The TapeTrack stylesheet is an XSLT file containing XML-formatted transformation instructions. The file normally uses the .xslt extension. A billing XML file references the stylesheet using an XML processing instruction.

Example:

In this example, the billing XML expects to find a stylesheet named tapetrack.xslt.

tapetrack.xslt
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
  <xsl:template match="/">
    <html>
      <head>
        <title>Sample Processed Statistics Style Sheet</title>
      </head>
      <body>
        <table cellpadding="0" cellspacing="20" border="0">
          <thead>
            <th>Customer</th>
            <th>ItemCode</th>
            <th>Description</th>
            <th>Count</th>
            <th>Cost</th>
            <th>Total</th>
          </thead>
        <xsl:apply-templates select="tapetrack_data">
        </xsl:apply-templates>
        </table>
      </body>
    </html>
  </xsl:template>
 
  <xsl:template match="item">
    <tr>
      <td>
        <xsl:apply-templates select="customer">
        </xsl:apply-templates>
      </td>
      <td>
        <xsl:apply-templates select="itemcode">
        </xsl:apply-templates>
      </td>
      <td>
        <xsl:apply-templates select="description">
        </xsl:apply-templates>
      </td>
      <td align="right">
        <xsl:apply-templates select="count">
        </xsl:apply-templates>
      </td>
      <td align="right">$
        <xsl:apply-templates select="cost">
        </xsl:apply-templates>
      </td>
      <td align="right">$
        <xsl:apply-templates select="total">
        </xsl:apply-templates>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

The stylesheet reads each item element within tapetrack_data and displays its values as a table row.

Troubleshooting

Stylesheet Cannot Be Found

Confirm that:

Security

The tapetrack.xslt file does not normally contain passwords or authentication details.

However, an XSLT file controls how billing data is transformed and displayed. Unauthorized changes could hide billing items, display misleading information or redirect the presentation to unexpected content.

Access should therefore be restricted to:

The file should not be publicly accessible or stored in an unsecured shared directory.

See Also