12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: rs
- (C) Copyright IBM Corp. 2018, 2020
- US Government Users Restricted Rights - Use, duplication or disclosure
- restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rsext="xalan://com.cognos.reportserver.ext.RSExt" exclude-result-prefixes="xsl">
- <xsl:template match="textBox | selectValue | selectWithSearch | selectWithTree | selectDate | selectTime | selectDateTime | selectInterval | selectFile | selectDataSourceSignon" priority="2">
- <xsl:copy>
- <xsl:attribute name="specname"><xsl:choose><xsl:when test="@layoutClass"><xsl:value-of select="@layoutClass"/></xsl:when><xsl:otherwise><xsl:value-of select="name()"/></xsl:otherwise></xsl:choose></xsl:attribute>
- <xsl:copy-of select="@*[name(.) != 'layoutClass']"/>
- <xsl:copy-of select="HA/@*[name(.) != 'layoutClass']"/>
- <xsl:copy-of select="*[not(self::HA | self::selectOptions | self::selectChoices)]"/>
- <xsl:apply-templates select="selectOptions | selectChoices"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="selectOptions | selectChoices" priority="2">
- <xsl:copy>
- <xsl:copy-of select="@*[name(.) != 'layoutClass']"/>
- <xsl:copy-of select="*[not(self::selectOption)]"/>
- <xsl:for-each select="selectOption">
- <xsl:call-template name="outputSelectOption"/>
- </xsl:for-each>
- </xsl:copy>
- </xsl:template>
- <xsl:template name="outputSelectOption">
- <xsl:element name="selectOption">
- <xsl:copy-of select="./@*[name() != 'layoutClass']"/>
- <xsl:copy-of select="./*"/>
- </xsl:element>
- </xsl:template>
- <xsl:template match="promptButton" priority="2">
- <xsl:copy>
- <xsl:if test="(@type='back' and /Document/DATA/PAGE/@canBack='false') or (@type='next' and /Document/DATA/PAGE/@canNext='false') or (@type='finish' and /Document/DATA/PAGE/@canFinish='false')">
- <xsl:attribute name="disabled">true</xsl:attribute>
- </xsl:if>
- <xsl:attribute name="specname"><xsl:value-of select="@layoutClass"/></xsl:attribute>
- <xsl:copy-of select="@*[name(.) != 'layoutClass']"/>
- <xsl:copy-of select="HA/@*[name(.) != 'layoutClass']"/>
- <xsl:apply-templates select="*"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="FORM[@layoutClass='block' and @defaultPromptControl='true']" priority="2">
- <div>
- <div><xsl:value-of select="@columnName"/></div>
- <xsl:copy-of select="@*[name(.) != 'layoutClass']"/>
- <xsl:apply-templates select="*"/>
- </div>
- </xsl:template>
- <xsl:template match="OTD[@layoutClass='pageHeader' and @defaultPromptHeader='true'] | OTD[@layoutClass='pageFooter' and @defaultPromptFooter='true']" priority="2">
- <td>
- <xsl:copy-of select="@*[name(.) != 'layoutClass']"/>
- <xsl:copy-of select="../../@generateRepromptButton"/>
- </td>
- </xsl:template>
- </xsl:stylesheet>
|