1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?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).
- -->
- <!-- This stylesheet defines global portal variables and templates. -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:gp="http://developer.cognos.com/schemas/xts/gp"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsl xtsext xts gp cm">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- Template - gp:getToPostConversion
- This template generates a template used to convert a chuck of xml into an xml-encoded string.
- Operation:
- Outputs the serialize-xml template.
- -->
- <xsl:template match="gp:getToPostConversion">
- <out:template name="getToPostConversion">
- <out:param name="arguments" select="''"/>
- <input type="hidden">
- <out:variable name="name">
- <out:value-of select="string(xtsext:urldecode(substring-before($arguments, '=')))"/>
- </out:variable>
- <out:variable name="argumentsLessName">
- <out:value-of select="substring-after($arguments, '=')"/>
- </out:variable>
- <out:choose>
- <out:when test="contains($argumentsLessName, '&')">
- <out:variable name="value">
- <out:value-of select="string(xtsext:urldecode(substring-before($argumentsLessName, '&')))"/>
- </out:variable>
- <out:attribute name="name"><out:value-of select="$name"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$value"/></out:attribute>
- </out:when>
- <out:otherwise>
- <out:variable name="value">
- <out:value-of select="string(xtsext:urldecode(string($argumentsLessName)))"/>
- </out:variable>
- <out:attribute name="name"><out:value-of select="$name"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$value"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </input>
- <out:variable name="argumentsStripped">
- <out:value-of select="substring-after($arguments, '&')"/>
- </out:variable>
- <out:if test="contains($arguments, '&')">
- <out:call-template name="getToPostConversion">
- <out:with-param name="arguments">
- <out:value-of select="$argumentsStripped"/>
- </out:with-param>
- </out:call-template>
- </out:if>
- </out:template>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|