disassembleAgentSchedule.xslt 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ASV
  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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="bus xtsext cf cm pf">
  9. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  10. <pf:variables/>
  11. <xsl:template match="/">
  12. <xsl:if test="/root/*[local-name()='schedule']/*[local-name()='active']='false'">
  13. <param name="m_subData_active_schedule">
  14. <xsl:text>true</xsl:text>
  15. </param>
  16. </xsl:if>
  17. <param name="m_subData_periodical_producer_defaultName">
  18. <xsl:value-of select="/root/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='defaultName']"/>
  19. </param>
  20. <param name="m_subData_periodical_producer">
  21. <xsl:value-of select="/root/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='searchPath']"/>
  22. </param>
  23. <param name="m_subData_periodical_producer_parent_searchPath">
  24. <xsl:value-of select="/root/*[local-name()='periodicalProducerParent']/*/*[local-name()='searchPath']"/>
  25. </param>
  26. <param name="m_subData_periodical_producer_parent_permissions">
  27. <xsl:value-of select="/root/*[local-name()='periodicalProducerParent']/*/*[local-name()='permissions']"/>
  28. </param>
  29. <xsl:variable name="the-object" select="/root/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*"/>
  30. <xsl:variable name="start-at-path">
  31. <xsl:choose>
  32. <xsl:when test="starts-with($the-object/*[local-name()='searchPath'], key('session-param', 'e_hp')) or (starts-with($the-object/*[local-name()='searchPath'], '~'))">
  33. <xsl:value-of select="concat(key('session-param', 'e_hp'),'/folder')"/>
  34. </xsl:when>
  35. <xsl:when test="starts-with($the-object/*[local-name()='searchPath'],'/content')">
  36. <xsl:value-of select="$defaultContentRoot"/>
  37. </xsl:when>
  38. </xsl:choose>
  39. </xsl:variable>
  40. <param name="m_subData_periodical_producer_path">
  41. <cf:do-the-path-link>
  42. <cf:param name="familytree">/root/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='ancestors']</cf:param>
  43. <cf:param name="familymember">/root/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='defaultName']</cf:param>
  44. <cf:param name="home"><xsl:value-of select="$start-at-path"/></cf:param>
  45. <cf:param name="onlyAncestors">true</cf:param>
  46. </cf:do-the-path-link>
  47. </param>
  48. </xsl:template>
  49. </xsl:stylesheet>