getSubscriptionContentPortal.xslt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  11. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  12. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  13. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  14. exclude-result-prefixes="xtsext xts pf">
  15. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  16. <pf:variables/>
  17. <xsl:template match="/">
  18. <xts:sequence>
  19. <xts:append>
  20. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  21. <send:request provider="cm">
  22. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  23. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  24. <cm:requests>
  25. <!-- get the subscription agent -->
  26. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  27. <cm:search>
  28. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  29. </cm:search>
  30. <cm:properties>
  31. <cm:property name="defaultName"/>
  32. <cm:property name="defaultDescription"/>
  33. <cm:property name="defaultScreenTip"/>
  34. <cm:property name="report"/>
  35. <cm:property name="permissions"/>
  36. <cm:property name="storeID"/>
  37. <cm:property name="ancestors"/>
  38. </cm:properties>
  39. </cm:query>
  40. <!-- get the schedule - holds information about the periodical producer -->
  41. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  42. <cm:search>
  43. <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/schedule')"/>
  44. </cm:search>
  45. <cm:properties>
  46. <cm:property name="defaultName"/>
  47. <cm:property name="defaultDescription"/>
  48. <cm:property name="defaultScreenTip"/>
  49. <cm:property name="permissions"/>
  50. <cm:property name="storeID"/>
  51. <cm:property name="periodicalProducer"/>
  52. <cm:property name="active"/>
  53. </cm:properties>
  54. <cm:options>
  55. <cm:refProps>
  56. <cm:refProp refPropName="periodicalProducer">
  57. <cm:properties>
  58. <cm:property name="ancestors"/>
  59. <cm:property name="defaultName"/>
  60. <cm:property name="searchPath"/>
  61. </cm:properties>
  62. </cm:refProp>
  63. </cm:refProps>
  64. </cm:options>
  65. </cm:query>
  66. <!-- get all the task definitions - and the objects which they point to -->
  67. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  68. <cm:search>
  69. <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/agentTaskDefinition')"/>
  70. </cm:search>
  71. <cm:properties>
  72. <cm:property name="searchPath"/>
  73. <cm:property name="defaultName"/>
  74. <cm:property name="defaultDescription"/>
  75. <cm:property name="defaultScreenTip"/>
  76. <cm:property name="permissions"/>
  77. <cm:property name="storeID"/>
  78. <cm:property name="taskObject"/>
  79. <cm:property name="filterDataItemName"/>
  80. </cm:properties>
  81. <cm:options>
  82. <cm:refProps>
  83. <cm:refProp refPropName="taskObject">
  84. <cm:properties>
  85. <!-- want the combination of properties for newsitem and memo -->
  86. <cm:property name="searchPath"/>
  87. <cm:property name="defaultName"/>
  88. <cm:property name="defaultDescription"/>
  89. <cm:property name="defaultScreenTip"/>
  90. <cm:property name="options"/>
  91. <cm:property name="permissions"/>
  92. <cm:property name="storeID"/>
  93. <cm:property name="title"/>
  94. <cm:property name="channel"/>
  95. <cm:property name="parameters"/>
  96. </cm:properties>
  97. </cm:refProp>
  98. </cm:refProps>
  99. </cm:options>
  100. </cm:query>
  101. <!-- have to get information about the account -->
  102. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  103. <cm:search>
  104. <xsl:value-of select="'~'"/>
  105. </cm:search>
  106. <cm:properties>
  107. <cm:property name="email"/>
  108. <cm:property name="notificationEMail"/>
  109. </cm:properties>
  110. </cm:query>
  111. </cm:requests>
  112. </cm:query>
  113. </xts:transform>
  114. </send:request>
  115. </xts:transform>
  116. </xts:append>
  117. <!-- need to fire another request - get the information on the parent of the periodical producer -->
  118. <xts:append>
  119. <periodicalProducerParent>
  120. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  121. <send:request provider="cm">
  122. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  123. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  124. <cm:search>
  125. <xts:function name="xmlencode">
  126. <xts:param name="source">
  127. <xts:queryValue select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='ancestors']/*[local-name()='ancestorInfo'][last()]/*[local-name()='searchPath']"/>
  128. </xts:param>
  129. </xts:function>
  130. </cm:search>
  131. <cm:properties>
  132. <cm:property name="searchPath"/>
  133. <cm:property name="permissions"/>
  134. </cm:properties>
  135. </cm:query>
  136. </xts:transform>
  137. </send:request>
  138. </xts:transform>
  139. </periodicalProducerParent>
  140. </xts:append>
  141. <!-- now can start building stuff -->
  142. <xts:append select="/root/env">
  143. <!-- need to get the selectionSpec -->
  144. <xts:transform src="subscribe/transforms/disassembleSelectionSpec.xslt" processor="XSLT">
  145. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  146. <xts:queryValue select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='reportDataServiceAgentDefinition']/*[local-name()='report']"/>
  147. </xts:transform>
  148. <!-- need to the values for the delivery - delivery options themselves though is done separately -->
  149. <xts:transform src="subscribe/transforms/disassembleAgentTasks.xslt" processor="XSLT">
  150. <root>
  151. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='agentTaskDefinition']"/>
  152. </root>
  153. </xts:transform>
  154. <!-- build variables from the schedule -->
  155. <xts:transform src="subscribe/transforms/disassembleAgentSchedule.xslt" processor="XSLT">
  156. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  157. <xts:param name="logicsheet">logicsheets/presentation/controls/framework.xsl</xts:param>
  158. <xts:param name="logicsheet">logicsheets/presentation/controls/presentation.xsl</xts:param>
  159. <root>
  160. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']"/>
  161. <periodicalProducerParent>
  162. <xts:queryNode select="/root/*[local-name()='periodicalProducerParent']/*[local-name()='queryResponse']/*"/>
  163. </periodicalProducerParent>
  164. </root>
  165. </xts:transform>
  166. </xts:append>
  167. </xts:sequence>
  168. </xsl:template>
  169. </xsl:stylesheet>