properties_target.xts 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. *****************************************************************
  4. ** Licensed Materials - Property of IBM
  5. **
  6. ** IBM Cognos Products: drill
  7. **
  8. ** (C) Copyright IBM Corp. 2001, 2015
  9. **
  10. ** US Government Users Restricted Rights - Use, duplication or
  11. ** disclosure restricted by GSA ADP Schedule Contract with
  12. ** IBM Corp.
  13. *****************************************************************
  14. -->
  15. <!--
  16. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  17. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  18. -->
  19. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/drill.xml,messages/portal.xml, messages/portalRL.xml">
  20. <!-- Load object-specific property tabs map ============================================================== -->
  21. <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
  22. <!-- Handle all form information when prompting complete -->
  23. <xts:block id="formlogic_initial" type="exec" mode="interpret" dependency="getTabs" condition=".[/root/env/param[@name='m_obj']]" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http" mandatory="false"/>
  24. <!-- Get the target associated with this drillthru object. (Do not do when handling prompt processing - determined by the method parameter) -->
  25. <xts:block id="getContent" path="/portal/drillthru/common/request/get_target_content.xslt" processor="XSLT" dependency="getTabs formlogic_initial" condition=".[/root/env/param[@name='m_obj']]" type="exec" mode="interpret" mandatory="false" nodelist="env,header">
  26. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  27. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  28. <xts:logicsheet path="logicsheets/portal.xsl"/>
  29. </xts:block>
  30. <!--
  31. ===============================================================================================
  32. getRoutingServerContent - Get the routing server information from CM
  33. In addition this block also get the target information for Abacab targets
  34. ===============================================================================================
  35. -->
  36. <xts:block id="getRoutingServerContent"
  37. dependency="getContent"
  38. processor="XSLT" type="exec" mandatory="false"
  39. condition=".[/root/env/param[@name='m_obj'] and ((/root/env/param[@name='m_p_target'] and /root/env/param[@name='m_p_target']!='') or /root/*[local-name()='queryResponse']/*/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView'] or /root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package'])]" nodelist="env,header,queryResponse">
  40. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  41. <xsl:stylesheet version="1.0"
  42. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  43. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  44. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  45. xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl send xts cm">
  46. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  47. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  48. <xsl:variable name="useTarget">
  49. <xsl:choose>
  50. <xsl:when test="string(key('env-param','m_p_target'))!='false' and string(key('env-param','m_p_target'))!=''">
  51. <xsl:value-of select="key('env-param','m_p_target')"/>
  52. </xsl:when>
  53. <xsl:when test="string(key('env-param','so.searchPath'))!=''">
  54. <xsl:value-of select="key('env-param','so.searchPath')"/>
  55. </xsl:when>
  56. <!--This is used in case of Abacab targets. to get the target search path stored in deploymentReferences -->
  57. <!-- TODO: when we stop using target property completely and only use drill specification and deployment references we have to modify this code-->
  58. <xsl:when test="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package']">
  59. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package']/*[local-name()='searchPath']"/>
  60. </xsl:when>
  61. <xsl:otherwise>
  62. <xsl:value-of select="/root/*[local-name()='queryResponse']/*/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView']/*[local-name()='searchPath']"/>
  63. </xsl:otherwise>
  64. </xsl:choose>
  65. </xsl:variable>
  66. <xsl:template match="/">
  67. <xts:sequence>
  68. <!-- Start of CM call for Abacab targets -->
  69. <!--This is a CM call that is used in case of having Abacab targets. Since in this case we don't save target in the drill object we don't get the required information for that
  70. as the result we have to send a CM request to get that informatin. We send that request using the search path that we stored in the options/promptformat
  71. TODO: This should be moved to the getContent block for clean up
  72. -->
  73. <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package']">
  74. <xts:append>
  75. <target>
  76. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  77. <send:request provider="cm">
  78. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  79. <cm:query>
  80. <cm:search><xsl:value-of select="$useTarget"/></cm:search>
  81. <cm:properties>
  82. <cm:property name="defaultName"/>
  83. <cm:property name="searchPath"/>
  84. <cm:property name="ancestors"/>
  85. <cm:property name="permissions"/>
  86. <cm:property name="parent"/>
  87. <cm:property name="base"/>
  88. </cm:properties>
  89. <cm:options maxObjects="1"/>
  90. </cm:query>
  91. </xts:transform>
  92. </send:request>
  93. </xts:transform>
  94. </target>
  95. </xts:append>
  96. </xsl:if>
  97. <!--End of CM call for Abacab targets-->
  98. <xts:append>
  99. <routing>
  100. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  101. <send:request provider="cm">
  102. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  103. <cm:query>
  104. <cm:search>
  105. <xsl:value-of select="$useTarget"/>
  106. </cm:search>
  107. <cm:properties>
  108. <cm:property name="searchPath"/>
  109. <cm:property name="routingServerGroup"/>
  110. </cm:properties>
  111. </cm:query>
  112. </xts:transform>
  113. </send:request>
  114. </xts:transform>
  115. </routing>
  116. </xts:append>
  117. <xts:append select="/root/env">
  118. <param name="routingServerGroup">
  119. <xts:queryValue select="/root/routing/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/>
  120. </param>
  121. </xts:append>
  122. <xts:delete select="/root/routing"/>
  123. </xts:sequence>
  124. </xsl:template>
  125. </xsl:stylesheet>
  126. </xts:block>
  127. <!--
  128. ===============================================================================================
  129. cleandrill - Set up the environment prior to getting scope metadata and target parameters
  130. ===============================================================================================
  131. -->
  132. <xts:block id="cleandrill" type="exec" mode="interpret" dependency="getContent getTabs getRoutingServerContent" processor="XSLT" path="/portal/drillthru/common/response/cleandrill.xslt" condition=".[(/root/env/param[@name='dp_path' or @name='selected_query' or @name='selected_scope' or @name='selected_param' or @name='so.searchPath'])]" mandatory="false" nodelist="env,header,promptRequest,target">
  133. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  134. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  135. </xts:block>
  136. <!--
  137. ===============================================================================================
  138. execute-method-metadata - check for prompt processing (ambiguous connection / database login prompting) to get the scope information.
  139. ===============================================================================================
  140. -->
  141. <!-- <xts:block id="execute-method-metadata" dependency="getContent getRoutingServerContent cleandrill" processor="XSLT" condition=".[not(/root/env/param[@name='m_p_scope']) and (((not(/root/env/param[@name='execMethod']) and /root/*[local-name()='queryResponse']/*/*[local-name()='scope']/*[local-name()='metadataModelItemName']) or (/root/env/param[@name='execMethod']='metadata' and (/root/env/param[@name='method' and (string(.)='forward' or string(.)='cancel' or string(.)='finish' or string(.)='wait' or string(.)='back' or string(.)='edit' or string(.)='')]))))]" type="exec" mandatory="false"> -->
  142. <xts:block id="execute-method-metadata" dependency="getContent getRoutingServerContent cleandrill" processor="XSLT" condition=".[not(/root/env/param[@name='m_p_scope']) and not(/root/env/param[@name='m_p_bookmarkItem']) and not(/root/env/param[starts-with(@name,'drillParam_')]) and (((not(/root/env/param[@name='execMethod']) and (/root/*[local-name()='queryResponse']/*/*[local-name()='scope']/*[local-name()='metadataModelItemName'] or /root/*[local-name()='queryResponse']/*/*[local-name()='bookmarkItem']/*[local-name()='value'] or (/root/*[local-name()='queryResponse']/*/*[local-name()='parameterAssignments']/*/*[local-name()='dataItemName'] and /root/*[local-name()='queryResponse']/*/*[local-name()='parameterAssignments']/*/*[local-name()='dataItemName'] !='' )) or (/root/env/param[@name='execMethod']='metadata' and (/root/env/param[@name='method' and (string(.)='forward' or string(.)='cancel' or string(.)='finish' or string(.)='wait' or string(.)='back' or string(.)='edit' or string(.)='')])))))]" type="exec" mandatory="false">
  143. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  144. <xsl:stylesheet version="1.0"
  145. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  146. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  147. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  148. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  149. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" exclude-result-prefixes="xsl prompt send xts xtsext">
  150. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  151. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  152. <xsl:template match="/">
  153. <xts:sequence>
  154. <xsl:variable name="useTarget">
  155. <xsl:choose>
  156. <xsl:when test="string(key('env-param','m_p_target'))!=''">
  157. <xsl:value-of select="key('env-param','m_p_target')"/>
  158. </xsl:when>
  159. <!--This is used in case of Abacab targets. to get the target search path stored in deploymentReferences -->
  160. <!-- TODO: when we stop using target property completely and only use drill specification and deployment references we have to modify this code-->
  161. <xsl:when test="not(/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView'])">
  162. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package']/*[local-name()='searchPath']"/>
  163. </xsl:when>
  164. <xsl:otherwise>
  165. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView']/*[local-name()='searchPath']"/>
  166. </xsl:otherwise>
  167. </xsl:choose>
  168. </xsl:variable>
  169. <xsl:variable name="useScope" select="/root/*[local-name()='queryResponse']/*/*[local-name()='scope']/*[local-name()='metadataModelItemName']"/>
  170. <xsl:variable name="useBMItem" select="/root/*[local-name()='queryResponse']/*/*[local-name()='bookmarkItem']/*[local-name()='value']"/>
  171. <xsl:variable name="useParams" select="/root/*[local-name()='queryResponse']/*/*[local-name()='parameterAssignments']"/>
  172. <xsl:variable name="returnTo">
  173. <xsl:choose>
  174. <xsl:when test="string(key('env-param','ps_nav_stack'))!=''">
  175. <xsl:value-of select="key('env-param','ps_nav_stack')"/>
  176. </xsl:when>
  177. <xsl:otherwise>portal/properties_general.xts</xsl:otherwise>
  178. </xsl:choose>
  179. </xsl:variable>
  180. <xsl:variable name="returnOp">
  181. <xsl:choose>
  182. <xsl:when test="string(key('env-param','ps_nav_stack'))!=''">pop</xsl:when>
  183. <xsl:otherwise>maintain</xsl:otherwise>
  184. </xsl:choose>
  185. </xsl:variable>
  186. <xsl:if test="not(key('env-param','method'))">
  187. <xts:append select="/root/env">
  188. <param name="method">
  189. <xsl:value-of select="'edit'"/>
  190. </param>
  191. </xts:append>
  192. <!-- Due to having 2 prompting requests in one morphlet, required to store the current env outside the call to collect, so correct environment is restored -->
  193. <xts:delete select="/root/callerAdminState"/>
  194. <xts:append>
  195. <callerAdminState>
  196. <xts:function name="web64encode">
  197. <xts:param name="source">
  198. <xts:transform name="XMLEncode">
  199. <xsl:copy-of select="/root/env/param[@name != 'method' and @name != 'cleared_prompts' and @name != 'execMethod' and @name!='m_p_target']"/>
  200. <param name="cleared_prompts">false</param>
  201. <param name="execMethod">metadata</param>
  202. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  203. <xsl:if test="$useScope!=''">
  204. <param name="startScopeAt"><xsl:value-of select="$useScope"/></param>
  205. </xsl:if>
  206. <xsl:if test="$useBMItem!=''">
  207. <param name="startBMItemAt"><xsl:value-of select="$useBMItem"/></param>
  208. </xsl:if>
  209. <xsl:if test="$useParams/*/*[local-name()='dataItemName' and string(.)!='']">
  210. <xsl:for-each select="$useParams/*/*[local-name()='dataItemName']">
  211. <xsl:if test="string(.)!=''">
  212. <xsl:variable name="pnam" select="../*[local-name()='parameterName']"/>
  213. <xsl:variable name="name">
  214. <xsl:if test="$pnam!=''"><xsl:value-of select="xtsext:web64encode($pnam,true())"/></xsl:if>
  215. </xsl:variable>
  216. <param name="startDataItemAt_{$name}"><xsl:value-of select="string(.)"/></param>
  217. </xsl:if>
  218. </xsl:for-each>
  219. </xsl:if>
  220. </xts:transform>
  221. </xts:param>
  222. <xts:param name="compress">true</xts:param>
  223. </xts:function>
  224. </callerAdminState>
  225. </xts:append>
  226. </xsl:if>
  227. <!-- Required so that check-state-metadata will trigger -->
  228. <xts:delete select="/root/env/param[@name='execMethod']"/>
  229. <xts:append select="/root/env">
  230. <param name="execMethod">metadata</param>
  231. </xts:append>
  232. <xts:append>
  233. <promptRequest>
  234. <send:request provider="xts" option="xml-multipart">
  235. <xsl:choose>
  236. <xsl:when test="not(key('env-param','method')) or key('env-param','method') = 'edit' ">
  237. <prompt:collect>
  238. <metaDataRequest>true</metaDataRequest>
  239. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  240. <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
  241. <runAsync>true</runAsync>
  242. <promptObject><xsl:value-of select="key('env-param','m_path')"/></promptObject>
  243. <showNoPromptsWarning>false</showNoPromptsWarning>
  244. <routingServerGroup><xsl:value-of select="key('env-param','routingServerGroup')"/></routingServerGroup>
  245. <addToPromptingEnv>
  246. <param name="execMethod">metadata</param>
  247. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  248. <!-- <param name="hasScope"><xsl:value-of select="$useScope"/></param>
  249. <param name="hasBMItem"><xsl:value-of select="$useBMItem"/></param>
  250. <param name="hasParams"><xsl:value-of select="string($useParams/*/*[local-name()='dataItemName' and string(.)!=''])!=''"/></param> -->
  251. <xsl:if test="$useScope!=''">
  252. <param name="startScopeAt"><xsl:value-of select="$useScope"/></param>
  253. </xsl:if>
  254. <xsl:if test="$useBMItem!=''">
  255. <param name="startBMItemAt"><xsl:value-of select="$useBMItem"/></param>
  256. </xsl:if>
  257. <xsl:if test="$useParams/*/*[local-name()='dataItemName' and string(.)!='']">
  258. <xsl:for-each select="$useParams/*/*[local-name()='dataItemName']">
  259. <xsl:if test="string(.)!=''">
  260. <xsl:variable name="pnam" select="../*[local-name()='parameterName']"/>
  261. <xsl:variable name="name">
  262. <xsl:if test="$pnam!=''"><xsl:value-of select="xtsext:web64encode($pnam,true())"/></xsl:if>
  263. </xsl:variable>
  264. <param name="startDataItemAt_{$name}"><xsl:value-of select="string(.)"/></param>
  265. </xsl:if>
  266. </xsl:for-each>
  267. </xsl:if>
  268. </addToPromptingEnv>
  269. <callerAdminState><xts:queryValue select="/root/callerAdminState"/></callerAdminState>
  270. </prompt:collect>
  271. </xsl:when>
  272. <xsl:otherwise>
  273. <xsl:element name="{key('env-param','method')}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
  274. <metaDataRequest>true</metaDataRequest>
  275. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  276. <addToPromptingEnv>
  277. <param name="execMethod">metadata</param>
  278. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  279. <param name="startScopeAt"><xsl:value-of select="key('env-param','startScopeAt')"/></param>
  280. <param name="startBMItemAt"><xsl:value-of select="key('env-param','startBMItemAt')"/></param>
  281. <xsl:for-each select="/root/env/param[starts-with(@name,'startDataItemAt_')]">
  282. <param name="{@name}"><xsl:value-of select="string(.)"/></param>
  283. </xsl:for-each>
  284. </addToPromptingEnv>
  285. <ps_nav_op>maintain</ps_nav_op>
  286. <showNoPromptsWarning>false</showNoPromptsWarning>
  287. <callFinish>true</callFinish>
  288. </xsl:element>
  289. </xsl:otherwise>
  290. </xsl:choose>
  291. </send:request>
  292. </promptRequest>
  293. </xts:append>
  294. </xts:sequence>
  295. </xsl:template>
  296. </xsl:stylesheet>
  297. </xts:block>
  298. <!--
  299. ===============================================================================================
  300. check-state-metadata - check for any prompting completion (ambiguous connection / database login prompting).
  301. ===============================================================================================
  302. -->
  303. <xts:block id="check-state-metadata" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method-metadata" condition=".[(/root/env/param[@name='execMethod']='metadata' and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']=''))]" mandatory="false" nodelist="env,header,session,credential,cookies,output,promptRequest, callerAdminState">
  304. <xts:logicsheet path="logicsheets/portal.xsl"/>
  305. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  306. </xts:block>
  307. <!--
  308. ===============================================================================================
  309. metadataInfo - Set the acquiredScope, acquiredBookmarkItem, and acquiredDataItem:reportParamName params retrieved by the execute-method-metadata
  310. ===============================================================================================
  311. -->
  312. <xts:block id="metadataInfo" dependency="execute-method-metadata check-state-metadata" processor="XSLT" type="exec" mandatory="false" condition=".[(/root/env/param[@name='m_p_scope'] and /root/env/param[@name='execMethod']='metadata') or (/root/*[local-name()='view']='properties' and /root/env/param[@name='execMethod']='metadata')]" nodelist="env,header,queryResponse,promptRequest,view">
  313. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  314. <xsl:stylesheet version="1.0"
  315. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  316. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  317. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  318. xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl send xts cm">
  319. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  320. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  321. <xsl:template match="/">
  322. <xts:sequence>
  323. <!-- Clean up env before getting the target prompts -->
  324. <xts:delete select="/root/env/param[@name='method' or @name='execMethod' or @name='acquiredScope' or @name='cleared_prompts' or @name='startScopeAt' or @name='startBMItemAt' or starts-with(string(@name),'startDataItemAt_')]"/>
  325. <!-- Store the retrieved scope -->
  326. <xsl:if test="key('env-param','startScopeAt')">
  327. <xts:append select="/root/env">
  328. <param name="acquiredScope">
  329. <xsl:value-of select="/root/*[local-name()='promptRequest']/*[contains(local-name(),'Response')]/*[local-name()='metadataResponse']//*[string(@_path)=string(key('env-param','startScopeAt'))]/@_ref"/>
  330. </param>
  331. </xts:append>
  332. </xsl:if>
  333. <xsl:if test="key('env-param','startBMItemAt')">
  334. <xts:append select="/root/env">
  335. <param name="acquiredBookMarkItem">
  336. <xsl:value-of select="/root/*[local-name()='promptRequest']/*[contains(local-name(),'Response')]/*[local-name()='metadataResponse']//*[string(@_path)=string(key('env-param','startBMItemAt'))]/@_ref"/>
  337. </param>
  338. </xts:append>
  339. </xsl:if>
  340. <xsl:if test="/root/env/param[starts-with(string(@name),'startDataItemAt_')]">
  341. <xts:append select="/root/env">
  342. <xsl:for-each select="/root/env/param[starts-with(string(@name),'startDataItemAt_')]">
  343. <xsl:variable name="din" select="substring-after(@name,'startDataItemAt_')"/>
  344. <xsl:variable name="val" select="string(.)"/>
  345. <param name="acquiredDataItem:{$din}">
  346. <xsl:value-of select="/root/*[local-name()='promptRequest']/*[contains(local-name(),'Response')]/*[local-name()='metadataResponse']//*[string(@_path)=string($val)]/@_ref"/>
  347. </param>
  348. </xsl:for-each>
  349. </xts:append>
  350. <!-- <xsl:for-each select="">
  351. <xts:append select="/root/env">
  352. <param name="acquiredParameter">
  353. <xsl:value-of select="/root/*[local-name()='promptRequest']/*[contains(local-name(),'Response')]/*[local-name()='dtParameters']/*[local-name()='ResponseRoot']/*[1]/@_ref"/>
  354. </param>
  355. </xts:append>
  356. </xsl:for-each> -->
  357. </xsl:if>
  358. <!-- Clean up prompts before getting the target prompts -->
  359. <xts:delete select="/root/*[local-name()='promptRequest' or local-name()='view' or local-name()='callerAdminState']"/>
  360. </xts:sequence>
  361. </xsl:template>
  362. </xsl:stylesheet>
  363. </xts:block>
  364. <!--
  365. ===============================================================================================
  366. execute-method - check for prompt processing (ambiguous connection / database login prompting).
  367. ===============================================================================================
  368. -->
  369. <xts:block id="execute-method" dependency="cleandrill execute-method-metadata check-state-metadata metadataInfo" processor="XSLT" condition=".[( not(/root/env/param[@name='execMethod']) or /root/env/param[@name='execMethod']='target' ) and (not(/root/env/param[@name='promptRequestTarget']) or /root/env/param[@name='promptRequestTarget'] = '') and ((/root/env/param[@name='m_p_target'] != '' or /root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*/*[local-name()='searchPath']!='') and (not(root/env/param[@name='method']) or /root/env/param[@name='method' and (string(.)='forward' or string(.)='cancel' or string(.)='finish' or string(.)='wait' or string(.)='back' or string(.)='edit' or string(.)='')]) )]" type="exec" mandatory="false">
  370. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  371. <xsl:stylesheet version="1.0"
  372. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  373. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  374. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  375. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" exclude-result-prefixes="send prompt xsl xts">
  376. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  377. <xsl:template match="/">
  378. <xts:sequence>
  379. <xsl:variable name="useTarget">
  380. <xsl:choose>
  381. <xsl:when test="string(/root/env/param[@name='m_p_target'])!=''">
  382. <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
  383. </xsl:when>
  384. <xsl:otherwise>
  385. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView']/*[local-name()='searchPath']"/>
  386. </xsl:otherwise>
  387. </xsl:choose>
  388. </xsl:variable>
  389. <xsl:variable name="useScope">
  390. <xsl:choose>
  391. <xsl:when test="string(/root/env/param[@name='m_p_scope'])!=''">
  392. <xsl:value-of select="/root/env/param[@name='m_p_scope']"/>
  393. </xsl:when>
  394. <xsl:when test="string(/root/env/param[@name='acquiredScope'])!=''">
  395. <xsl:value-of select="/root/env/param[@name='acquiredScope']"/>
  396. </xsl:when>
  397. <xsl:otherwise>
  398. <xsl:value-of select="/root/*[local-name()='queryResponse']/*/*[local-name()='scope']/*[local-name()='metadataModelItemName']"/>
  399. </xsl:otherwise>
  400. </xsl:choose>
  401. </xsl:variable>
  402. <xsl:variable name="returnTo">
  403. <xsl:choose>
  404. <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">
  405. <xsl:value-of select="/root/env/param[@name='ps_nav_stack']"/>
  406. </xsl:when>
  407. <xsl:otherwise>portal/properties_general.xts</xsl:otherwise>
  408. </xsl:choose>
  409. </xsl:variable>
  410. <xsl:variable name="returnOp">
  411. <xsl:choose>
  412. <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">pop</xsl:when>
  413. <xsl:otherwise>maintain</xsl:otherwise>
  414. </xsl:choose>
  415. </xsl:variable>
  416. <xsl:if test="not(/root/env/param[@name='method'])">
  417. <xts:append select="/root/env">
  418. <param name="method">
  419. <xsl:value-of select="'edit'"/>
  420. </param>
  421. </xts:append>
  422. <!-- Due to having 2 prompting requests in one morphlet, required to store the current env outside the call to collect, so correct environment is restored -->
  423. <xts:delete select="/root/callerAdminState"/>
  424. <xts:append>
  425. <callerAdminState>
  426. <xts:function name="web64encode">
  427. <xts:param name="source">
  428. <xts:transform name="XMLEncode">
  429. <xsl:copy-of select="/root/env/param[@name != 'method' and @name != 'cleared_prompts' and @name != 'execMethod' and @name!='m_p_target' and @name!='m_p_scope']"/>
  430. <param name="cleared_prompts">false</param>
  431. <param name="execMethod">target</param>
  432. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  433. <param name="m_p_scope"><xsl:value-of select="$useScope"/></param>
  434. </xts:transform>
  435. </xts:param>
  436. <xts:param name="compress">true</xts:param>
  437. </xts:function>
  438. </callerAdminState>
  439. </xts:append>
  440. </xsl:if>
  441. <xsl:if test="not(/root/env/param[@name='m_p_target'])">
  442. <xts:append select="/root/env">
  443. <param name="m_p_target">
  444. <xsl:value-of select="$useTarget"/>
  445. </param>
  446. </xts:append>
  447. </xsl:if>
  448. <!-- get both targetClass and newTargetClass from the DOM
  449. @targetClass: the class (eg. report, analysis, query, package, powerPlay8Report ...) of object that is already defined as the target of the drill path
  450. @newTargetClass: the class of new selected target. This happens when user changes the target object using the this UI
  451. -->
  452. <xsl:variable name="targetClass">
  453. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*/*[local-name()='objectClass']"/>
  454. </xsl:variable>
  455. <xsl:variable name="newTargetClass">
  456. <xsl:value-of select="/root/*[local-name()='target']/*[local-name()='queryResponse']/*/*[local-name()='objectClass']"/>
  457. </xsl:variable>
  458. <!-- This variable is ture if we want to call sendParameterRequert and it is false otherwise
  459. -->
  460. <xsl:variable name="sendParameterRequest">
  461. <xsl:choose>
  462. <!--false: when new target is selected that does not have parameter (Abacab Targets)-->
  463. <xsl:when test="$newTargetClass = 'powerPlay8Report' or $newTargetClass ='powerPlay8ReportView' or $newTargetClass = 'package'">false</xsl:when>
  464. <!--false: when new target has not been selected but the existing target does not have parameter (Abacab Targets) -->
  465. <xsl:when test="$newTargetClass = '' and $targetClass = 'powerPlay8Report' or $targetClass ='powerPlay8ReportView' or $targetClass = 'package'">false</xsl:when>
  466. <!--true: in other cases -->
  467. <xsl:otherwise>true</xsl:otherwise>
  468. </xsl:choose>
  469. </xsl:variable>
  470. <xsl:if test="$sendParameterRequest = 'true'">
  471. <!-- Required so that check-state will trigger -->
  472. <!-- Check-state should run if we send the parameter request-->
  473. <!-- We don't want to trigger check-state if we have abacab targets because we don't send the parameter request-->
  474. <xts:delete select="/root/env/param[@name='execMethod']"/>
  475. <xts:append select="/root/env">
  476. <param name="execMethod">target</param>
  477. </xts:append>
  478. <xsl:if test="(not(/root/env/param[@name='method'])
  479. and (/root/env/param[@name='m_p_target'] or /root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView']/*[local-name()='permissions' and (contains(string(.),'read') or contains(string(.),'execute'))]))
  480. or /root/env/param[@name='method']">
  481. <xts:append>
  482. <promptRequest>
  483. <send:request provider="xts" option="xml-multipart">
  484. <xsl:choose>
  485. <xsl:when test="not(/root/env/param[@name='method']) or /root/env/param[@name='method'] = 'edit' or /root/env/param[@name='method'] = ''">
  486. <prompt:collect>
  487. <getParametersRequest>true</getParametersRequest>
  488. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  489. <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
  490. <runAsync>true</runAsync>
  491. <promptObject><xsl:value-of select="$useTarget"/></promptObject>
  492. <showNoPromptsWarning>false</showNoPromptsWarning>
  493. <addToPromptingEnv>
  494. <param name="execMethod">target</param>
  495. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  496. <param name="m_p_scope"><xsl:value-of select="$useScope"/></param>
  497. </addToPromptingEnv>
  498. <routingServerGroup><xsl:value-of select="/root/env/param[@name='routingServerGroup']"/></routingServerGroup>
  499. <callerAdminState><xts:queryValue select="/root/callerAdminState"/></callerAdminState>
  500. </prompt:collect>
  501. </xsl:when>
  502. <xsl:otherwise>
  503. <xsl:element name="{/root/env/param[@name='method']}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
  504. <getParametersRequest>true</getParametersRequest>
  505. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  506. <addToPromptingEnv>
  507. <param name="execMethod">target</param>
  508. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  509. <param name="m_p_scope"><xsl:value-of select="$useScope"/></param>
  510. </addToPromptingEnv>
  511. <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
  512. <promptObject><xsl:value-of select="$useTarget"/></promptObject>
  513. <showNoPromptsWarning>false</showNoPromptsWarning>
  514. <callFinish>true</callFinish>
  515. </xsl:element>
  516. </xsl:otherwise>
  517. </xsl:choose>
  518. </send:request>
  519. </promptRequest>
  520. </xts:append>
  521. </xsl:if>
  522. </xsl:if>
  523. </xts:sequence>
  524. </xsl:template>
  525. </xsl:stylesheet>
  526. </xts:block>
  527. <!--
  528. ===============================================================================================
  529. check-state - check for prompt completion (ambiguous connection / database login prompting).
  530. ===============================================================================================
  531. -->
  532. <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="getTabs getContent cleandrill execute-method execute-method-metadata check-state-metadata" condition=".[/root/env/param[@name='execMethod']='target' and (not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='')]" mandatory="false" nodelist="env,header,session,credential,cookies,output,promptRequest,callerAdminState">
  533. <xts:logicsheet path="logicsheets/portal.xsl"/>
  534. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  535. </xts:block>
  536. <!--
  537. ===============================================================================================
  538. targetInfo - Get the scope from the execute-method-metadata
  539. ===============================================================================================
  540. -->
  541. <xts:block id="targetInfo" dependency="execute-method check-state" processor="XSLT" type="exec" mandatory="false" condition=".[/root/*[local-name()='view']='properties' and /root/env/param[@name='execMethod']='target']" nodelist="env,header,queryResponse,promptRequest,view">
  542. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  543. <xsl:stylesheet version="1.0"
  544. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  545. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  546. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  547. xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl send xts cm">
  548. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  549. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  550. <xsl:template match="/">
  551. <xts:sequence>
  552. <!-- Clean up env before getting the target prompts -->
  553. <xts:delete select="/root/env/param[@name='method' or @name='execMethod']"/>
  554. </xts:sequence>
  555. </xsl:template>
  556. </xsl:stylesheet>
  557. </xts:block>
  558. <!--
  559. ===============================================================================================
  560. decodeTargetPromptRequest - Get the target that was stored; no change of target
  561. ===============================================================================================
  562. -->
  563. <xts:block id="decodeTargetPromptRequest" dependency="execute-method check-state targetInfo" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='promptRequestTarget'] and /root/env/param[@name='promptRequestTarget'] != '']" nodelist="env,header,queryResponse,promptRequest,view">
  564. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  565. <xsl:stylesheet version="1.0"
  566. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  567. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  568. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts xtsext">
  569. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  570. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  571. <xsl:template match="/">
  572. <xts:sequence>
  573. <xts:append select="/root">
  574. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='promptRequestTarget'])), true())" disable-output-escaping="yes"/>
  575. </xts:append>
  576. </xts:sequence>
  577. </xsl:template>
  578. </xsl:stylesheet>
  579. </xts:block>
  580. <!--
  581. ===============================================================================================
  582. formlogic_init - Handle all form information when prompting complete
  583. ===============================================================================================
  584. -->
  585. <xts:block id="formlogic_init" type="exec" mode="interpret" dependency="getTabs getContent cleandrill execute-method check-state decodeTargetPromptRequest" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequestTarget']!='']" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http" mandatory="false"/>
  586. <!--
  587. ===============================================================================================
  588. getContentAfterPrompt - Get target information after prompt processing complete
  589. ===============================================================================================
  590. -->
  591. <xts:block id="getContentAfterPrompt" path="/portal/drillthru/common/request/get_target_content.xslt" processor="XSLT" dependency="formlogic_init getContent getTabs execute-method check-state" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequestTarget']!='') and not(/root/*[local-name()='queryResponse']/*[local-name()='drillPath'])]" type="exec" mode="interpret" mandatory="false" nodelist="env,header">
  592. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  593. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  594. <xts:logicsheet path="logicsheets/portal.xsl"/>
  595. </xts:block>
  596. <!--
  597. ===============================================================================================
  598. addPosition - Add positioning to uniquely identify drill through parameters when adding parameter values
  599. ===============================================================================================
  600. -->
  601. <xts:block id="addPosition" type="exec" mode="interpret" dependency="execute-method check-state formlogic_init getContentAfterPrompt" processor="XSLT" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequestTarget']!='')]" mandatory="false" nodelist="env,header,http,session,system,promptRequest">
  602. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  603. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  604. <xsl:stylesheet version="1.0"
  605. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  606. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  607. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  608. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  609. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  610. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  611. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext pf bus cm pm xts">
  612. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  613. <xsl:template match="root">
  614. <xsl:if test="not(/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*[local-name()='item']/*[local-name()='position'])">
  615. <xts:sequence>
  616. <xts:replace select="/root/*[local-name()='promptRequest']">
  617. <xts:transform processor="XSLT" src="portal/drillthru/common/transforms/contentLogic.xslt" mimeType="text/xml">
  618. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  619. <xts:param name="logicsheet">logicsheets/permissions.xsl</xts:param>
  620. <xts:param name="logicsheet">logicsheets/cm-logic.xsl</xts:param>
  621. <xts:param name="logicsheet">logicsheets/buslogic.xslt</xts:param>
  622. <root>
  623. <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | root/*[local-name()='promptRequest'] "/>
  624. </root>
  625. </xts:transform>
  626. </xts:replace>
  627. </xts:sequence>
  628. </xsl:if>
  629. </xsl:template>
  630. </xsl:stylesheet>
  631. </xts:block>
  632. <!--
  633. ===============================================================================================
  634. cleandrill2 - Set up the environment after prompt processing complete
  635. ===============================================================================================
  636. -->
  637. <xts:block id="cleandrill2" type="exec" mode="interpret" dependency="formlogic_init getContent getTabs execute-method check-state getContentAfterPrompt addPosition" processor="XSLT" path="/portal/drillthru/common/response/cleandrill.xslt" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequestTarget']!='') and /root/env/param[@name='dp_path' or @name='selected_scope' or @name='selected_query' or @name='selected_path' or @name='selected_param' or @name='method' or @name='execMethod']]" mandatory="false" nodelist="env,header,promptRequest,target,view">
  638. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  639. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  640. </xts:block>
  641. <!--
  642. ===============================================================================================
  643. format - Output the target properties page
  644. ===============================================================================================
  645. -->
  646. <xts:block id="format" mode="output" processor="XSLT" type="exec" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequestTarget']!='' or (not(/root/*[local-name()='view']) and (/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/@nil or /root/*[local-name()='target']/*[local-name()='queryResponse']/*/*[local-name()='objectClass']= 'powerPlay8Report' or /root/*[local-name()='target']/*[local-name()='queryResponse']/*/*[local-name()='objectClass']= 'powerPlay8ReportView' or /root/*[local-name()='target']/*[local-name()='queryResponse']/*/*[local-name()='objectClass']= 'package'))]" mimeType="text/html" dependency="formlogic_init getContent getTabs execute-method check-state decodeTargetPromptRequest getContentAfterPrompt cleandrill cleandrill2 addPosition" mandatory="false">
  647. <xts:logicsheet path="logicsheets/portal.xsl"/>
  648. <xts:logicsheet path="portal/drillthru/common/response/target.xslt"/>
  649. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  650. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  651. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  652. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  653. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  654. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  655. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  656. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  657. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  658. <xts:logicsheet path="logicsheets/validation.xslt"/>
  659. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  660. <xsl:stylesheet version="1.0"
  661. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  662. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  663. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  664. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  665. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  666. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  667. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  668. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  669. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  670. xmlns:st="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/specializetabs/"
  671. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  672. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  673. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  674. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  675. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  676. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  677. xmlns:xtsdrillext="xalan://com.cognos.drill.ext.XTSExt"
  678. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  679. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  680. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb" exclude-result-prefixes="xsl cm cml df dp pf pm bus dc utml xts xtsext mf lyt st cf cp rdb SOAP-ENV">
  681. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  682. <xsl:variable name="mname" select="'properties_target.xts'"/>
  683. <pf:variables/>
  684. <!-- Required for popup menus -->
  685. <cp:flyoutControl/>
  686. <pm:permissions origin="/root/cm:queryResponse/*/"/>
  687. <!-- add target template utils -->
  688. <rdb:utils/>
  689. <mf:variables stateParams="m_listpagersection m_pagerfromlistpager m_pagertolistpager"/>
  690. <xsl:template match="/root">
  691. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text>
  692. <!--This style is used to solve the confilict problem between HAL and Flyout menu in Firefox -->
  693. <style>
  694. .flyOutMenu
  695. {
  696. -moz-box-sizing: content-box;
  697. }
  698. </style>
  699. <!-- Start of HAL resources and CDrillPath related files -->
  700. <script>
  701. /*
  702. This global variable is defined to specify if we are in the wizard page or in the properties page.
  703. This variable is used in target.xslt page (used by both wizard and properties page) to pass the right value
  704. to the select dialog page.
  705. */
  706. var inWizard = false;
  707. //HAL Options: are used to specify the path that HAL libraries are loaded from
  708. G_HALOptions = { "isApplication" : false, "path" : "<xsl:value-of select="$webRoot"/>/" };
  709. G_CCHLOptions = { "path" : "<xsl:value-of select="$webRoot"/>/" };
  710. </script>
  711. <!-- Libraries that are used by HAL to handle the SOAP request, error message, and CAF -->
  712. <script language="javascript" src="{$webRoot}/hal/hal.js"/>
  713. <script language="javascript" src="{$webRoot}/cchl/cchl.js"/>
  714. <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_skin.css"/>
  715. <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_portal_skin.css"/>
  716. <script src="{$webRoot}/camcrypto/base64.js"></script>
  717. <script src="{$webRoot}/camcrypto/camcryptoutil.js"></script>
  718. <script src="{$webRoot}/camcrypto/sha1.js"></script>
  719. <script src="{$webRoot}/camcrypto/authtoken1.js"></script>
  720. <script>
  721. var g_sGateway = '<xsl:value-of select="$gateway"/>';
  722. G_CCHL.M_sProductLocale ='<xsl:value-of select="$productLocale"/>';
  723. G_CCHL.M_sContentLocale ='<xsl:value-of select="$contentLocale"/>';
  724. G_CCHL.M_sGatewayURL ='<xsl:value-of select="$gateway"/>';
  725. G_HAL.F_Include("hal/C_WebRequest.js");
  726. G_HAL.F_Include("cchl/C_BusRequest.js");
  727. G_HAL.F_Include("hal/D_Progress.js");
  728. G_HAL.F_Include( "hal/C_Dialog.js" );
  729. G_HAL.F_Include( "cchl/dialogs/D_DetailedMsgBox.js" );
  730. G_HAL.F_Include( "hal/G_ResManager.js" );
  731. G_HAL.F_Include( "hal/C_Error.js" );
  732. G_HAL.F_EnableAccessibility(true);
  733. //TODO: Get this from the inputs and set it
  734. //G_BusServer.F_SetRouterServerGroup() ;
  735. </script>
  736. <script language="javascript" src="{$webRoot}/drill/CDrillPath.js"/>
  737. <!--End of HAL resources and CDrillPath related files -->
  738. <xsl:variable name="drillScope">
  739. <xsl:choose>
  740. <xsl:when test="/root/env/param[@name='m_p_scope']">
  741. <xsl:value-of select="/root/env/param[@name='m_p_scope']"/>
  742. </xsl:when>
  743. <xsl:when test="string(/root/env/param[@name='acquiredScope'])!=''">
  744. <xsl:value-of select="/root/env/param[@name='acquiredScope']"/>
  745. </xsl:when>
  746. <xsl:when test="string(/root/cm:queryResponse/*/cm:scope/@nil) = ''">
  747. <xsl:value-of select="/root/cm:queryResponse/*/cm:scope/cm:metadataModelItemName"/>
  748. </xsl:when>
  749. </xsl:choose>
  750. </xsl:variable>
  751. <xsl:variable name="drillTarget">
  752. <xsl:choose>
  753. <xsl:when test="/root/env/param[@name='m_p_target']">
  754. <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
  755. </xsl:when>
  756. <xsl:when test="/root/target">
  757. <xsl:value-of select="/root/target/cm:queryResponse/*/cm:searchPath"/>
  758. </xsl:when>
  759. <!--Added here for abacab targets
  760. TODO: see if the above condition would satisfy this one as well-->
  761. <xsl:when test="not(/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis' or local-name()='reportView'])">
  762. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='deploymentReferences']/*[local-name()='deploymentReference']/*[local-name()='powerPlay8Report' or local-name()='powerPlay8ReportView' or local-name()='package']/*[local-name()='searchPath']"/>
  763. </xsl:when>
  764. <xsl:when test="string(/root/cm:queryResponse/*/cm:target/@nil)='' and not(/root/cm:queryResponse/*/cm:target/cm:nil) and string(/root/cm:queryResponse/*/cm:target/*/cm:objectClass)!='nil'">
  765. <xsl:value-of select="/root/cm:queryResponse/*/cm:target/*/cm:searchPath"/>
  766. </xsl:when>
  767. </xsl:choose>
  768. </xsl:variable>
  769. <xsl:variable name="hasTargetPermissions">
  770. <xsl:choose>
  771. <xsl:when test="string($drillTarget) = ''">
  772. <xsl:value-of select="false()"/>
  773. </xsl:when>
  774. <xsl:when test="/root/target">
  775. <xsl:value-of select="contains(string(/root/target/cm:queryResponse/*/cm:permissions),'read') or contains(string(/root/target/cm:queryResponse/*/cm:permissions),'execute')"/>
  776. </xsl:when>
  777. <xsl:when test="string(/root/cm:queryResponse/*/cm:target/@nil)='' and not(/root/cm:queryResponse/*/cm:target/cm:nil)">
  778. <xsl:value-of select="contains(string(/root/cm:queryResponse/*/cm:target/*/cm:permissions),'read') or contains(string(/root/cm:queryResponse/*/cm:target/*/cm:permissions),'execute')"/>
  779. </xsl:when>
  780. <xsl:otherwise>
  781. <xsl:value-of select="false()"/>
  782. </xsl:otherwise>
  783. </xsl:choose>
  784. </xsl:variable>
  785. <xsl:variable name="promptRequestTgt">
  786. <xsl:choose>
  787. <xsl:when test="/root/*[local-name()='promptRequest']">
  788. <xsl:variable name="parameters-markup">
  789. <xsl:call-template name="serialize-xml">
  790. <xsl:with-param name="node-set" select="/root/*[local-name()='promptRequest']"/>
  791. </xsl:call-template>
  792. </xsl:variable>
  793. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($parameters-markup), true()))"/>
  794. </xsl:when>
  795. <xsl:otherwise>
  796. <xsl:value-of select="/root/env/param[@name='promptRequestTarget']"/>
  797. </xsl:otherwise>
  798. </xsl:choose>
  799. </xsl:variable>
  800. <xsl:variable name="canModify" select="$canWrite or $canSetPolicy"/>
  801. <xsl:variable name="browserTitle">
  802. <xts:string id="IDS_PROPERTIES_TITLE">
  803. <xts:param name="objectName">
  804. <xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  805. </xts:param>
  806. </xts:string>
  807. </xsl:variable>
  808. <dp:page longTitle="$browserTitle">
  809. <dp:meta>
  810. <pf:meta/>
  811. </dp:meta>
  812. <dp:script>
  813. <!-- Help system -->
  814. <pf:help context="HID_DRILL_THROUGH_ACTIONS"/>
  815. <xsl:if test="$canModify and (not(key('env-param','ps_nav_stack')) or key('env-param','ps_nav_stack') = '')">
  816. <script language="javascript">
  817. <!-- cwb - Cancel When Back - there are no stack pages. -->
  818. function cwb()
  819. {
  820. location.href = "<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='backURL']))"/>";
  821. }
  822. </script>
  823. </xsl:if>
  824. <!--Include the required JS file for implementation of drop down menus -->
  825. <script language="javascript" src="{$webcontent}/{$app}/js/CCflyoutMenu.js"/>
  826. <rdb:scripts/>
  827. </dp:script>
  828. <utml:form name="pform" method="post" action="{$gateway}">
  829. <utml:exclusion-list><xsl:value-of select="' encodedRptSvcParam '"/></utml:exclusion-list>
  830. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  831. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  832. <utml:input type="hidden" name="m_p_scope">
  833. <utml:value>
  834. <xsl:value-of select="$drillScope"/>
  835. </utml:value>
  836. </utml:input>
  837. <utml:input type="hidden" name="m_p_specification"/>
  838. <utml:input type="hidden" name="m_p_target">
  839. <utml:value>
  840. <xsl:value-of select="$drillTarget"/>
  841. </utml:value>
  842. </utml:input>
  843. <utml:input type="hidden" name="promptRequestTarget" utml:update="false">
  844. <utml:value>
  845. <xsl:value-of select="$promptRequestTgt"/>
  846. </utml:value>
  847. </utml:input>
  848. <utml:input type="hidden" name="encodedRptSvcParam">
  849. <utml:value>
  850. <xsl:value-of select="key('env-param','encodedRptSvcParam')"/>
  851. </utml:value>
  852. </utml:input>
  853. <rdb:commonInputs/>
  854. <dp:header useBackURL="not($canModify='true')">
  855. <dp:title>
  856. <xsl:value-of select="$browserTitle"/>
  857. </dp:title>
  858. </dp:header>
  859. <!-- property tabs -->
  860. <df:propertiesTabs select="target">
  861. <df:hasRead>
  862. <xsl:value-of select="$canRead"/>
  863. </df:hasRead>
  864. <df:hasSetPolicy>
  865. <xsl:value-of select="$canSetPolicy"/>
  866. </df:hasSetPolicy>
  867. </df:propertiesTabs>
  868. <dp:description>
  869. <xts:string id="WIZ_PROP_DRILLPATH_TARGET_INTRO"/>
  870. </dp:description>
  871. <!--Show the selected target-->
  872. <lyt:layout style="2">
  873. <lyt:section width="50%">
  874. <dp:list width="100%">
  875. <dp:section>
  876. <dp:label>
  877. <xts:string id="IDS_PROP_DRILLPATH_DEF_TARGET"/>
  878. </dp:label>
  879. </dp:section>
  880. <dp:section>
  881. <img height="3" width="1" src="{$webcontent}/images/space.gif"/>
  882. </dp:section>
  883. <xsl:choose>
  884. <xsl:when test="string($hasTargetPermissions)='false'">
  885. <dp:section>
  886. <dp:text nospace="nospace">
  887. <xts:string id="IDS_PROP_DRILLPATH_NOTARGET"/>
  888. </dp:text>
  889. </dp:section>
  890. </xsl:when>
  891. <xsl:when test="/root/target">
  892. <xsl:variable name="object-start-at-path">
  893. <xsl:choose>
  894. <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
  895. <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:searchPath, '~') or starts-with(/root/target/cm:queryResponse/*/cm:searchPath,key('session-param', 'e_hp'))">
  896. <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
  897. </xsl:when>
  898. <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:target/*/cm:searchPath,'/content')">
  899. <xsl:value-of select="$defaultContentRoot"/>
  900. </xsl:when>
  901. </xsl:choose>
  902. </xsl:variable>
  903. <!--Get the target class to generate the target ICON -->
  904. <xsl:variable name="targetClassforICON">
  905. <xsl:choose>
  906. <xsl:when test="/root/target">
  907. <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:objectClass)"/>
  908. </xsl:when>
  909. <xsl:otherwise></xsl:otherwise>
  910. </xsl:choose>
  911. </xsl:variable>
  912. <xsl:variable name="targetBaseClassforICON">
  913. <xsl:choose>
  914. <xsl:when test="/root/target">
  915. <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:base/*/cm:objectClass)"/>
  916. </xsl:when>
  917. <xsl:otherwise></xsl:otherwise>
  918. </xsl:choose>
  919. </xsl:variable>
  920. <dp:section>
  921. <div>
  922. <table role="presentation"><tr><td>
  923. <xsl:call-template name="gen-icon">
  924. <xsl:with-param name="class" select="$targetClassforICON"/>
  925. <xsl:with-param name="baseClass" select="$targetBaseClassforICON"/>
  926. </xsl:call-template>
  927. </td><td valign="middle" class="tableText">
  928. <cf:do-the-path-link>
  929. <cf:param name="familytree">/root/target/cm:queryResponse/*/cm:ancestors</cf:param>
  930. <cf:param name="familymember">/root/target/cm:queryResponse/*/cm:defaultName</cf:param>
  931. <cf:param name="home">
  932. <xsl:value-of select="$object-start-at-path"/>
  933. </cf:param>
  934. </cf:do-the-path-link>
  935. </td></tr></table>
  936. </div>
  937. </dp:section>
  938. </xsl:when>
  939. <xsl:when test="string(/root/cm:queryResponse/*/cm:target/@nil)='' and not(/root/cm:queryResponse/*/cm:target/cm:nil)">
  940. <xsl:variable name="object-start-at-path">
  941. <xsl:choose>
  942. <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
  943. <xsl:when test="starts-with(/root/cm:queryResponse/*/cm:target/*/cm:searchPath, '~') or starts-with(/root/cm:queryResponse/*/cm:target/*/cm:searchPath,key('session-param', 'e_hp'))">
  944. <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
  945. </xsl:when>
  946. <xsl:when test="starts-with(/root/cm:queryResponse/*/cm:target/*/cm:searchPath,'/content')">
  947. <xsl:value-of select="$defaultContentRoot"/>
  948. </xsl:when>
  949. </xsl:choose>
  950. </xsl:variable>
  951. <!--Get the target class to generate the target ICON -->
  952. <xsl:variable name="targetClassforICON">
  953. <xsl:choose>
  954. <xsl:when test="not(/root/cm:queryResponse/*/cm:target/cm:nil)">
  955. <xsl:value-of select="string(/root/cm:queryResponse/*/cm:target/*/cm:objectClass)"/>
  956. </xsl:when>
  957. <xsl:otherwise></xsl:otherwise>
  958. </xsl:choose>
  959. </xsl:variable>
  960. <xsl:variable name="targetBaseClassforICON">
  961. <xsl:choose>
  962. <xsl:when test="not(/root/cm:queryResponse/*/cm:target/cm:nil)">
  963. <xsl:value-of select="string(/root/cm:queryResponse/*/cm:target/*/cm:base/*/cm:objectClass)"/>
  964. </xsl:when>
  965. <xsl:otherwise></xsl:otherwise>
  966. </xsl:choose>
  967. </xsl:variable>
  968. <dp:section>
  969. <div>
  970. <table role="presentation"><tr><td>
  971. <xsl:call-template name="gen-icon">
  972. <xsl:with-param name="class" select="$targetClassforICON"/>
  973. <xsl:with-param name="baseClass" select="$targetBaseClassforICON"/>
  974. </xsl:call-template>
  975. </td><td valign="middle" class="tableText">
  976. <cf:do-the-path-link>
  977. <cf:param name="familytree">/root/cm:queryResponse/*/cm:target/*/cm:ancestors</cf:param>
  978. <cf:param name="familymember">/root/cm:queryResponse/*/cm:target/*/cm:defaultName</cf:param>
  979. <cf:param name="home">
  980. <xsl:value-of select="$object-start-at-path"/>
  981. </cf:param>
  982. </cf:do-the-path-link>
  983. </td></tr></table>
  984. </div>
  985. </dp:section>
  986. </xsl:when>
  987. <xsl:otherwise>
  988. <dp:section>
  989. <dp:text nospace="nospace">
  990. <xts:string id="IDS_PROP_DRILLPATH_TARGETNOTSPECIFIED"/>
  991. </dp:text>
  992. </dp:section>
  993. </xsl:otherwise>
  994. </xsl:choose>
  995. <dp:section>
  996. <img height="3" width="1" src="{$webcontent}/images/space.gif"/>
  997. </dp:section>
  998. <!-- Add dropdown menus to allow a user to select a target type
  999. Reports
  1000. Cubes
  1001. -->
  1002. <!-- Unique ids are required to create multiple menus -->
  1003. <!-- popup menu ids-->
  1004. <xsl:variable name="menuId" select="concat('Menu', generate-id(.))"/>
  1005. <xsl:variable name="menuSpanId" select="concat('MenuSpan', generate-id(.))"/>
  1006. <!-- menu item ids -->
  1007. <xsl:variable name="menuReportId" select="concat('Report', generate-id(.))"/>
  1008. <xsl:variable name="menuCubeId" select="concat('Cube', generate-id(.))"/>
  1009. <xsl:if test="$canModify='true'">
  1010. <dp:section>
  1011. <dp:link>
  1012. <xsl:choose>
  1013. <!-- This condition is used to show the drop down menu for picking the target type
  1014. only when user can use PPS (PPS is installed) -->
  1015. <xsl:when test="($userCanUsePPS)">
  1016. <utml:a>
  1017. <xsl:attribute name="onclick"><xsl:text>return CCPopupMenu.dropDown(event,0,0,'</xsl:text><xsl:value-of select="$menuId"/><xsl:text>');</xsl:text></xsl:attribute>
  1018. <!-- utml:href>
  1019. makeSelection('target')
  1020. </utml:href -->
  1021. <xsl:choose>
  1022. <xsl:when test="string($hasTargetPermissions)='false'">
  1023. <xts:string id="WIZ_PROP_DRILLPATH_SELECT_TARGET"/>
  1024. </xsl:when>
  1025. <xsl:otherwise>
  1026. <xts:string id="WIZ_PROP_DRILLPATH_CHANGE_TARGET"/>
  1027. </xsl:otherwise>
  1028. </xsl:choose>
  1029. </utml:a>
  1030. <!-- Add a link to a target and dropdown arrow for a popup menu-->
  1031. <!-- Define a menu with 2 items Run and debug-->
  1032. <xsl:variable name="contactMenu">
  1033. <flyout id="{$menuId}">
  1034. <items>
  1035. <item id="{$menuReportId}">
  1036. <text>
  1037. <xts:string id="WIZ_TARGET_TYPE_MENU_ITEM_REPORT"/>
  1038. </text>
  1039. <action>selectDrillTarget('drillPathPP8Targets');</action>
  1040. </item>
  1041. <item id="{$menuCubeId}">
  1042. <text>
  1043. <xts:string id="WIZ_TARGET_TYPE_MENU_ITEM_CUBE"/>
  1044. </text>
  1045. <action>selectDrillTarget('powerPlay8Drill.container');
  1046. </action>
  1047. </item>
  1048. </items>
  1049. </flyout>
  1050. </xsl:variable>
  1051. <!-- A dropdown arrow to invoke drill through assistant. It is only available when Abacan is installed
  1052. -->
  1053. <img align="middle" name="contactMenu_imgFlyControl" src="{$skin_shared_images}dropdown_arrow.gif" title="" alt="">
  1054. <xsl:attribute name="onclick"><xsl:text>return CCPopupMenu.dropDown(event,0,0,'</xsl:text><xsl:value-of select="$menuId"/><xsl:text>');</xsl:text></xsl:attribute>
  1055. </img>
  1056. <!-- Display menus and add z-index to make sure it is on the top-->
  1057. <div id="{$menuSpanId}" style="z-index:1; position: relative;">
  1058. </div>
  1059. <!--Call to create menus -->
  1060. <xsl:call-template name="renderPopup">
  1061. <xsl:with-param name="flyoutXML"><xsl:copy-of select="$contactMenu"/></xsl:with-param>
  1062. <xsl:with-param name="controlID"><xsl:value-of select="$menuSpanId"/></xsl:with-param>
  1063. </xsl:call-template>
  1064. <!-- end dropdown -->
  1065. </xsl:when>
  1066. <!-- When PP8 is not installed we don't show the drop down menu to the user
  1067. and do the same thing that we used to do -->
  1068. <xsl:otherwise>
  1069. <utml:a>
  1070. <utml:href>
  1071. setBookMarks();
  1072. makeSelection('target');
  1073. </utml:href>
  1074. <xsl:choose>
  1075. <xsl:when test="string($hasTargetPermissions)='false'">
  1076. <xts:string id="WIZ_PROP_DRILLPATH_SELECT_TARGET"/>
  1077. </xsl:when>
  1078. <xsl:otherwise>
  1079. <xts:string id="WIZ_PROP_DRILLPATH_CHANGE_TARGET"/>
  1080. </xsl:otherwise>
  1081. </xsl:choose>
  1082. </utml:a>
  1083. </xsl:otherwise>
  1084. </xsl:choose>
  1085. </dp:link>
  1086. </dp:section>
  1087. </xsl:if>
  1088. </dp:list>
  1089. </lyt:section>
  1090. <lyt:section width="50%">
  1091. <dp:list width="100%">
  1092. <dp:section>
  1093. <dp:label>
  1094. <xts:string id="IDS_PROP_DRILLPATH_DEF_SCOPE"/>
  1095. </dp:label>
  1096. </dp:section>
  1097. <dp:section>
  1098. <dp:hint nospace="nospace" wrap="wrap" width="100%">
  1099. <xts:string id="WIZ_PROP_DRILLPATH_DEF_SCOPE_HINT"/>
  1100. </dp:hint>
  1101. </dp:section>
  1102. <dp:section>
  1103. <img height="3" width="1" src="{$webcontent}/images/space.gif"/>
  1104. </dp:section>
  1105. <xsl:choose>
  1106. <xsl:when test="$drillScope != '' and contains(string($drillScope),'].[')">
  1107. <dp:section>
  1108. <dp:text nospace="nospace">
  1109. <xsl:value-of select="xtsdrillext:enforceSTTAndBTDForMUN($drillScope, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  1110. </dp:text>
  1111. </dp:section>
  1112. </xsl:when>
  1113. <xsl:otherwise>
  1114. <dp:section>
  1115. <dp:text nospace="nospace">
  1116. <xts:string id="IDS_PROP_DRILLPATH_TREE_PKG"/>
  1117. </dp:text>
  1118. </dp:section>
  1119. </xsl:otherwise>
  1120. </xsl:choose>
  1121. <dp:section>
  1122. <img height="3" width="1" src="{$webcontent}/images/space.gif"/>
  1123. </dp:section>
  1124. <xsl:if test="$browser != 'safari' and $canModify='true' and $userCanSelectMetadata">
  1125. <dp:section>
  1126. <dp:link>
  1127. <utml:a utml:op="stack-up">
  1128. <utml:href>
  1129. setBookMarks();
  1130. makeSelection('scope');
  1131. </utml:href>
  1132. <xts:string id="IDS_PROP_DRILLPATH_SELECT_SCOPE"/>
  1133. </utml:a>
  1134. </dp:link>
  1135. </dp:section>
  1136. </xsl:if>
  1137. </dp:list>
  1138. </lyt:section>
  1139. </lyt:layout>
  1140. <lyt:layout style="1" title="IDS_PROP_DRILLPATH_TARGET_SETTINGS" border="yes">
  1141. <lyt:section>
  1142. <!-- Body -->
  1143. <rdb:target origin="/root/cm:queryResponse/*" targetOrigin="/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*" targetPermissions="$hasTargetPermissions" canModifyParams="$canModify"/>
  1144. </lyt:section>
  1145. </lyt:layout>
  1146. <dp:footer>
  1147. <script language="javascript">
  1148. /*
  1149. This function is used to call makeSelection with targetType and submit the page
  1150. This is used by the items on the drop down menu that allows users pick the target type
  1151. */
  1152. function selectDrillTarget(targetType){
  1153. document.pform.ps_nav_op.value = 'maintain';
  1154. makeSelection('target','','',targetType)
  1155. document.pform.submit();
  1156. }
  1157. function validate()
  1158. {
  1159. <xsl:choose>
  1160. <xsl:when test="$canModify='true'">
  1161. var frm = document.pform;
  1162. <!--set the prompt run option in the drillpath -->
  1163. <!-- There are following 3 options we can set for display prompt page:
  1164. 1. Only when required parameter values are missing (missingReq)
  1165. 2. Always (always)
  1166. 3. Based on the default prompt settings of the target report (useTarget)-->
  1167. // a gard to prevent error when m_prompt does not exist
  1168. if (frm.m_prompt){
  1169. if ( frm.m_prompt.value == 'always')
  1170. frm.m_ro_prompt.value= 'true';
  1171. else if (frm.m_prompt.value == 'missingReq')
  1172. frm.m_ro_prompt.value = 'false';
  1173. else <!-- if it is set to "useTarget', remove the prompt from drillpath -->
  1174. frm.m_ro_prompt.value='';
  1175. }
  1176. <!--If the selected target is pp8, only set m_ro_drillTragetPath (runOption for promptFormat), otherwise, set both
  1177. m_ro_drillTragetPath and m_p_target. -->
  1178. if (frm.m_p_target)
  1179. {
  1180. frm.m_ro_drillTragetPath.value = frm.m_p_target.value;
  1181. }
  1182. if(frm.m_action)
  1183. frm.m_p_action.value = frm.m_action.value;
  1184. frm.m_dt_useEditSpecification.value ='false';
  1185. if(frm.m_p_action.value!="viewOutput")
  1186. {
  1187. if ( frm.m_p_action.value == "editWPS" || frm.m_p_action.value == "editWPP8")
  1188. frm.m_p_action.value = "edit";
  1189. else if (frm.m_p_action.value == "runDyn")
  1190. {
  1191. frm.m_p_action.value = "run";
  1192. frm.m_dt_useEditSpecification.value ='true';
  1193. }
  1194. setBookMarks();
  1195. resetPageState();
  1196. // update the drill specification
  1197. updateDrillPath();
  1198. return true;
  1199. }
  1200. if(checkForParams())
  1201. {
  1202. setBookMarks();
  1203. resetPageState();
  1204. // update the drill specification
  1205. updateDrillPath();
  1206. return true;
  1207. }
  1208. return false;
  1209. </xsl:when>
  1210. <xsl:otherwise>
  1211. resetPageState();
  1212. return true;
  1213. </xsl:otherwise>
  1214. </xsl:choose>
  1215. }
  1216. /**
  1217. * calls G_DrillPath.updateDrillPath()
  1218. * get the form object, sets cafContextID, and get the targetClass
  1219. */
  1220. function updateDrillPath(){
  1221. var frm = document.pform;
  1222. return G_DrillPath.F_updateDrillPath(frm,targetClass);
  1223. }
  1224. </script>
  1225. <xsl:choose>
  1226. <xsl:when test="$canModify='true'">
  1227. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" df:nav_op="stack-down" df:kbA11y="true"/>
  1228. <xsl:choose>
  1229. <xsl:when test="key('env-param','ps_nav_stack') and not(key('env-param','ps_nav_stack') = '') ">
  1230. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  1231. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="javascript:resetPageState();"/>
  1232. </xsl:when>
  1233. <xsl:otherwise>
  1234. <!-- The following is needed to get around some issues with formlogic_lite (needs more investigation) -->
  1235. <df:button df:id="IDS_CANCEL" df:href="javascript:cwb()" df:style="href" onclick="javascript:resetPageState();"/>
  1236. </xsl:otherwise>
  1237. </xsl:choose>
  1238. </xsl:when>
  1239. <xsl:otherwise>
  1240. <df:button df:id="IDS_CLOSE" df:style="back-url" onclick="javascript:resetPageState();"/>
  1241. </xsl:otherwise>
  1242. </xsl:choose>
  1243. </dp:footer>
  1244. <!--This is used by HAL to write the required HTML elements on the page-->
  1245. <script>
  1246. G_HAL.F_WriteHtml();
  1247. </script>
  1248. <!--Used for Debuging: enable this text area and the request is dumped into it-->
  1249. <!--textarea id="requestDump" rows="30" cols="150"></textarea-->
  1250. </utml:form>
  1251. </dp:page>
  1252. </xsl:template>
  1253. <pf:gen-icon/>
  1254. <pf:serialize-xml/>
  1255. </xsl:stylesheet>
  1256. </xts:block>
  1257. <!--
  1258. ===============================================================================================
  1259. debug - display debug information
  1260. ===============================================================================================
  1261. -->
  1262. <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  1263. <!-- get the debug logic sheet -->
  1264. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1265. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  1266. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  1267. <xsl:template match="/">
  1268. <dbg:dumpxml select="/root"/>
  1269. </xsl:template>
  1270. </xsl:stylesheet>
  1271. </xts:block>
  1272. </xts:morphlet>