run_options.xslt 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  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:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsro="http://developer.cognos.com/schemas/xts/agsro" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:out="dummy-uri" exclude-result-prefixes="xsl dp xts utml agsro agsdlg cf">
  9. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  10. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  11. <xsl:template match="agsro:run_options">
  12. <out:template name="render_run_options">
  13. <out:if test="key('env-param','m_ro_saveOutput') !='' or key('env-param','m_ro_saveAsPath') !=''">
  14. <dp:section1>
  15. <out:copy-of select="$spacer"/>
  16. <out:choose>
  17. <out:when test="not(key('env-param','save_how')) or key('env-param','save_how')='report'">
  18. <out:choose>
  19. <out:when test="$jobDefinition">
  20. <out:text>
  21. <xts:string id="IDS_OTHERRUN_SAVE_REPORTS"/>
  22. </out:text>
  23. </out:when>
  24. <out:otherwise>
  25. <out:text>
  26. <xts:string id="IDS_OTHERRUN_SAVE_REPORT_CONFIRM"/>
  27. </out:text>
  28. <out:value-of select="' '"/>
  29. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  30. <out:variable name="path" select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:searchPath"/>
  31. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  32. <out:variable name="rootPath">
  33. <out:choose>
  34. <out:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))">
  35. <out:value-of select="'~/folder'"/>
  36. </out:when>
  37. <out:otherwise>
  38. <out:value-of select="'/content'"/>
  39. </out:otherwise>
  40. </out:choose>
  41. </out:variable>
  42. <cf:do-the-path-link>
  43. <cf:param name="familytree">cm:queryResponse/cm:queryReply[2]/*/cm:ancestors</cf:param>
  44. <cf:param name="familymember">cm:queryResponse/cm:queryReply[2]/*/cm:defaultName</cf:param>
  45. <cf:param name="home">
  46. <out:value-of select="$rootPath"/>
  47. </cf:param>
  48. </cf:do-the-path-link>
  49. </out:otherwise>
  50. </out:choose>
  51. </out:when>
  52. <out:otherwise>
  53. <out:text>
  54. <xts:string id="IDS_OTHERRUN_SAVE_NEW_ENTRY_CONFIRM"/>
  55. </out:text>
  56. <out:value-of select="' '"/>
  57. <out:value-of select="key('env-param', 'saveAsPathText')"/>
  58. <out:value-of select="' &gt; '"/>
  59. <out:value-of select="key('env-param', 'm_ro_saveAsName')"/>
  60. </out:otherwise>
  61. </out:choose>
  62. </dp:section1>
  63. <dp:section2/>
  64. </out:if>
  65. <!-- print -->
  66. <out:if test="key('env-param','m_ro_print') != ''">
  67. <br/>
  68. <dp:section1>
  69. <out:copy-of select="$spacer"/>
  70. <out:choose>
  71. <out:when test="$jobDefinition">
  72. <out:text>
  73. <xts:string id="IDS_CONFIRMATION_PRINT_REPORTS"/>
  74. </out:text>
  75. </out:when>
  76. <out:otherwise>
  77. <out:text>
  78. <xts:string id="IDS_CONFIRMATION_PRINT_REPORT"/>
  79. </out:text>
  80. </out:otherwise>
  81. </out:choose>
  82. <out:value-of select="' '"/>
  83. <out:value-of select="key('env-param','m_ro_printerAddress')"/>
  84. </dp:section1>
  85. <dp:section2/>
  86. </out:if>
  87. <!-- email -->
  88. <out:if test="key('env-param','m_ro_email') != ''">
  89. <br/>
  90. <dp:section1>
  91. <out:copy-of select="$spacer"/>
  92. <out:call-template name="render-email"/>
  93. </dp:section1>
  94. <dp:section2/>
  95. </out:if>
  96. <out:choose>
  97. <!-- if we're dealing with a job -->
  98. <out:when test="key('env-param','m_class') = 'jobDefinition' and /root/steps/cm:queryResponse/cm:jobStepDefinition/*">
  99. <dp:section1>
  100. <br/>
  101. <xts:string id="IDS_CONFIRMATION_JOB_STEP_SECTION"/>
  102. </dp:section1>
  103. <dp:section2/>
  104. <out:for-each select="/root/steps/cm:queryResponse/cm:jobStepDefinition">
  105. <dp:section1>
  106. <out:copy-of select="$spacer"/>
  107. <xts:string id="IDS_CONFIRMATION_JOB_STEP">
  108. <xts:param name="stepNumber">
  109. <out:value-of select="position()"/>
  110. </xts:param>
  111. <xts:param name="stepName">
  112. <out:value-of select="cm:stepObject/*/cm:defaultName"/>
  113. </xts:param>
  114. </xts:string>
  115. </dp:section1>
  116. <dp:section2/>
  117. <!-- burst -->
  118. <out:variable name="stepSummary">
  119. <out:if test="cm:runOptions/cm:runOption[cm:name='burst']/cm:value='true' or (not(cm:runOptions/cm:runOption[cm:name='burst']/cm:value) and key('env-param','m_ro_burst')='true' and *[local-name()='stepObject']/*/*[local-name()='canBurst']='true')">
  120. <dp:section1>
  121. <img height="10" width="25">
  122. <out:attribute name="src">
  123. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  124. </img>
  125. <out:text>
  126. <xts:string id="IDS_OTHERRUN_BURST"/>
  127. </out:text>
  128. </dp:section1>
  129. <dp:section2/>
  130. </out:if>
  131. <!-- format -->
  132. <out:if test="cm:runOptions/cm:runOption[cm:name='outputFormat'] or (/root/env/param[starts-with(@name,'m_ro_outputFormat') and not(contains(@name,'HTML'))][. != ''] or
  133. (key('env-param', 'm_ro_outputF_HTML_Type')))">
  134. <dp:section1>
  135. <img height="10" width="25">
  136. <out:attribute name="src">
  137. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  138. </img>
  139. <out:text>
  140. <xts:string id="IDS_OTHERRUN_FORMAT"/>
  141. </out:text>
  142. <out:value-of select="' '"/>
  143. <out:choose>
  144. <out:when test="cm:runOptions/cm:runOption[cm:name='outputFormat']">
  145. <out:for-each select="cm:runOptions/cm:runOption[cm:name='outputFormat']/cm:items/cm:item">
  146. <out:sort select="."/>
  147. <out:call-template name="render-format">
  148. <out:with-param name="format" select="."/>
  149. <out:with-param name="outputPageDefinition" select="/root/steps/cm:queryResponse/cm:jobStepDefinition/cm:runOptions/cm:runOption[cm:name='outputPageDefinition']/cm:value"/>
  150. <out:with-param name="outputPageOrientation" select="/root/steps/cm:queryResponse/cm:jobStepDefinition/cm:runOptions/cm:runOption[cm:name='outputPageOrientation']/cm:value"/>
  151. </out:call-template>
  152. </out:for-each>
  153. </out:when>
  154. <out:otherwise>
  155. <out:for-each select="/root/env/param[starts-with(@name,'m_ro_outputFormat')][. != '']">
  156. <out:sort select="."/>
  157. <out:call-template name="render-format">
  158. <out:with-param name="format" select="."/>
  159. <out:with-param name="outputF_HTML_Type" select="key('env-param', 'm_ro_outputF_HTML_Type')"/>
  160. <out:with-param name="outputPageDefinition" select="key('env-param','m_ro_outputPageDefinition')"/>
  161. <out:with-param name="outputPageOrientation" select="key('env-param','m_ro_outputPageOrientation')"/>
  162. </out:call-template>
  163. </out:for-each>
  164. </out:otherwise>
  165. </out:choose>
  166. </dp:section1>
  167. <dp:section2/>
  168. </out:if>
  169. <!-- language -->
  170. <out:if test="cm:runOptions/cm:runOption[cm:name='outputLocale'] or key('env-param', 'm_ro_outputLocale')">
  171. <dp:section1>
  172. <img height="10" width="25">
  173. <out:attribute name="src">
  174. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  175. </img>
  176. <out:text>
  177. <xts:string id="IDS_OTHERRUN_LANGUAGE"/>
  178. </out:text>
  179. <out:value-of select="' '"/>
  180. <out:choose>
  181. <out:when test="cm:runOptions/cm:runOption[cm:name='outputLocale']">
  182. <out:for-each select="cm:runOptions/cm:runOption[cm:name='outputLocale']/cm:items/cm:item">
  183. <out:sort select="."/>
  184. <out:variable name="locale" select="."/>
  185. <out:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$locale]/displayName"/>
  186. <out:if test="position() != last()">
  187. <out:text>, </out:text>
  188. </out:if>
  189. </out:for-each>
  190. </out:when>
  191. <out:otherwise>
  192. <out:for-each select="key('env-param', 'm_ro_outputLocale')">
  193. <out:sort select="."/>
  194. <out:variable name="locale" select="."/>
  195. <out:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$locale]/displayName"/>
  196. <out:if test="position() != last()">
  197. <out:text>, </out:text>
  198. </out:if>
  199. </out:for-each>
  200. </out:otherwise>
  201. </out:choose>
  202. </dp:section1>
  203. <dp:section2/>
  204. </out:if>
  205. <!-- Prompt information -->
  206. <out:for-each select="*[local-name()='parameters']/*[local-name()='parameterValue']">
  207. <dp:section1>
  208. <img height="10" width="25">
  209. <out:attribute name="src">
  210. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  211. </img>
  212. <out:value-of select="*[local-name()='name']"/>
  213. <out:text>
  214. <xts:string id="IDS_LIST_START"/>
  215. </out:text>
  216. <out:apply-templates mode="render-values"/>
  217. </dp:section1>
  218. <dp:section2/>
  219. </out:for-each>
  220. <out:for-each select="*[local-name()='credentialParameters']/credential">
  221. <dp:section1>
  222. <img height="10" width="25">
  223. <out:attribute name="src">
  224. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  225. </img>
  226. <out:call-template name="render-credential">
  227. <out:with-param name="credential" select="."/>
  228. <out:with-param name="pos" select="position()"/>
  229. </out:call-template>
  230. </dp:section1>
  231. <dp:section2/>
  232. </out:for-each>
  233. </out:variable>
  234. <out:choose>
  235. <out:when test="$stepSummary!=''">
  236. <out:copy-of select="$stepSummary"/>
  237. </out:when>
  238. <out:otherwise>
  239. <dp:section1>
  240. <img height="10" width="25">
  241. <out:attribute name="src">
  242. <out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  243. </img>
  244. <xts:string id="IDS_PROP_JOB_NO_RUN_OPTIONS"/>
  245. </dp:section1>
  246. <dp:section2/>
  247. </out:otherwise>
  248. </out:choose>
  249. </out:for-each>
  250. </out:when>
  251. <!-- we must be dealing with a report -->
  252. <out:otherwise>
  253. <!-- Burst -->
  254. <out:if test="key('env-param','m_ro_burst') = 'true'">
  255. <br/>
  256. <dp:section1>
  257. <out:copy-of select="$spacer"/>
  258. <out:text>
  259. <xts:string id="IDS_OTHERRUN_BURST"/>
  260. </out:text>
  261. </dp:section1>
  262. <dp:section2/>
  263. </out:if>
  264. <!-- Formats -->
  265. <out:if test="/root/env/param[starts-with(@name,'m_ro_outputFormat')][. != '']">
  266. <br/>
  267. <dp:section1>
  268. <out:copy-of select="$spacer"/>
  269. <out:text>
  270. <xts:string id="IDS_OTHERRUN_FORMAT"/>
  271. </out:text>
  272. <out:value-of select="' '"/>
  273. <out:for-each select="/root/env/param[starts-with(@name,'m_ro_outputFormat')][. != '']">
  274. <out:sort select="."/>
  275. <out:call-template name="render-format">
  276. <out:with-param name="format" select="."/>
  277. <out:with-param name="outputF_HTML_Type" select="key('env-param', 'm_ro_outputF_HTML_Type')"/>
  278. <out:with-param name="outputPageDefinition" select="key('env-param','m_ro_outputPageDefinition')"/>
  279. <out:with-param name="outputPageOrientation" select="key('env-param','m_ro_outputPageOrientation')"/>
  280. </out:call-template>
  281. </out:for-each>
  282. </dp:section1>
  283. <dp:section2/>
  284. </out:if>
  285. <!-- Languages -->
  286. <out:if test="key('env-param', 'm_ro_outputLocale')">
  287. <br/>
  288. <dp:section1>
  289. <out:copy-of select="$spacer"/>
  290. <out:text>
  291. <xts:string id="IDS_OTHERRUN_LANGUAGE"/>
  292. </out:text>
  293. <out:value-of select="' '"/>
  294. <out:for-each select="key('env-param', 'm_ro_outputLocale')">
  295. <out:sort select="."/>
  296. <out:variable name="locale" select="."/>
  297. <out:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and string(id)=$locale]/displayName"/>
  298. <out:if test="position() != last()">
  299. <out:text>, </out:text>
  300. </out:if>
  301. </out:for-each>
  302. </dp:section1>
  303. <dp:section2/>
  304. </out:if>
  305. <!-- Check if this report can be attached to email tasks-->
  306. <out:if test="key('env-param','m_ao_availableAsEmailAttachment')">
  307. <br/>
  308. <dp:section1>
  309. <out:copy-of select="$spacer"/>
  310. <out:text>
  311. <xts:string id="IDS_OTHERRUN_ENABLE_ATTACHMENTS"/>
  312. </out:text>
  313. </dp:section1>
  314. <dp:section2/>
  315. </out:if>
  316. <out:variable name="parameters" select="./parameters"/>
  317. <out:variable name="credentials" select="./credentialParameters"/>
  318. <!-- Prompt information -->
  319. <out:if test="$parameters">
  320. <out:for-each select="$parameters/*[local-name()='parameterValue']">
  321. <br/>
  322. <dp:section1>
  323. <out:copy-of select="$spacer"/>
  324. <out:value-of select="*[local-name()='name']"/>
  325. <out:text>
  326. <xts:string id="IDS_LIST_START"/>
  327. </out:text>
  328. <out:apply-templates mode="render-values"/>
  329. </dp:section1>
  330. <dp:section2/>
  331. </out:for-each>
  332. </out:if>
  333. <out:if test="$credentials">
  334. <out:for-each select="$credentials/credential">
  335. <br/>
  336. <dp:section1>
  337. <out:copy-of select="$spacer"/>
  338. <out:call-template name="render-credential">
  339. <out:with-param name="credential" select="."/>
  340. <out:with-param name="pos" select="position()"/>
  341. </out:call-template>
  342. </dp:section1>
  343. <dp:section2/>
  344. </out:for-each>
  345. </out:if>
  346. </out:otherwise>
  347. </out:choose>
  348. </out:template>
  349. <out:template name="render-email">
  350. <out:variable name="emailAsAttachment" select="key('env-param', 'm_ro_emailAsAttachment') = 'true'"/>
  351. <out:variable name="emailAsURL" select="key('env-param', 'm_ro_emailAsURL') = 'true'"/>
  352. <out:variable name="bursting">
  353. <out:choose>
  354. <out:when test="(key('env-param','m_ro_burst') = 'true') or (/root/steps/cm:queryResponse/cm:jobStepDefinition/cm:runOptions/cm:runOption[cm:name='burst']/cm:value='true')">true</out:when>
  355. <out:otherwise>false</out:otherwise>
  356. </out:choose>
  357. </out:variable>
  358. <out:choose>
  359. <out:when test="$jobDefinition">
  360. <out:choose>
  361. <out:when test="not($emailAsAttachment or $emailAsURL)">
  362. <out:text>
  363. <xts:string id="IDS_OTHERRUN_EMAIL_NOTIFY_MULTIPLE_REPORTS"/>
  364. </out:text>
  365. </out:when>
  366. <out:when test="$emailAsAttachment and not($emailAsURL)">
  367. <out:text>
  368. <xts:string id="IDS_OTHERRUN_EMAIL_REPORTS"/>
  369. </out:text>
  370. </out:when>
  371. <out:when test="not($emailAsAttachment) and $emailAsURL">
  372. <out:text>
  373. <xts:string id="IDS_OTHERRUN_EMAIL_URL_MULTIPLE_REPORTS"/>
  374. </out:text>
  375. </out:when>
  376. <out:otherwise>
  377. <out:text>
  378. <xts:string id="IDS_OTHERRUN_EMAIL_BOTH_MULTIPLE_REPORTS"/>
  379. </out:text>
  380. </out:otherwise>
  381. </out:choose>
  382. </out:when>
  383. <out:otherwise>
  384. <out:choose>
  385. <out:when test="not($emailAsAttachment or $emailAsURL)">
  386. <out:choose>
  387. <out:when test="$bursting='true'">
  388. <out:text>
  389. <xts:string id="IDS_OTHERRUN_DELIVERY_NOTIFY"/>
  390. </out:text>
  391. </out:when>
  392. <out:otherwise>
  393. <out:text>
  394. <xts:string id="IDS_OTHERRUN_EMAIL_NOTIFY"/>
  395. </out:text>
  396. </out:otherwise>
  397. </out:choose>
  398. </out:when>
  399. <out:when test="$emailAsAttachment and not($emailAsURL)">
  400. <out:choose>
  401. <out:when test="$bursting='true'">
  402. <out:text>
  403. <xts:string id="IDS_OTHERRUN_DELIVERY_REPORT"/>
  404. </out:text>
  405. </out:when>
  406. <out:otherwise>
  407. <out:text>
  408. <xts:string id="IDS_OTHERRUN_EMAIL_REPORT"/>
  409. </out:text>
  410. </out:otherwise>
  411. </out:choose>
  412. </out:when>
  413. <out:when test="not($emailAsAttachment) and $emailAsURL">
  414. <out:choose>
  415. <out:when test="$bursting='true'">
  416. <out:text>
  417. <xts:string id="IDS_OTHERRUN_DELIVERY_URL"/>
  418. </out:text>
  419. </out:when>
  420. <out:otherwise>
  421. <out:text>
  422. <xts:string id="IDS_OTHERRUN_EMAIL_URL"/>
  423. </out:text>
  424. </out:otherwise>
  425. </out:choose>
  426. </out:when>
  427. <out:otherwise>
  428. <out:choose>
  429. <out:when test="$bursting='true'">
  430. <out:text>
  431. <xts:string id="IDS_OTHERRUN_DELIVERY_BOTH"/>
  432. </out:text>
  433. </out:when>
  434. <out:otherwise>
  435. <out:text>
  436. <xts:string id="IDS_OTHERRUN_EMAIL_BOTH"/>
  437. </out:text>
  438. </out:otherwise>
  439. </out:choose>
  440. </out:otherwise>
  441. </out:choose>
  442. </out:otherwise>
  443. </out:choose>
  444. <out:if test="$bursting = 'false' or key('env-param', 'run_with_options_job')='true'">
  445. <out:value-of select="' '"/>
  446. <out:choose>
  447. <out:when test="/root/env/param[@name='emailDescription']">
  448. <out:value-of select="/root/env/param[@name='emailDescription']"/>
  449. </out:when>
  450. <out:otherwise>
  451. <xts:string id="IDS_OTHERRUN_EMAIL_NO_RECIPIENTS"/>
  452. </out:otherwise>
  453. </out:choose>
  454. </out:if>
  455. </out:template>
  456. <out:template name="render-format">
  457. <out:param name="format"/>
  458. <out:param name="outputF_HTML_Type" select="'true'"/>
  459. <out:param name="outputPageDefinition" select="''"/>
  460. <out:param name="outputPageOrientation" select="''"/>
  461. <out:choose>
  462. <out:when test="$format='HTML' and $outputF_HTML_Type='true'">
  463. <out:text>
  464. <xts:string id="IDS_OTHERRUN_FORMAT_HTML"/>
  465. </out:text>
  466. <out:if test="position() != last()">
  467. <out:text>, </out:text>
  468. </out:if>
  469. </out:when>
  470. <out:when test="$format='HTMLFragment' and $outputF_HTML_Type='true'">
  471. <out:text>
  472. <xts:string id="IDS_OTHERRUN_FORMAT_HTMLFRAGMENT"/>
  473. </out:text>
  474. <out:if test="position() != last()">
  475. <out:text>, </out:text>
  476. </out:if>
  477. </out:when>
  478. <out:when test="$format='XHTML' and $outputF_HTML_Type='true'">
  479. <out:text>
  480. <xts:string id="IDS_OTHERRUN_FORMAT_XHTML"/>
  481. </out:text>
  482. <out:if test="position() != last()">
  483. <out:text>, </out:text>
  484. </out:if>
  485. </out:when>
  486. <out:when test="$format='PDF'">
  487. <out:choose>
  488. <out:when test="$outputPageDefinition != '' and $outputPageOrientation!=''">
  489. <out:variable name="orientation">
  490. <out:choose>
  491. <out:when test="$outputPageOrientation = 'portrait'">
  492. <out:text>
  493. <xts:string id="IDS_OTHERRUN_PORTRAIT"/>
  494. </out:text>
  495. </out:when>
  496. <out:otherwise>
  497. <out:text>
  498. <xts:string id="IDS_OTHERRUN_LANDSCAPE"/>
  499. </out:text>
  500. </out:otherwise>
  501. </out:choose>
  502. </out:variable>
  503. <out:variable name="pageDefinition">
  504. <out:value-of select="/root/cm:queryResponse/cm:queryReply/cm:pageDefinition[cm:searchPath=$outputPageDefinition]/cm:defaultName"/>
  505. </out:variable>
  506. <xts:string id="IDS_OTHERRUN_FORMAT_PDF_WITH_OPTIONS">
  507. <xts:param name="orientation">
  508. <out:value-of select="$orientation"/>
  509. </xts:param>
  510. <xts:param name="pageDefinition">
  511. <out:value-of select="$pageDefinition"/>
  512. </xts:param>
  513. </xts:string>
  514. </out:when>
  515. <out:otherwise>
  516. <out:text>
  517. <xts:string id="IDS_OTHERRUN_FORMAT_PDF"/>
  518. </out:text>
  519. </out:otherwise>
  520. </out:choose>
  521. <out:if test="position() != last()">
  522. <out:text>, </out:text>
  523. </out:if>
  524. </out:when>
  525. <out:when test="$format='CSV'">
  526. <out:text>
  527. <xts:string id="IDS_OTHERRUN_FORMAT_CSV"/>
  528. </out:text>
  529. <out:if test="position() != last()">
  530. <out:text>, </out:text>
  531. </out:if>
  532. </out:when>
  533. <out:when test="$format='XML'">
  534. <out:text>
  535. <xts:string id="IDS_OTHERRUN_FORMAT_XML"/>
  536. </out:text>
  537. <out:if test="position() != last()">
  538. <out:text>, </out:text>
  539. </out:if>
  540. </out:when>
  541. </out:choose>
  542. </out:template>
  543. <out:template name="render-credential">
  544. <out:param name="credential" select="."/>
  545. <out:param name="pos"/>
  546. <out:variable name="dsConnections" select="/root/dataSources/cm:queryResponse/cm:queryReply/cm:dataSourceConnection"/>
  547. <dp:section>
  548. <dp:input>
  549. <dp:section1>
  550. <xts:string id="IDS_VIEW_PROMPTS_DATASOURCE"/>
  551. </dp:section1>
  552. <dp:section2>
  553. <xts:string id="IDS_VIEW_PROMPTS_CONNECTION">
  554. <xts:param name="datasource_name">
  555. <out:value-of select="$dsConnections[$pos]/cm:parent/cm:dataSource/cm:defaultName"/>
  556. </xts:param>
  557. <xts:param name="connection_name">
  558. <out:value-of select="$dsConnections[$pos]/cm:defaultName"/>
  559. </xts:param>
  560. </xts:string>
  561. <out:choose>
  562. <out:when test="$credential/dataSourceSignon != ''">
  563. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  564. <xts:param name="signon_name">
  565. <out:value-of select="$dsConnections[$pos]/../following-sibling::*[1]/cm:dataSourceSignon/cm:defaultName"/>
  566. </xts:param>
  567. </xts:string>
  568. </out:when>
  569. <out:when test="$credential/username != '' and $credential/password != ''">
  570. <out:variable name="signon_name">
  571. <xts:string id="IDS_VIEW_PROMPTS_USERID_PASSWORD"/>
  572. </out:variable>
  573. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  574. <xts:param name="signon_name">
  575. <out:value-of select="$signon_name"/>
  576. </xts:param>
  577. </xts:string>
  578. </out:when>
  579. <out:when test="$credential/username != ''">
  580. <out:variable name="signon_name">
  581. <xts:string id="IDS_VIEW_PROMPTS_USERID_ONLY"/>
  582. </out:variable>
  583. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  584. <xts:param name="signon_name">
  585. <out:value-of select="$signon_name"/>
  586. </xts:param>
  587. </xts:string>
  588. </out:when>
  589. <out:when test="$credential/password != ''">
  590. <out:variable name="signon_name">
  591. <xts:string id="IDS_VIEW_PROMPTS_PASSWORD_ONLY"/>
  592. </out:variable>
  593. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  594. <xts:param name="signon_name">
  595. <out:value-of select="$signon_name"/>
  596. </xts:param>
  597. </xts:string>
  598. </out:when>
  599. </out:choose>
  600. </dp:section2>
  601. </dp:input>
  602. </dp:section>
  603. </out:template>
  604. <out:template match="*[local-name()='simpleParmValueItem']" mode="render-values">
  605. <out:choose>
  606. <out:when test="*[local-name()='display'] != ''">
  607. &#160;&apos;<out:value-of select="*[local-name()='display']"/>&apos;,
  608. </out:when>
  609. <out:otherwise>
  610. &#160;<xts:string id="IDS_VIEW_PROMPTS_NO_VALUE"/>,
  611. </out:otherwise>
  612. </out:choose>
  613. </out:template>
  614. <out:template match="*[local-name()='simpleParmValueItem'][last()]" mode="render-values">
  615. <out:choose>
  616. <out:when test="*[local-name()='display'] != ''">
  617. &#160;&apos;<out:value-of select="*[local-name()='display']"/>&apos;
  618. </out:when>
  619. <out:otherwise>
  620. &#160;<xts:string id="IDS_VIEW_PROMPTS_NO_VALUE"/>
  621. </out:otherwise>
  622. </out:choose>
  623. </out:template>
  624. <out:template match="*[local-name()='boundRangeParmValueItem' or local-name()='unboundedEndRangeParmValueItem' or local-name()='unboundedStartRangeParmValueItem']" mode="render-values">
  625. <out:choose>
  626. <out:when test="*[local-name()='start']/*[local-name()='display'] != ''">
  627. &#160;&apos;<out:value-of select="*[local-name()='start']/*[local-name()='display']"/>&apos;
  628. </out:when>
  629. <out:when test="*[local-name()='end']/*[local-name()='display'] != ''">
  630. &#160;&apos;<out:value-of select="*[local-name()='end']/*[local-name()='display']"/>&apos;
  631. </out:when>
  632. <out:otherwise>
  633. &#160;<xts:string id="IDS_VIEW_PROMPTS_NO_VALUE"/>
  634. </out:otherwise>
  635. </out:choose>
  636. <out:if test="not(position() = last())">
  637. <out:text>,</out:text>
  638. </out:if>
  639. </out:template>
  640. <out:template match="*[local-name()='hierarchicalParmValueItem']" mode="render-values">
  641. <out:param name="ancestorText" select="./*[local-name()='value']/*[local-name()='display']"/>
  642. <out:param name="position" select="'first'"/>
  643. <out:choose>
  644. <out:when test="*[local-name()='hierarchicalParmValueItem']">
  645. <out:for-each select="./*[local-name()='hierarchicalParmValueItem']">
  646. <out:variable name="pos">
  647. <out:choose>
  648. <out:when test="$position = 'first' and position() = '1'">first</out:when>
  649. <out:otherwise>not_first</out:otherwise>
  650. </out:choose>
  651. </out:variable>
  652. <out:apply-templates select="." mode="render-values">
  653. <out:with-param name="ancestorText" select="concat($ancestorText, ' &gt; ' ,*[local-name()='value']/*[local-name()='display'])"/>
  654. <out:with-param name="position" select="$pos"/>
  655. </out:apply-templates>
  656. </out:for-each>
  657. </out:when>
  658. <out:otherwise>
  659. <out:choose>
  660. <out:when test="$position='not_first'">
  661. <br/>
  662. </out:when>
  663. <out:otherwise>&#160;</out:otherwise>
  664. </out:choose>
  665. <out:text>'</out:text>
  666. <out:value-of select="$ancestorText"/>
  667. <out:text>'</out:text>
  668. </out:otherwise>
  669. </out:choose>
  670. </out:template>
  671. <out:template match="text()" mode="render-values"/>
  672. </xsl:template>
  673. <!--
  674. * - This next template is required to copy all other elements into the result.
  675. -->
  676. <xsl:template match="*">
  677. <xsl:copy>
  678. <xsl:copy-of select="@*"/>
  679. <xsl:apply-templates/>
  680. </xsl:copy>
  681. </xsl:template>
  682. </xsl:stylesheet>