decodeAgentDefinition.xslt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. <!--
  9. ================================================================================
  10. decodeAgentDefinition
  11. a block which takes all the saved actions in the index and expands them into individual blocks
  12. ===============================================================================================
  13. -->
  14. <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="xtsext">
  15. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  16. <xsl:template match="/">
  17. <!-- copy the agent_definition blob out again -->
  18. <xsl:copy-of select="/root/agent_definition"/>
  19. <!-- expand each of the agent tasks -->
  20. <xsl:for-each select="/root/agent_definition/items/item">
  21. <xsl:element name="agent_item">
  22. <xsl:attribute name="type"><xsl:value-of select="./type"/></xsl:attribute>
  23. <xsl:attribute name="id"><xsl:value-of select="./id"/></xsl:attribute>
  24. <xsl:attribute name="name"><xsl:value-of select="./name"/></xsl:attribute>
  25. <xsl:variable name="id" select="./id"/>
  26. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_save001',string(/root/param[@name=$id])), true())" disable-output-escaping="yes"/>
  27. </xsl:element>
  28. </xsl:for-each>
  29. <!-- decode the schedule parameters if there are any -->
  30. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_save001',string(/root/param[@name='AgentTask-schedule'])), true())" disable-output-escaping="yes"/>
  31. </xsl:template>
  32. </xsl:stylesheet>