1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2009
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xtscm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" exclude-result-prefixes="send xtsext xtscm form">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:for-each select="/root/agent_item">
- <xsl:variable name="position" select="position()"/>
- <xsl:choose>
- <!-- that's nice - this drops to something small and fluffy -->
- <xsl:when test="./@type='job' or ./@type='agent' ">
- <xts:append select="/root/agent_item[{$position}]">
- <xsl:value-of select="xtsext:web64decode( string(./param[@name = 'emailToRunOptions']), true() )" disable-output-escaping="yes"/>
- </xts:append>
- <xts:delete select="/root/agent_item[{$position}]/param[@name = 'emailToRunOptions']"/>
- </xsl:when>
- <xsl:when test="./@type='report' and ./param[@name='deliveryOptions']">
- <!-- we want to decode the message blob in here -->
- <xts:append select="/root/agent_item[{$position}]">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(./param[@name='deliveryOptions'])), true())"/>
- </xts:transform>
- </xts:append>
- </xsl:when>
- <xsl:when test="./@type='report' and ./param[@name='mobileOptions']">
- <!-- we want to decode the message blob in here -->
- <xts:append select="/root/agent_item[{$position}]">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(./param[@name='mobileOptions'])), true())"/>
- </xts:transform>
- </xts:append>
- </xsl:when>
- <!-- expand the information for an sql -->
- <xsl:when test="./@type='sql'">
- <!-- not sure that we have anything to do here - and some of the above are dodgy too -->
- </xsl:when>
- <xsl:when test="./@type='approval' or ./@type='notification' ">
- <!-- we want to decode the message blob in here -->
- <xts:append select="/root/agent_item[{$position}]">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(./param[@name='taskOptions'])), true())"/>
- </xts:transform>
- </xts:append>
- </xsl:when>
- <xsl:when test="./@type='message'">
- <!-- we want to decode the message blob in here -->
- <xts:append select="/root/agent_item[{$position}]">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(./param[@name='options'])), true())"/>
- </xts:transform>
- </xts:append>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|