| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | <?xml version="1.0" encoding="UTF-8"?><!--    Licensed Materials - Property of IBM    IBM Cognos Products: cpscrn    (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">	<!--		the following imports requires these variables to be defined: 		$metaData, $interactions, $logic, $userPreferences, $navRequest, $navResponse	-->	<xsl:import href="/common/propeditor/types/xsdtypes.xslt"/>  	<xsl:import href="/common/propeditor/types/fragextTypes.xslt"/>  	<xsl:import href="/common/propeditor/types/cmtypes.xslt"/>  	<xsl:import href="/common/propeditor/types/cmmtypes.xslt"/>	<xsl:import href="/common/propeditor/types/generictypes.xslt"/>		<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>	<!--		Variable declarations. The xpath "/*[false()]" provides an empty node set result.	-->	<xsl:variable name="metaData" select="/root/fragment/meta"/>	<xsl:variable name="interactions" select="/root/interactions"/>	<xsl:variable name="state" select="/root/state"/>	<xsl:variable name="userPreferences" select="/*[false()]"/>	<xsl:variable name="logic" select="/*[false()]"/>	<xsl:variable name="navRequest" select="/*[false()]"/>	<xsl:variable name="navResponse" select="/*[false()]"/>	<xsl:template match="/">		<response>			<xsl:choose>				<xsl:when test="$interactions/param[@name='privateAction'] = 'save'">					<fragment>						<!-- restore previous state -->						<state><xsl:value-of select="/root/state/param[@name='frag_prev_state']"/></state>					</fragment>					<customs>						<xsl:for-each select="$metaData/customProperties[string(control/@appearance)!='hidden']">											<xsl:variable name="currentPropertyName" select="@name"/>							<param name="{@name}">								<xsl:apply-templates select="." mode="interaction-save"/>							</param>						</xsl:for-each>					</customs>				</xsl:when>				<xsl:when test="$interactions/param[@name='privateAction'] = 'cancel'">					<fragment>						<!-- restore previous state -->						<state><xsl:value-of select="/root/state/param[@name='frag_prev_state']"/></state>					</fragment>				</xsl:when>				<xsl:otherwise>					<state>						<!-- Keep a copy of the view mode fragment state -->						<xsl:if test="not(/root/state/param[@name='frag_prev_state'])">							<param name="frag_prev_state"><xsl:value-of select="/root/controllerParams/param[@name='frag-state']"/></param>						</xsl:if>						<xsl:copy-of select="/root/state/param[not(@name = $interactions/param/@name)]"/>						<xsl:apply-templates select="$metaData/customProperties" mode="interaction-state"/>					</state>				</xsl:otherwise>			</xsl:choose>		</response>	</xsl:template>	<!-- these are templates required by the markup stage -->	<xsl:template name="getPropertyValue"/>	<xsl:template name="relatedControl"/>	<xsl:template name="keyScript"/>	<xsl:template name="createLanguageSelector"/>		<xsl:template match="customProperties" mode="interaction-state">		<xsl:variable name="prefix" select="substring-before(datatype, ':')"/>		<xsl:variable name="type" select="substring-after(datatype, ':')"/>		<xsl:variable name="namespaceSpecificCustomProps">			<xsl:element name="{$prefix}:{$type}" namespace="{datatype/namespace::*[name() = $prefix]}">				<xsl:copy-of select="self::node()"/>			</xsl:element>		</xsl:variable>		<xsl:apply-templates select="$namespaceSpecificCustomProps/*" mode="interactions"/> 	</xsl:template>	<xsl:template match="customProperties" mode="interaction-save">		<xsl:variable name="prefix" select="substring-before(datatype, ':')"/>		<xsl:variable name="type" select="substring-after(datatype, ':')"/>		<xsl:variable name="namespaceSpecificCustomProps">			<xsl:element name="{$prefix}:{$type}" namespace="{datatype/namespace::*[name() = $prefix]}">				<xsl:copy-of select="self::node()"/>			</xsl:element>		</xsl:variable>		<xsl:apply-templates select="$namespaceSpecificCustomProps/*" mode="save"/> 	</xsl:template></xsl:stylesheet><!-- $Header: //cpscrn/main/src/java/etc/webapps/cps/WEB-INF/fragments/producers/common/propeditor/interaction.xslt#1 $ --><!-- $DateTime: 2008/10/22 11:12:04 $ --><!-- $Change: 25109 $ -->
 |