| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 | <?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" 	xmlns:out="dummy-uri" 	xmlns:xts="http://developer.cognos.com/schemas/xts/" 	xmlns:layout="http://developer.cognos.com/common/layout"	xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl layout xtsext">		<xsl:output method="xml" encoding="UTF-8" indent="no"/>	<xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>		<xsl:template match="layout:dynamicexpandcontrol">		<xsl:variable name="decNameAttr" select="string(@name)"/>		<xsl:variable name="decName">			<xsl:choose>				<xsl:when test="starts-with(string($decNameAttr),'_THIS_')">					<xsl:value-of select="substring-after(string($decNameAttr),'_THIS_')"/>				</xsl:when>				<xsl:otherwise><xsl:value-of select="$decNameAttr"/></xsl:otherwise>			</xsl:choose>		</xsl:variable>						<xsl:variable name="decFormname">			<xsl:choose>				<xsl:when test="./layout:controlparameters/formname">					<xsl:value-of select="./layout:controlparameters/formname"/></xsl:when>				<xsl:when test="ancestor::layout:form/@name">					<xsl:value-of select="ancestor::layout:form/@name"/>				</xsl:when>				<xsl:otherwise>pform</xsl:otherwise>			</xsl:choose>		</xsl:variable>				<xsl:variable name="decShortName">			<xsl:choose>				<xsl:when test="starts-with(string($decFormname),'_THIS_')">					<xsl:value-of select="substring-after(string($decFormname),'_THIS_')"/>				</xsl:when>				<xsl:otherwise><xsl:value-of select="$decFormname"/></xsl:otherwise>			</xsl:choose>			<xsl:value-of select="$decName"/>		</xsl:variable>				<xsl:variable name="decId">			<xsl:choose>				<xsl:when test="starts-with(string($decFormname),'_THIS_')">					<xsl:value-of select="$decFormname"/>				</xsl:when>				<xsl:otherwise><xsl:value-of select="concat('_THIS_',$decFormname)"/></xsl:otherwise>			</xsl:choose>			<xsl:value-of select="$decName"/>		</xsl:variable>				<out:variable name="useDecId">			<xsl:value-of select="$decId"/>		</out:variable>		<out:variable name="useDecFormname">			<xsl:value-of select="$decShortName"/>		</out:variable>		<out:variable name="useDecState">			<xsl:choose>				<xsl:when test="./layout:controlparameters/state">					<xsl:copy-of select="./layout:controlparameters/state/*"/></xsl:when>				<xsl:otherwise>					<out:copy-of select="/root/state/*"/>				</xsl:otherwise>			</xsl:choose>		</out:variable>				<out:variable name="useDecCustoms">			<xsl:choose>				<xsl:when test="./layout:controlparameters/customs">					<xsl:copy-of select="./layout:controlparameters/customs/*"/>				</xsl:when>				<xsl:otherwise>					<out:copy-of select="/root/customs/*"/>				</xsl:otherwise>			</xsl:choose>		</out:variable>				<out:variable name="useDecDisplaySetting">			<out:choose>				<out:when test="string($useDecState/param[@name={$decName}]) != ''">					<out:value-of select="$useDecState/param[@name={$decName}]"/>				</out:when>				<out:when test="string($useDecCustoms/param[@name={$decName}]) != ''">					<out:value-of select="$useDecCustoms/param[@name={$decName}]"/>				</out:when>			</out:choose>		</out:variable>		<out:variable name="useDecSkin">			<xsl:choose>				<xsl:when test="./layout:controlparameters/preferences"><xsl:copy-of select="./layout:controlparameters/preferences/param[@name='skin']"/></xsl:when>				<xsl:otherwise><out:copy-of select="/root/preferences/param[@name='skin']"/></xsl:otherwise>			</xsl:choose>		</out:variable>		<layout:section format="dynamicexpand">			<out:attribute name="id"><xsl:value-of select="$decId"/></out:attribute>			<out:attribute name="name"><xsl:value-of select="$decShortName"/></out:attribute>			<out:attribute name="defaultview">				<out:choose>					<out:when test="$useDecDisplaySetting !=''"><out:value-of select="$useDecDisplaySetting"/></out:when>					<out:otherwise>none</out:otherwise>				</out:choose>			</out:attribute>			<layout:script>				var _THIS_imgUp_<out:value-of select="$useDecFormname"/>   = new Image();				var _THIS_imgDown_<out:value-of select="$useDecFormname"/> = new Image();				_THIS_imgUp_<out:value-of select="$useDecFormname"/>.src   = "_THIS?frag-resource=/skins/<out:value-of select="xtsext:javascriptencode($useDecSkin)"/>/fragments/images/action_collapse.gif/THIS_";				_THIS_imgDown_<out:value-of select="$useDecFormname"/>.src = "_THIS?frag-resource=/skins/<out:value-of select="xtsext:javascriptencode($useDecSkin)"/>/fragments/images/action_expand.gif/THIS_";								function _THIS_displayArea_<out:value-of select="$useDecFormname"/>()				{					var eDiv = document.getElementById("<out:value-of select="$useDecId"/>");					<xsl:if test="layout:dynamicareacollapsed">						var eDivCollapsed = document.getElementById("<out:value-of select="concat($useDecId,'_collapsed')"/>")					</xsl:if>					var cImg = document.getElementById("_THIS_expandimg_<out:value-of select="$useDecFormname"/>");					if (eDiv.style.display == "block")					{						eDiv.style.display="none";						<xsl:if test="layout:dynamicareacollapsed">						eDivCollapsed.style.display="block";						</xsl:if>						cImg.src = _THIS_imgDown_<out:value-of select="$useDecFormname"/>.src;						cImg.setAttribute('alt','<xts:string id="IDS_PROP_EXPAND_IMG_TITLE" encode="javascript"/>');						cImg.setAttribute('title','<xts:string id="IDS_PROP_EXPAND_IMG_TITLE" encode="javascript"/>');					}					else					{						eDiv.style.display="block";						<xsl:if test="layout:dynamicareacollapsed">						eDivCollapsed.style.display="none";						</xsl:if>						cImg.src = _THIS_imgUp_<out:value-of select="$useDecFormname"/>.src;						cImg.setAttribute('alt','<xts:string id="IDS_PROP_COLLAPSE_IMG_TITLE" encode="javascript"/>');						cImg.setAttribute('title','<xts:string id="IDS_PROP_COLLAPSE_IMG_TITLE" encode="javascript"/>');					}					}			</layout:script>			<layout:link>				<out:attribute name="href">javascript:_THIS_displayArea_<out:value-of select="$useDecFormname"/>()</out:attribute>				<xsl:copy-of select="layout:text"/>			</layout:link>			<layout:img class="cogstyle-layout-static-expand-img">				<out:attribute name="id">_THIS_expandimg_<out:value-of select="$useDecFormname"/></out:attribute>				<out:attribute name="onclick">javascript:_THIS_displayArea_<out:value-of select="$useDecFormname"/>()</out:attribute>				<out:choose>					<out:when test="$useDecDisplaySetting!='' and $useDecDisplaySetting='block'">						<out:attribute name="alt"><xts:string id="IDS_PROP_COLLAPSE_IMG_TITLE"/></out:attribute>						<out:attribute name="title"><xts:string id="IDS_PROP_COLLAPSE_IMG_TITLE"/></out:attribute>					</out:when>					<out:otherwise>						<out:attribute name="alt"><xts:string id="IDS_PROP_EXPAND_IMG_TITLE"/></out:attribute>						<out:attribute name="title"><xts:string id="IDS_PROP_EXPAND_IMG_TITLE"/></out:attribute>					</out:otherwise>				</out:choose>				<out:attribute name="src">					<out:choose>						<out:when test="$useDecDisplaySetting='block'">_THIS?frag-resource=/skins/<out:value-of select="$useDecSkin"/>/fragments/images/action_collapse.gif/THIS_</out:when>						<out:otherwise>_THIS?frag-resource=/skins/<out:value-of select="$useDecSkin"/>/fragments/images/action_expand.gif/THIS_</out:otherwise>					</out:choose>				</out:attribute>			</layout:img>			<xsl:copy-of select="layout:hint"/>			<xsl:copy-of select="layout:dynamicarea"/>			<xsl:copy-of select="layout:dynamicareacollapsed"/>		</layout:section>	</xsl:template>		<xsl:template match="*">		<xsl:copy>			<xsl:copy-of select="@*"/>			<xsl:apply-templates/>		</xsl:copy>	</xsl:template>	</xsl:stylesheet>
 |