123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
-
- <xsl:for-each select="/root/agent_item[@type='report' or @type='content' or @type='index']">
- <xsl:variable name="taskType" select="@type"/>
- <xsl:variable name="pos" select="position()"/>
- <xsl:variable name="id" select="./@id"/>
- <xsl:variable name="inputBlob">
- <xsl:choose>
- <xsl:when test="@type='report'">reportOptions</xsl:when>
- <xsl:when test="@type='content'">cmOptions</xsl:when>
- <xsl:when test="@type='index'">cmOptions</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="options" select="/root/agent_item[@id=$id]/param[@name=$inputBlob]"/>
-
-
- /root/agent_item/options
- <xsl:if test="$options!=''">
-
- <xts:append select="/root/agent_item[@id='{$id}'][@type='{$taskType}']">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_settemplatename_decodereportoptions_settemplateid_decodereportoptions001',string($options)), true() )"/>
- </xts:transform>
- </xts:append>
-
- <xts:replace select="/root/agent_item[@id='{$id}'][@type='{$taskType}']/{$inputBlob}">
- <xts:queryNode select="/root/agent_item[@id='{$id}'][@type='{$taskType}']/{$inputBlob}/*[local-name()='options']"/>
- </xts:replace>
- </xsl:if>
- </xsl:for-each>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|