123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- 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 version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="nav-param" match="/root/env/param[starts-with(@name,'nav_checkbox')]" use="."/>
- <xsl:template match="/root" priority="1">
- <xsl:for-each select="/root/selectedEntries/*">
- <xsl:variable name="searchPathForURL" select="./*[local-name()='searchPathForURL']"/>
- <xsl:element name="{local-name()}" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:choose>
- <xsl:when test="position() > key('env-param','pagerfromlistpager')-1 and position() < key('env-param','pagertolistpager')+1">
- <xsl:copy-of select="*[local-name()!='type']"/>
-
- <xsl:for-each select="/root/env/param[contains(@name,'_type_checkbox') and string(.) = $searchPathForURL]">
- <type><xsl:value-of select="substring-before(@name,'_')"/></type>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="*"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="text()" priority="0"/>
- </xsl:stylesheet>
|