createParametersBlob.xslt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xts xsl pf xtsext">
  9. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  10. <xsl:template match="/">
  11. <xts:sequence>
  12. <xts:delete select="/root/env/param[@name='taskParameters']"/>
  13. <!-- possible there may be no saved or recently created parm values -->
  14. <xsl:if test="/root/agent_item/parameterData">
  15. <!-- we also want to recreate the blob with the new param values from rs and the retrieved vals from cm-->
  16. <xsl:variable name="serialized_task_parameters">
  17. <xsl:call-template name="serialize-xml">
  18. <xsl:with-param name="node-set" select="/root/agent_item/parameterData"/>
  19. </xsl:call-template>
  20. </xsl:variable>
  21. <!-- build the task blob and whack it in with the other env params-->
  22. <xts:append select="/root/env">
  23. <param name="taskParameters">
  24. <xsl:value-of select="xtsext:web64encode( string( $serialized_task_parameters ), true())"/>
  25. </param>
  26. </xts:append>
  27. </xsl:if>
  28. <xts:delete select="/root/env/param[@name='controller_state']"/>
  29. <!-- This is not used after the parameters have been merged and blobed.-->
  30. <xts:delete select="/root/parameters"/>
  31. </xts:sequence>
  32. </xsl:template>
  33. <pf:serialize-xml/>
  34. </xsl:stylesheet>