decodeExistingParameters.xslt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xts xsl xtsext pf">
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2009
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  9. <pf:variables/>
  10. <xsl:template match="/">
  11. <xts:sequence>
  12. <xts:append select="/root">
  13. <xsl:if test="/root/env/param[@name='m_rp_parameters']">
  14. <xsl:value-of select="xtsext:web64decode(string(/root/env/param[@name='m_rp_parameters']), true())" disable-output-escaping="yes"/>
  15. </xsl:if>
  16. <xsl:element name="agent_item">
  17. <xsl:if test="/root/env/param[@name='taskParameters'] and /root/env/param[@name='taskParameters'] != ''">
  18. <!-- the params from cm created in load agent should contain a root element of parameters -->
  19. <xsl:value-of select="xtsext:web64decode( string( /root/env/param[@name='taskParameters'] ), true() )" disable-output-escaping="yes"/>
  20. </xsl:if>
  21. </xsl:element>
  22. <!--xsl:if test="/root/env/param[@name='deliveryOptions']">
  23. <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( /root/env/param[@name = 'deliveryOptions'] )), true() )" disable-output-escaping="yes"/>
  24. </xsl:if-->
  25. </xts:append>
  26. <!-- Delete all paramterers -->
  27. <xsl:if test="/root/env/param[@name='cleared_prompts'] = 'true'">
  28. <xts:delete select="/root/env/param[starts-with(@name,'pv_')]"/>
  29. </xsl:if>
  30. <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
  31. </xts:sequence>
  32. </xsl:template>
  33. </xsl:stylesheet>