encode.xslt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2011
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  15. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  16. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  17. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  18. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  19. <pf:serialize-xml/>
  20. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  21. <xsl:template match="/">
  22. <xts:sequence>
  23. <xts:delete select="/root/env/param[@name='credential_list']"/>
  24. <xts:append select="/root/env">
  25. <param name="credential_list">
  26. <xsl:variable name="markup">
  27. <xsl:apply-templates select="/root/list/*" mode="markup"/>
  28. </xsl:variable>
  29. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup),true()))"/>
  30. </param>
  31. </xts:append>
  32. </xts:sequence>
  33. </xsl:template>
  34. </xsl:stylesheet>