123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2010
- 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 variables and templates used in the schedule pages -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cogadminext="xalan://com.cognos.admin.xts.ext.XTSExt"
- xmlns:sch="http://developer.cognos.com/schemas/xts/schedule"
- exclude-result-prefixes="xsl xtsext xts">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- Template used to query histories from a list of object path
- It also calculates the the duration for the last successful execution
- It used the following var to be defined when the xsl (see out prefix) is executed
- - searchPath: contains the list of path to the objects with histories
- - noHistoryMsgForLastExcutionTime: message to be displayed when no history is found for a given path.
- - maxHistoryObjects: max number of objects returned by cm
- The following node are also required from within the block:
- - asyncRequestResponse: result from the JSM query,
- - header: used to build the cm query,
- - session: used to get the locales
- -->
- <xsl:template match="sch:queryHistoriesFromScheduledActvities">
- <xts:append select="/root">
- <xts:transform src="cogadmin/controls/transforms/calculate_history_duration.xslt" processor="XSLT">
- <activityHistory>
- <out:if test="count($searchPath) > 0">
- <productLocale><out:value-of select="/root/session/param[@name='productLocale']"/></productLocale>
- <contentLocale><out:value-of select="/root/session/param[@name='contentLocale']"/></contentLocale>
- <noHistoryForLastExcutionTime><out:value-of select="$noHistoryMsgForLastExcutionTime"/></noHistoryForLastExcutionTime>
- <out:for-each select="$searchPath">
- <schedule>
- <path><out:value-of select="."/></path>
- </schedule>
- </out:for-each>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <out:for-each select="$searchPath">
- <cm:query>
- <cm:search><out:value-of select="concat(current(),'/history')"/>[@status='succeeded']</cm:search>
- <cm:properties>
- <cm:property name="actualExecutionTime"/>
- <cm:property name="actualCompletionTime"/>
- <cm:property name="parent"/>
- </cm:properties>
- <cm:options>
- <cm:maxObjects><out:value-of select="$maxHistoryObjects"/></cm:maxObjects>
- </cm:options>
- <cm:sortBy>
- <cm:sort name="actualExecutionTime" order="descending"/>
- </cm:sortBy>
- </cm:query>
- </out:for-each>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </out:if>
- </activityHistory>
- </xts:transform>
- </xts:append>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
- </xsl:stylesheet>
|