expandSelectedEntries.xslt 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: HTS
  5. (C) Copyright IBM Corp. 2005, 2010
  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. exclude-result-prefixes="xsl dlgctrl xtsext req-params xts">
  15. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  16. <xsl:template match="/">
  17. <xts:sequence>
  18. <xts:append select="/root">
  19. <potentialOwners>
  20. <xts:transform src="myinbox/transforms/buildEntries.xslt" processor="XSLT">
  21. <root>
  22. <env>
  23. <param name="selectedCamIds"><xsl:value-of select="/root/env/param[@name='selectedPotentialOwnersCamIds']"/></param>
  24. <param name="type"><xsl:value-of select="'to'"/></param>
  25. </env>
  26. </root>
  27. </xts:transform>
  28. </potentialOwners>
  29. </xts:append>
  30. <!--
  31. Send in the ones we built so we can identify duplicated i.e. ones that
  32. Exist in both pots and stakeholders
  33. -->
  34. <xts:append select="/root">
  35. <xts:transform src="myinbox/transforms/buildEntries.xslt" processor="XSLT">
  36. <root>
  37. <env>
  38. <param name="selectedCamIds"><xsl:value-of select="/root/env/param[@name='selectedStakeHoldersCamIds']"/></param>
  39. <param name="type"><xsl:value-of select="'cc'"/></param>
  40. <param name="currentEntries"><xts:queryNode select="/root/potentialOwners/selectedEntries/*"/></param>
  41. </env>
  42. </root>
  43. </xts:transform>
  44. </xts:append>
  45. <!-- Delete the nodes that exist in both stake and pots -->
  46. <xts:delete select="/root/potentialOwners/selectedEntries/selectedEntry[./searchPath = /root/selectedEntries/selectedEntry[count(./type) > 1 ]/searchPath]" mandatory="false"/>
  47. <!-- Append the rest, or what is left after deletion -->
  48. <xts:append select="/root/selectedEntries">
  49. <xts:queryNode select="/root/potentialOwners/selectedEntries/*"/>
  50. </xts:append>
  51. </xts:sequence>
  52. </xsl:template>
  53. </xsl:stylesheet>