123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/"
- exclude-result-prefixes="xsl xts cm rui">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- Template - rui:variables:
- This template defines global variables used in the schudule dialog
- -->
- <xsl:template match="rui:variables">
-
- <out:variable name="scheduleCredentialSearchPathProperty">
- <out:choose>
- <out:when test="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:credential/cm:credential/cm:searchPath">
- <out:value-of select="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:credential/cm:credential/cm:searchPath"/>
- </out:when>
- <out:when test="/root/scheduleCredentials/credential/cm:credential/cm:searchPath">
- <out:value-of select="/root/scheduleCredentials/credential/cm:credential/cm:searchPath"/>
- </out:when>
- <out:otherwise>unavailable</out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="userCredentialSearchPathProperty">
- <out:choose>
- <out:when test="/root/cm:queryResponse/cm:queryReply/cm:credential/cm:searchPath">
- <out:value-of select="/root/cm:queryResponse/cm:queryReply/cm:credential/cm:searchPath"/>
- </out:when>
- <out:otherwise>unavailable</out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="scheduleCredentialDefaultName">
- <out:choose>
- <out:when test="root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:defaultName">
- <out:value-of select="root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:defaultName"/>
- <out:if test="root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:userName!=''">
- <out:value-of select="concat(' (',root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:userName,')')"/>
- </out:if>
- </out:when>
- </out:choose>
- </out:variable>
-
- <out:variable name="userCredentialDefaultName">
- <out:choose>
- <out:when test="root/credentialInfo/cm:queryResponse/cm:queryReply[1]/cm:account/cm:defaultName">
- <out:value-of select="root/credentialInfo/cm:queryResponse/cm:queryReply[1]/cm:account/cm:defaultName"/>
- <out:if test="root/credentialInfo/cm:queryResponse/cm:queryReply[1]/cm:account/cm:userName!=''">
- <out:value-of select="concat(' (',root/credentialInfo/cm:queryResponse/cm:queryReply[1]/cm:account/cm:userName,')')"/>
- </out:if>
- </out:when>
- </out:choose>
- </out:variable>
-
- <out:variable name="scheduleExists">
- <out:choose>
- <out:when test="/root/cm:queryResponse/cm:queryReply/cm:schedule">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="userCredentialsExist">
- <out:choose>
- <out:when test="$userCredentialSearchPathProperty='unavailable'">false</out:when>
- <out:otherwise>true</out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="scheduleCredentialsExist">
- <out:choose>
- <out:when test="$scheduleCredentialSearchPathProperty='unavailable'">false</out:when>
- <out:otherwise>true</out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="scheduleCredentialDetailsUnavailable">
- <out:choose>
- <out:when test="$scheduleCredentialsExist='true' and (not(root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:defaultName) or root/credentialInfo/cm:queryResponse/cm:queryReply[2]/cm:account/cm:defaultName='')">true</out:when>
- <out:otherwise>false</out:otherwise>
- </out:choose>
- </out:variable>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|