generate_default_mobile_options.xslt 1.6 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. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  11. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  12. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  13. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  14. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  15. exclude-result-prefixes="xsl dlgctrl xtsext req-params xts cm">
  16. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  17. <xsl:template match="/">
  18. <xts:sequence>
  19. <!-- simulates the response from the addentries morphlet for a single user. This information is
  20. used for the "Send to my mobile device" option -->
  21. <xts:append>
  22. <selectedEntries>
  23. <account xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  24. <type>to</type>
  25. <searchPath><xsl:value-of select="/root/cm:queryResponse/cm:queryReply[3]/*/cm:searchPath"/></searchPath>
  26. <defaultName><xsl:value-of select="/root/cm:queryResponse/cm:queryReply[3]/*/cm:defaultName"/></defaultName>
  27. <userName><xsl:value-of select="/root/cm:queryResponse/cm:queryReply[3]/*/cm:userName"/></userName>
  28. </account>
  29. </selectedEntries>
  30. </xts:append>
  31. </xts:sequence>
  32. </xsl:template>
  33. </xsl:stylesheet>