1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
- <xsl:output method="text"/>
- <xsl:strip-space elements="*"/>
- <xsl:variable name="show_row_numbers" select="//ListFrame/@rowNumbers='show'"/>
- <xsl:template match="/Document">
- <xsl:apply-templates select="Title"/>
- <xsl:text>

</xsl:text>
- <xsl:apply-templates select="CQLayout"/>
- <xsl:text>
</xsl:text>
- <xsl:apply-templates select="DATA-MATRIX/DATA"/>
- </xsl:template>
- <xsl:template match="Title">
- <xsl:value-of select="."/>
- </xsl:template>
- <xsl:template match="ListFrame/ListColumns">
- <xsl:if test="$show_row_numbers">
- <xsl:text>Row, </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="GrpColumn | ListColumn"/>
- </xsl:template>
- <xsl:template match="GrpColumn | ListColumn">
- <xsl:value-of select="@title"/>
- <xsl:text>, </xsl:text>
- </xsl:template>
- <xsl:template match="LR">
- <xsl:apply-templates select="LR | ROW"/>
- </xsl:template>
- <xsl:template match="ROW[@type='total']">
- <xsl:if test="$show_row_numbers">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="TQ"/>
- <xsl:text>
</xsl:text>
- </xsl:template>
- <xsl:template match="ROW[@type='next'] | ROW[@type='previous']">
- <xsl:if test="$show_row_numbers">
- <xsl:text>..., </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="Q"/>
- <xsl:text>
</xsl:text>
- </xsl:template>
- <xsl:template match="ROW">
- <xsl:if test="$show_row_numbers">
- <xsl:value-of select="@num"/>
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:for-each select="ancestor::LR">
- <xsl:if test="name()='LR'">
- <xsl:value-of select="./Q"/>
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:apply-templates select="Q"/>
- <xsl:text>
</xsl:text>
- </xsl:template>
- <xsl:template match="Q | TQ">
- <xsl:value-of select="."/>
- <xsl:text>, </xsl:text>
- </xsl:template>
- </xsl:stylesheet>
|