123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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).
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xtsext cm xsd xsi xts">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="sys-param" match="/root/system/param" use="@name"/>
- <xsl:key name="options" match="/root/cm:account/options/value/item" use="name"/>
-
- <xsl:template match="/root">
- <!-- do we show the summary page? -->
- <xsl:if test="not(key('env-param', 'showSummary')) or key('env-param', 'showSummary') = ''">
- <param name="showSummary">
- <xsl:choose>
- <xsl:when test="key('options', 'showOptionSummary')/value">
- <xsl:choose>
- <xsl:when test="key('options', 'showOptionSummary')/value='true'">
- <xsl:value-of select="'y'"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'n'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('sys-param', 'defaultPortalPreferences')/pref[@name='runoptions']"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xsl:if>
-
- <!-- generate default date and time for run later -->
- <xsl:variable name="timeZone" select="/root/user/param[@name='timeZoneID']"/>
- <xsl:variable name="xsl_UTC_timeformat" select="'yyyy-MM-dd HH:mm:00'"/>
- <xsl:variable name="xsl_run_date" select="xtsext:getCurrentDateTime(string($timeZone))"/>
- <xsl:if test="not(key('env-param', 'p_runDate')) or key('env-param','p_runDate') = ''">
- <param name="p_runDate">
- <xsl:value-of select="substring(string($xsl_run_date), 1, 10)"/>
- </param>
- </xsl:if>
- <xsl:if test="not(key('env-param', 'p_runTime')) or key('env-param', 'p_runTime') = ''">
- <param name="p_runTime">
- <xsl:value-of select="concat(substring(string($xsl_run_date), 12, 19), '.000')"/>
- </param>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
|