| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 | <?xml version="1.0" encoding="UTF-8"?><!--  Licensed Materials - Property of IBM  IBM Cognos Products: Viewer  (C) Copyright IBM Corp. 2001, 2014  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:rvl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/rv/rvlogic/"	xmlns:out="dummy-uri"	xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"	xmlns:xts="http://developer.cognos.com/schemas/xts/"	exclude-result-prefixes="xsl rvl xtsext xts">	<xsl:output method="xml" encoding="UTF-8" indent="no"/>	<xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>	<xsl:template match="rvl:drillThruForm">		<!-- drill thru form -->		<form name="stackForm" id="stackForm" method="post" style="margin:0px">			<out:variable name="stack-idx">				<out:value-of select="count( /root/env/param[ starts-with( @name, 'rvstack_' ) ] )"/>			</out:variable>			<out:variable name="stack-name" select="concat( 'rvstack_', $stack-idx )"/>			<out:if test="$status = 'complete'">				<input type="hidden">					<out:attribute name="name"><out:value-of select="$stack-name"/></out:attribute>					<out:attribute name="value">						<out:variable name="envParams">							<out:choose>								<out:when test="/root/env/param[@name='ui.action']='view'">									<out:text><param name="ui.action">view</param></out:text>								</out:when>								<out:otherwise>									<out:text><param name="ui.action">currentPage</param></out:text>									<out:text><param name="ui.conversation"></out:text>									<out:variable name="markup-conv">										<out:call-template name="serialize-xml">											<out:with-param name="node-set" select="$conversation"/>										</out:call-template>									</out:variable>									<out:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))"/>									<out:text></param></out:text>									<out:text><param name="m_tracking"></out:text>									<out:variable name="markup-tracking">										<out:call-template name="serialize-xml">											<out:with-param name="node-set" select="/root/response/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking/*[local-name() = 'conversationContext']"/>										</out:call-template>									</out:variable>									<out:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-tracking), true()))"/>									<out:text></param></out:text>								</out:otherwise>							</out:choose>							<out:for-each select="/root/env/*[@name='ui.name' or @name='ui.format' or @name='ui.object' or @name='session_prompts' or @name='run.outputFormat' or @name='ui.spec']">								<out:call-template name="serialize-xml">									<out:with-param name="node-set" select="."/>								</out:call-template>							</out:for-each>						</out:variable>						<out:variable name="markup">							<out:choose>								<out:when test="$reportName != ''">reportName = '<out:value-of select="xtsext:javascriptencode(string($reportName))"/>';</out:when>								<out:otherwise>reportName = '<xts:string id="RV_PREVIOUS_REPORT" encode="javascript"/>';</out:otherwise>							</out:choose>							stackIdx = '<out:value-of select="xtsext:javascriptencode(string($stack-idx))"/>';							envParams='<out:value-of select="xtsext:javascriptencode(string($envParams))"/>';						</out:variable>						<out:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode( string( $markup ), true()))"/>					</out:attribute>				</input>			</out:if>		</form>	</xsl:template>	<xsl:template match="rvl:selectChoices">		<out:text><selectChoices </out:text>		<out:variable name="name" select="./@name"/>		<out:variable name="drillTargetLabel" select="../@label"/>		<out:text>propertyToPass="</out:text>		<out:choose>			<out:when test="string(./@propertyToPass) != ''">				<out:value-of select="./@propertyToPass"/>			</out:when>			<out:when test="/root/drillSpecs/DRILLS/DRILL[@label = string($drillTargetLabel)]/PARAMETER-PROPERTIES/Parameter[@name=string($name)]/@propertyToPass != ''">				<out:value-of select="xtsext:xmlencode(string(/root/drillSpecs/DRILLS/DRILL[@label = string($drillTargetLabel)]/PARAMETER-PROPERTIES/Parameter[@name=string($name)]/@propertyToPass))"/>			</out:when>		</out:choose>		<out:text>"></out:text>			<out:choose>					<!--when selectChoices element is passed through, it's has already been xml encoded, so don't double encode it -->			<out:when test="starts-with(normalize-space(string(./@value)), '<selectChoices>')">				<out:value-of select="substring-after(./@value, '<selectChoices>')"/>			</out:when>						<out:otherwise>				<out:choose>					<out:when test="./@value!=''">						<out:text><selectOption </out:text>								<out:text>useValue="</out:text>						<out:choose>							<out:when test="./@mun != ''"><out:value-of select="xtsext:xmlencode(string(./@mun))"/></out:when>							<out:otherwise><out:value-of select="xtsext:xmlencode(string(./@value))"/></out:otherwise>						</out:choose>						<out:text>" </out:text>										<out:text>displayValue="</out:text>						<out:choose>							<out:when test="./@mun"><out:value-of select="xtsext:xmlencode(string(./@value))"/></out:when>							<out:when test="./@displayValue"><out:value-of select="xtsext:xmlencode(string(./@displayValue))"/></out:when>							<out:otherwise><out:value-of select="xtsext:xmlencode(string(./@value))"/></out:otherwise>						</out:choose>						<out:text>"</out:text>										<out:if test="./@mun">							<out:text> mun="</out:text><out:value-of select="xtsext:xmlencode(string(./@mun))"/><out:text>"</out:text>						</out:if>										<out:text>/></out:text>						<out:text></selectChoices></out:text>					</out:when>					<out:otherwise><out:text></selectChoices></out:text></out:otherwise>				</out:choose>			</out:otherwise>		</out:choose>	</xsl:template>	<xsl:template match="rvl:selectChoicesNil">		<out:text><selectChoices/></out:text>	</xsl:template>	<!-- the main engine -->	<xsl:template match="*">		<xsl:copy>			<xsl:copy-of select="@*"/>			<xsl:apply-templates/>		</xsl:copy>	</xsl:template></xsl:stylesheet>
 |