templates.xsl 118 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  13. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  14. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  15. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  16. xmlns:upfront="http://developer.cognos.com/schemas/upfront/"
  17. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  18. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  19. xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
  20. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  21. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  22. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  23. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  24. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  25. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  26. xmlns:x="x"
  27. xmlns:out="dummy-uri"
  28. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cml xsl lyt dt dp cm upfront utml xts cms pf cf cp send x xtsext df">
  29. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  30. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  31. <!--
  32. dt:retention
  33. dt:dateControlStylesheet
  34. dt:dateControlScripts
  35. dt:selectDeselectAll
  36. dt:jobUpdateSequence
  37. dt:updateOptions
  38. dt:jobSortSteps
  39. dt:jobClearOptions
  40. dt:jobExecuteCommand
  41. dt:jobAddNewItems
  42. dt:jobSetSequence
  43. dt:jobEncodeList
  44. dt:encodeEmailRunOptions
  45. dt:appendDeliveryText
  46. dt:generateEmailTo
  47. dt:generateDefaultScheduleParams
  48. dt:generateUIHelpersFromOptions
  49. dt:promptDescription
  50. dt:runOptionValidation
  51. dt:runOptionJavaScriptInit
  52. dt:localizedFloatTextBox
  53. -->
  54. <!-- dt:FloatTextBoxJavaScript and dt:localizedFloatTextBox are used when the input text box takes a float value.
  55. In some locales like German and French the decimal separator is a comma and not a period. We create 2 input fields.
  56. The hidden field contains the number in neutral form (with period). The other one holds the display value. What gets
  57. formatted for display to the user is the value in the display box. What gets submitted to CM is the value of the hidden
  58. element. -->
  59. <xsl:template match="dt:FloatTextBoxJavaScript">
  60. <script language="javascript">
  61. <!-- sParseByDataType and initParsingRegularExpressions functions are defined in prompting javascript file CText.js -->
  62. <!-- init the values before calling the sParseByDataType() -->
  63. initParsingRegularExpressions();
  64. function setHiddenParam(e)
  65. {
  66. var form = document.pform;
  67. var hiddenFormName = e.name.substring(14);
  68. var changedHiddenFormName = "changed_" + hiddenFormName;
  69. form.elements[hiddenFormName].value = sParseByDataType(e.value,"number",true);
  70. if (form.elements[changedHiddenFormName])
  71. {
  72. form.elements[changedHiddenFormName].value=1;
  73. }
  74. }
  75. function getDisplayBoxName(form,formElement)
  76. {
  77. if (formElement != null)
  78. {
  79. floatDisplayBoxName = "_FLOATDISPLAY_"+formElement.name;
  80. if (form.elements[floatDisplayBoxName] != null)
  81. return floatDisplayBoxName;
  82. }
  83. return null;
  84. }
  85. </script>
  86. </xsl:template>
  87. <xsl:template match="dt:paperSizeInputFields">
  88. <out:template name="paperSizeInputFields">
  89. <out:param name="widthValue"/>
  90. <out:param name="heightValue"/>
  91. <out:param name="utml-form-name"/>
  92. <out:param name="form-read-only"/>
  93. <out:param name="isUnitInchSelected"/>
  94. <out:param name="isUnitCentimeterSelected"/>
  95. <dp:input>
  96. <dp:section1 id="LABEL_FOR_PROP_PAGE_SIZE_WIDTH">
  97. <xts:string id="IDS_PROP_PAGE_SIZE_WIDTH"/>
  98. </dp:section1>
  99. <dp:section2>
  100. <out:call-template name="localizedFloatTextBox">
  101. <out:with-param name="ariaLabelledBy" select="'LABEL_FOR_PROP_PAGE_SIZE_WIDTH'"/>
  102. <out:with-param name="eName" select="'m_p_width'"/>
  103. <out:with-param name="eValue" select="$widthValue"/>
  104. <out:with-param name="utml-form-name" select="$utml-form-name"/>
  105. <out:with-param name="form-read-only" select="$form-read-only"/>
  106. <out:with-param name="class" select="'smallInput'"/>
  107. <out:with-param name="dropZeroDecimal" select="'true'"/>
  108. </out:call-template>
  109. </dp:section2>
  110. </dp:input>
  111. <dp:input>
  112. <dp:section1 id="LABEL_FOR_PROP_PAGE_SIZE_HEIGHT">
  113. <xts:string id="IDS_PROP_PAGE_SIZE_HEIGHT"/>
  114. </dp:section1>
  115. <dp:section2>
  116. <out:call-template name="localizedFloatTextBox">
  117. <out:with-param name="ariaLabelledBy" select="'LABEL_FOR_PROP_PAGE_SIZE_HEIGHT'"/>
  118. <out:with-param name="eName" select="'m_p_height'"/>
  119. <out:with-param name="eValue" select="$heightValue"/>
  120. <out:with-param name="utml-form-name" select="$utml-form-name"/>
  121. <out:with-param name="form-read-only" select="$form-read-only"/>
  122. <out:with-param name="class" select="'smallInput'"/>
  123. <out:with-param name="dropZeroDecimal" select="'true'"/>
  124. </out:call-template>
  125. </dp:section2>
  126. </dp:input>
  127. <dp:input>
  128. <dp:section1 id="LABEL_FOR_PROP_PAGE_SIZE_UNIT">
  129. <xts:string id="IDS_PROP_PAGE_SIZE_UNIT"/>
  130. </dp:section1>
  131. <dp:section2>
  132. <utml:select name="m_p_unit" class="smallInput" aria-labelledby="LABEL_FOR_PROP_PAGE_SIZE_UNIT" >
  133. <utml:option value="in">
  134. <out:if test="$isUnitInchSelected">
  135. <out:attribute name="selected">selected</out:attribute>
  136. </out:if>
  137. <xts:string id="IDS_EPS_INCHES"/>
  138. </utml:option>
  139. <utml:option value="cm">
  140. <out:if test="$isUnitCentimeterSelected">
  141. <out:attribute name="selected">selected</out:attribute>
  142. </out:if>
  143. <xts:string id="IDS_EPS_CENTIMETERS"/>
  144. </utml:option>
  145. </utml:select>
  146. </dp:section2>
  147. </dp:input>
  148. </out:template>
  149. </xsl:template>
  150. <xsl:template match="dt:localizedFloatTextBox">
  151. <out:template name="localizedFloatTextBox">
  152. <out:param name="ariaLabelledBy"/>
  153. <out:param name="eName"/>
  154. <out:param name="eValue"/>
  155. <out:param name="toolTip"/>
  156. <out:param name="readOnly" select="'false'"/>
  157. <out:param name="utml-form-name"/>
  158. <out:param name="form-read-only"/>
  159. <out:param name="class"/>
  160. <out:param name="dropZeroDecimal" select="'false'"/>
  161. <out:variable name="numberPattern">
  162. <out:if test="$dropZeroDecimal = 'false'"><xsl:value-of select="string('#,##0.0################')"/></out:if>
  163. </out:variable>
  164. <utml:input type="hidden" utml:update="false">
  165. <xsl:if test="@track and @track='true'">
  166. <utml:track>true</utml:track>
  167. </xsl:if>
  168. <utml:name>
  169. <out:value-of select="$eName"/>
  170. </utml:name>
  171. <utml:value>
  172. <out:value-of select="$eValue"/>
  173. </utml:value>
  174. </utml:input>
  175. <utml:input type="text" size="10" onBlur="javascript:setHiddenParam(this)" utml:update="false" lang="{'{$contentLocale}'}">
  176. <out:if test="$ariaLabelledBy != ''">
  177. <out:attribute name="aria-labelledby"><out:value-of select="$ariaLabelledBy"/></out:attribute>
  178. </out:if>
  179. <out:if test="normalize-space($toolTip) != ''">
  180. <out:attribute name="title"><out:value-of select="normalize-space($toolTip)"/></out:attribute>
  181. </out:if>
  182. <out:if test="$class != ''">
  183. <out:attribute name="class"><out:value-of select="$class"/></out:attribute>
  184. </out:if>
  185. <xsl:if test="@track and @track='true'">
  186. <utml:track>true</utml:track>
  187. </xsl:if>
  188. <utml:name>
  189. <out:value-of select="concat('_FLOATDISPLAY_',$eName)"/>
  190. </utml:name>
  191. <utml:value>
  192. <out:if test="$eValue!=''">
  193. <out:value-of select="xtsext:formatNumber($eValue,$numberPattern,string($contentLocale), number(1))"/>
  194. </out:if>
  195. </utml:value>
  196. <utml:read-only>
  197. <out:value-of select="$readOnly"/>
  198. </utml:read-only>
  199. </utml:input>
  200. </out:template>
  201. </xsl:template>
  202. <!--
  203. dt:selectDeselectAll
  204. Define the javascript functions: selectall() and deselectall().
  205. -->
  206. <xsl:template match="dt:selectDeselectAll">
  207. <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/list.js"/>
  208. <script language="javascript">
  209. function selectall(prefix)
  210. {
  211. if (prefix &amp;&amp; prefix != '')
  212. {
  213. var form = document.pform;
  214. for (var i = 0; i &lt; form.elements.length; i++)
  215. {
  216. if (form.elements[i].checked == false &amp;&amp; form.elements[i].name.indexOf(prefix) == 0)
  217. {
  218. form.elements[i].checked = true;
  219. }
  220. }
  221. }
  222. }
  223. function deselectall(prefix)
  224. {
  225. if (prefix &amp;&amp; prefix != '')
  226. {
  227. var form = document.pform;
  228. for (var i = 0; i &lt; form.elements.length; i++)
  229. {
  230. if (form.elements[i].checked == true &amp;&amp; form.elements[i].name.indexOf(prefix) == 0)
  231. {
  232. form.elements[i].checked = false;
  233. }
  234. }
  235. }
  236. }
  237. </script>
  238. </xsl:template>
  239. <xsl:template match="dt:checkMandatoryScript">
  240. function checkMandatory(obj, label)
  241. {
  242. obj.value = trim(obj.value);
  243. if (obj.value == '')
  244. {
  245. <out:variable name="errmsg">
  246. <xts:string id="IDS_ERR_MANDATORY" encode="javascript">
  247. <xts:param name="field">" + label + "</xts:param>
  248. </xts:string>
  249. </out:variable>
  250. window.alert("<out:value-of select="normalize-space($errmsg)"/>");
  251. if( obj.type != "hidden" &amp;&amp; obj.style.display != "none" &amp;&amp; !obj.disabled ) {
  252. obj.focus();
  253. }
  254. return false;
  255. }
  256. return true;
  257. }
  258. </xsl:template>
  259. <!--
  260. dt:retention -
  261. -->
  262. <xsl:template match="dt:retention">
  263. <xsl:variable name="dt_class" select="@class"/>
  264. <xsl:variable name="dt_trackchange" select="@trackchange"/>
  265. <out:variable name="dt_class"><xsl:value-of select="@class"/></out:variable>
  266. <xsl:variable name="dt_rg_name" select="concat('rg_retention_', $dt_class)"/>
  267. <script language="javascript">
  268. function onClickDuration<xsl:value-of select="@class"/>(durationSelected)
  269. {
  270. var frm = document.pform;
  271. frm.maxNumber_<xsl:value-of select="$dt_class"/>.disabled = durationSelected;
  272. frm.duration_<xsl:value-of select="$dt_class"/>.disabled = !durationSelected;
  273. frm.durationSelect_<xsl:value-of select="$dt_class"/>.disabled = !durationSelected;
  274. }
  275. </script>
  276. <out:variable name="retentionRule" select="$the-object/cm:retentions/cm:retentionRule[@objectClass=$dt_class]"/>
  277. <!-- maxDuration has form of P#M for months of P#D for days -->
  278. <out:variable name="days">
  279. <out:if test="not(key('env-param', '{$dt_rg_name}'))">
  280. <out:value-of select="substring-before(substring-after($retentionRule/@maxDuration,'P'),'D')"/>
  281. </out:if>
  282. </out:variable>
  283. <out:variable name="months">
  284. <out:if test="not(key('env-param', '{$dt_rg_name}'))">
  285. <out:value-of select="substring-before(substring-after($retentionRule/@maxDuration,'P'),'M')"/>
  286. </out:if>
  287. </out:variable>
  288. <out:variable name="occurrence_selected" select="(($retentionRule/@maxObjects > 0 and not(key('env-param', '{$dt_rg_name}'))) or (key('env-param', '{$dt_rg_name}')='maxNumber') or not($retentionRule)) or ($days='' and $months='' and not(key('env-param','{concat('duration_', $dt_class)}')))"/>
  289. <out:variable name="daysDisplay"><xts:string id="IDS_PROP_DAYS"/></out:variable>
  290. <out:variable name="monthsDisplay"><xts:string id="IDS_PROP_MONTHS"/></out:variable>
  291. <!-- A11y support need labels mapping with ids but keeping the ids unique -->
  292. <xsl:variable name="dur">dur<xsl:value-of select="position()"/></xsl:variable>
  293. <xsl:variable name="sel">sel<xsl:value-of select="position()"/></xsl:variable>
  294. <xsl:variable name="optD">optD<xsl:value-of select="position()"/></xsl:variable>
  295. <xsl:variable name="optM">optM<xsl:value-of select="position()"/></xsl:variable>
  296. <xsl:variable name="retentionHint">retentionHint<xsl:value-of select="position()"/></xsl:variable>
  297. <dp:choice title="{@title}" id="{$dt_rg_name}_radiogroup">
  298. <span class="dialogHeaderText" tabindex="0" aria-labelledby="{$retentionHint}"><xts:string id="IDS_PROP_RETENTION_HINT"/></span>
  299. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px;" id="{$retentionHint}"><xts:string id="{@title}"/>&#160;<xts:string id="IDS_PROP_RETENTION_HINT"/></span>
  300. <out:choose>
  301. <out:when test="contains($the-object/cm:permissions, 'write')">
  302. <utml:radio-group name="{$dt_rg_name}">
  303. <utml:default-value>
  304. <out:choose>
  305. <out:when test="$occurrence_selected">maxNumber</out:when>
  306. <out:otherwise>duration</out:otherwise>
  307. </out:choose>
  308. </utml:default-value>
  309. <dp:section1>
  310. <utml:input type="radio" name="{$dt_rg_name}" value="maxNumber" checked="true" tabindex="0" aria-labelledby="lbl_{$dt_rg_name}_maxNumber">
  311. <xsl:attribute name="onclick">onClickDuration<xsl:value-of select="@class"/>(false);</xsl:attribute>
  312. <out:attribute name="title"><xts:string id="{@label}"/></out:attribute>
  313. </utml:input>
  314. </dp:section1>
  315. <dp:section2 id="lbl_{$dt_rg_name}_maxNumber">
  316. <div>
  317. <dp:group>
  318. <dp:groupItem><xts:string id="IDS_PROP_NUMBER_VERSIONS"/></dp:groupItem>
  319. <dp:groupItem><dp:text/></dp:groupItem>
  320. <dp:groupItem>
  321. <utml:input type="text" name="{concat('maxNumber_', $dt_class)}" size="3" maxlength="3" utml:track="true" validateobject="{$dt_rg_name}">
  322. <out:attribute name="title"><xts:string id="IDS_PROP_NUMBER_VERSIONS"/></out:attribute>
  323. <xsl:if test="string($dt_trackchange)!=''">
  324. <out:attribute name="onchange"><xsl:value-of select="$dt_trackchange"/></out:attribute>
  325. </xsl:if>
  326. <out:if test="not($occurrence_selected)">
  327. <out:attribute name="disabled">true</out:attribute>
  328. </out:if>
  329. <utml:value>
  330. <out:choose>
  331. <out:when test="$retentionRule/@maxObjects and not(key('env-param', '{$dt_rg_name}'))">
  332. <out:value-of select="$retentionRule/@maxObjects"/>
  333. </out:when>
  334. <out:when test="$days='' and $months='' and not(key('env-param', '{$dt_rg_name}'))">0</out:when>
  335. <out:when test="$days='' and $months='' and key('env-param','{$dt_rg_name}')='duration'">0</out:when>
  336. </out:choose>
  337. </utml:value>
  338. </utml:input>
  339. </dp:groupItem>
  340. </dp:group>
  341. </div>
  342. </dp:section2>
  343. <dp:section1>
  344. <div>
  345. <utml:input type="radio" name="{$dt_rg_name}" value="duration" tabindex="0" aria-labelledby="lbl_{$dt_rg_name}_duration">
  346. <xsl:attribute name="onclick">
  347. onClickDuration<xsl:value-of select="@class"/>(true);
  348. </xsl:attribute>
  349. <out:attribute name="title">
  350. <xts:string id="{@label}"/>
  351. </out:attribute>
  352. </utml:input>
  353. </div>
  354. </dp:section1>
  355. <dp:section2 id="lbl_{$dt_rg_name}_duration">
  356. <div>
  357. <out:variable name="str_durationUnits">
  358. <xts:string id="IDS_PROP_DURATION_UNITS"/>
  359. </out:variable>
  360. <dp:group>
  361. <dp:groupItem>
  362. <label for="{$dur}">
  363. <xts:string id="IDS_PROP_DURATION"/>
  364. </label>
  365. <xts:string id="IDS_PROP_DURATION_DUMMY">
  366. <xts:param name="duraTime">
  367. <dp:groupItem>
  368. <dp:text/>
  369. </dp:groupItem>
  370. <dp:groupItem>
  371. <utml:input type="text" name="{concat('duration_', $dt_class)}" size="3" maxlength="3" validateobject="{$dt_rg_name}" id="{$dur}">
  372. <xsl:if test="string($dt_trackchange)!=''">
  373. <out:attribute name="onchange">
  374. <xsl:value-of select="$dt_trackchange"/>
  375. </out:attribute>
  376. </xsl:if>
  377. <out:if test="$occurrence_selected or ($days='' and $months='' and not(key('env-param', '{concat('duration_', $dt_class)}')))">
  378. <out:attribute name="disabled">true</out:attribute>
  379. </out:if>
  380. <utml:value>
  381. <out:choose>
  382. <out:when test="$days!=''">
  383. <out:value-of select="$days"/>
  384. </out:when>
  385. <out:when test="$months!=''">
  386. <out:value-of select="$months"/>
  387. </out:when>
  388. </out:choose>
  389. </utml:value>
  390. </utml:input>
  391. </dp:groupItem>
  392. </xts:param>
  393. <xts:param name="duraSpacer">
  394. <dp:groupItem>
  395. <dp:text/>
  396. </dp:groupItem>
  397. </xts:param>
  398. <xts:param name="duraType">
  399. <dp:groupItem>
  400. <utml:select name="{concat('durationSelect_', $dt_class)}" id="{$sel}">
  401. <out:attribute name="aria-label">
  402. <out:value-of select="$str_durationUnits"/>
  403. </out:attribute>
  404. <out:if test="$occurrence_selected or ($days='' and $months='' and not(key('env-param', '{concat('durationSelect_', $dt_class)}')))">
  405. <out:attribute name="disabled">true</out:attribute>
  406. </out:if>
  407. <utml:option value="days" id="{$optD}">
  408. <out:if test="$days!='' or key('env-param','{concat('durationSelect_',$dt_class)}')='days' or not(key('env-param','{concat('durationSelect_',$dt_class)}'))">
  409. <out:attribute name="selected">selected</out:attribute>
  410. </out:if>
  411. <label for="{$optD}">
  412. <out:value-of select="$daysDisplay"/>
  413. </label>
  414. </utml:option>
  415. <utml:option value="months" id="{$optM}">
  416. <out:if test="$months!='' or key('env-param','{concat('durationSelect_',$dt_class)}')='months'">
  417. <out:attribute name="selected">selected</out:attribute>
  418. </out:if>
  419. <label for="{$optM}">
  420. <out:value-of select="$monthsDisplay"/>
  421. </label>
  422. </utml:option>
  423. </utml:select>
  424. </dp:groupItem>
  425. </xts:param>
  426. </xts:string>
  427. </dp:groupItem>
  428. </dp:group>
  429. </div>
  430. </dp:section2>
  431. </utml:radio-group>
  432. </out:when>
  433. <out:otherwise>
  434. <out:choose>
  435. <out:when test="$occurrence_selected">
  436. <dp:section1>
  437. <div>
  438. <xts:string id="IDS_PROP_NUMBER_VERSIONS_READONLY">
  439. <xts:param name="maxNumber">
  440. <out:value-of select="$retentionRule/@maxObjects"/>
  441. </xts:param>
  442. </xts:string>
  443. </div>
  444. </dp:section1>
  445. </out:when>
  446. <out:otherwise>
  447. <dp:section1>
  448. <out:choose>
  449. <out:when test="$days != '' ">
  450. <xts:string id="IDS_PROP_DAYS_READONLY">
  451. <xts:param name="numDays">
  452. <out:value-of select="$days"/>
  453. </xts:param>
  454. </xts:string>
  455. </out:when>
  456. <out:otherwise>
  457. <xts:string id="IDS_PROP_MONTHS_READONLY">
  458. <xts:param name="numMonths">
  459. <out:value-of select="$months"/>
  460. </xts:param>
  461. </xts:string>
  462. </out:otherwise>
  463. </out:choose>
  464. </dp:section1>
  465. </out:otherwise>
  466. </out:choose>
  467. </out:otherwise>
  468. </out:choose>
  469. </dp:choice>
  470. </xsl:template>
  471. <xsl:template match="dt:cmmPostBackForm">
  472. <form name="cmmform" method="post" action="{'{$gateway}'}">
  473. <input type="hidden" name="b_action" value="mms.run"/>
  474. <input type="hidden" name="path" value="/controller"/>
  475. <out:if test="key('env-param','pid')">
  476. <input type="hidden" name="pid">
  477. <out:attribute name="value"><out:value-of select="key('env-param','pid')"/></out:attribute>
  478. </input>
  479. </out:if>
  480. <out:if test="key('env-param','cmm.originalURLRedirect')">
  481. <input type="hidden" name="cmm.originalURLRedirect">
  482. <out:attribute name="value"><out:value-of select="key('env-param','cmm.originalURLRedirect')"/></out:attribute>
  483. </input>
  484. </out:if>
  485. <out:if test="key('env-param','defaultName')">
  486. <input type="hidden" name="defaultName">
  487. <out:attribute name="value"><out:value-of select="key('env-param','defaultName')"/></out:attribute>
  488. </input>
  489. </out:if>
  490. <out:if test="key('env-param','defaultLocation')">
  491. <input type="hidden" name="defaultLocation">
  492. <out:attribute name="value"><out:value-of select="key('env-param','defaultLocation')"/></out:attribute>
  493. </input>
  494. </out:if>
  495. <out:if test="key('env-param','defaultLocationDisplay')">
  496. <input type="hidden" name="defaultLocationDisplay">
  497. <out:attribute name="value"><out:value-of select="key('env-param','defaultLocationDisplay')"/></out:attribute>
  498. </input>
  499. </out:if>
  500. <out:if test="key('env-param','defaultDescription')">
  501. <input type="hidden" name="defaultDescription">
  502. <out:attribute name="value"><out:value-of select="key('env-param','defaultDescription')"/></out:attribute>
  503. </input>
  504. </out:if>
  505. <out:if test="key('env-param','defaultScreenTip')">
  506. <input type="hidden" name="defaultScreenTip">
  507. <out:attribute name="value"><out:value-of select="key('env-param','defaultScreenTip')"/></out:attribute>
  508. </input>
  509. </out:if>
  510. <out:if test="key('env-param','cancelURL')">
  511. <input type="hidden" name="cancelURL">
  512. <out:attribute name="value"><out:value-of select="key('env-param','cancelURL')"/></out:attribute>
  513. </input>
  514. </out:if>
  515. <out:if test="key('env-param','cmm.SafeMode')">
  516. <input type="hidden" name="cmm.SafeMode">
  517. <out:attribute name="value"><out:value-of select="key('env-param','cmm.SafeMode')"/></out:attribute>
  518. </input>
  519. </out:if>
  520. </form>
  521. </xsl:template>
  522. <!--
  523. ===============================================================================================
  524. modify the sequences of the steps.
  525. ===============================================================================================
  526. -->
  527. <xsl:template match="dt:jobUpdateSequence">
  528. <out:template match="/">
  529. <xts:sequence>
  530. <out:for-each select="/root/env/param[@name='entriesSortOrder']">
  531. <out:variable name="dispSeq">
  532. <out:value-of select="substring-before(. , ',')"/>
  533. </out:variable>
  534. <out:variable name="objGuid">
  535. <out:value-of select="substring-after(. , ',')"/>
  536. </out:variable>
  537. <xts:replace>
  538. <xsl:attribute name="select">
  539. <xsl:text>/root/steps/*[local-name()='queryResponse' and namespace-uri()='http://developer.cognos.com/schemas/xts-cm/1/']/*[*[local-name()='guid' and string()='{$objGuid}']]/*[local-name() = 'displaySequence']</xsl:text>
  540. </xsl:attribute>
  541. <displaySequence><out:value-of select="$dispSeq"/></displaySequence>
  542. </xts:replace>
  543. <!-- mark this step as updated -->
  544. <out:if test="not(/root/steps/cm:queryResponse/*[x:guid=$objGuid and (x:added|x:updated)])">
  545. <xts:append>
  546. <xsl:attribute name="select">
  547. <xsl:text>/root/steps/*[local-name()='queryResponse' and namespace-uri()='http://developer.cognos.com/schemas/xts-cm/1/']/*[*[local-name()='guid' and string()='{$objGuid}']]</xsl:text>
  548. </xsl:attribute>
  549. <x:updated/>
  550. </xts:append>
  551. </out:if>
  552. </out:for-each>
  553. <xts:replace select="/root/steps">
  554. <steps>
  555. <queryResponse xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  556. <xts:transform src="transforms/portal/jobDefinition/sortJobSteps.xslt" processor="XSLT">
  557. <steps>
  558. <xts:queryNode select="/root/steps/*[local-name()='queryResponse' and namespace-uri()='http://developer.cognos.com/schemas/xts-cm/1/']/*"/>
  559. </steps>
  560. </xts:transform>
  561. </queryResponse>
  562. </steps>
  563. </xts:replace>
  564. <xts:delete select="/root/env/param[@name='modifySequence' or @name = 'jobSteps' or @name = 'entriesSortOrder']"/>
  565. </xts:sequence>
  566. </out:template>
  567. </xsl:template>
  568. <!--
  569. ===============================================================================================
  570. updateOptions
  571. Will update the job or step options with the params in the env.
  572. ===============================================================================================
  573. -->
  574. <xsl:template match="dt:updateOptions">
  575. <out:template match="/">
  576. <xts:sequence>
  577. <!-- if the user hit the OK button -->
  578. <out:choose>
  579. <out:when test="key('env-param','userHitOK') = 'true'">
  580. <out:choose>
  581. <!-- visited the job options dialog -->
  582. <out:when test="key('env-param','run_options_visited') = 'true'">
  583. <xts:delete select="/root/jobOptions/*[local-name()='options' or local-name()='UIHelpers' or local-name()='parameters']"/>
  584. <!-- if the override default report options checkbox isn't checked, and outputFormat is not overriden then delete all the report options from the env -->
  585. <out:if test="not(key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true')">
  586. <xts:delete select="/root/env/param[starts-with(@name,'m_ro_') or starts-with(@name, 'm_pdf_') or starts-with(@name, 'm_arc_')]"/>
  587. </out:if>
  588. <out:if test="(key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true') and key('env-param','m_ro_promptCacheMode')='create'">
  589. <xts:delete select="/root/env/param[(starts-with(@name,'m_ro_') or starts-with(@name, 'm_pdf_') or starts-with(@name, 'm_arc_')) and (@name!='m_ro_promptCacheMode') and (@name!='m_ro_outputLocale')]"/>
  590. </out:if>
  591. <out:if test="not(key('env-param','override_default_content_task_options')='true')">
  592. <xts:delete select="/root/env/param[starts-with(@name,'ctro_runoption')]"/>
  593. </out:if>
  594. <out:if test="not(key('env-param','override_default_deployment_options')='true')">
  595. <xts:delete select="/root/env/param[starts-with(@name,'deploymentro_upgrade')]"/>
  596. <xts:delete select="/root/env/param[starts-with(@name,'deploymentro_preserveStoreIDs')]"/>
  597. </out:if>
  598. <out:if test="not(key('env-param','override_default_index_update_task_options')='true')">
  599. <xts:delete select="/root/env/param[starts-with(@name,'m_io_force')]"/>
  600. <xts:delete select="/root/env/param[starts-with(@name,'m_io_indexObjectTypes')]"/>
  601. <xts:delete select="/root/env/param[starts-with(@name,'m_io_indexReferencedData')]"/>
  602. <xts:delete select="/root/env/param[starts-with(@name,'m_io_indexModeledData')]"/>
  603. </out:if>
  604. <xts:append select="/root/jobOptions">
  605. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  606. <root>
  607. <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
  608. <root>
  609. <xts:queryNode select="/root/env"/>
  610. <xts:transform name="XML" src="portal/options.xml"/>
  611. <contentLocale><out:value-of select="$contentLocale"/></contentLocale>
  612. <out:if test="key('env-param','deliveryOptions') != ''">
  613. <deliveryOptions>
  614. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','deliveryOptions') )), true() )" disable-output-escaping="yes"/>
  615. </deliveryOptions>
  616. </out:if>
  617. <out:if test="key('env-param','mobileOptions') != ''">
  618. <mobileOptions>
  619. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','mobileOptions') )), true() )" disable-output-escaping="yes"/>
  620. </mobileOptions>
  621. </out:if>
  622. <optionType>runOptions</optionType>
  623. <out:if test="key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true'">
  624. <optionType>genericOptions</optionType>
  625. </out:if>
  626. <optionType>powerPlay8JobOptions</optionType>
  627. <optionType>pdfOptions</optionType>
  628. <optionType>archiveOptions</optionType>
  629. <out:if test="key('env-param','override_default_content_task_options')='true'">
  630. <optionType>contentTaskOptions</optionType>
  631. </out:if>
  632. <out:if test="key('env-param','override_default_deployment_options')='true'">
  633. <optionType>deploymentOptions</optionType>
  634. </out:if>
  635. <out:if test="key('env-param','override_default_index_update_task_options')='true'">
  636. <optionType>indexOptions</optionType>
  637. </out:if>
  638. <genDefaults>false</genDefaults>
  639. <batchOptions>true</batchOptions>
  640. </root>
  641. </xts:transform>
  642. </root>
  643. </xts:transform>
  644. <out:if test="key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true'">
  645. <xsl:call-template name="dt:buildUIHelper">
  646. <xsl:with-param name="default" select="'false()'"/>
  647. <xsl:with-param name="jobDefinition" select="'true()'"/>
  648. </xsl:call-template>
  649. </out:if>
  650. </xts:append>
  651. <xts:delete select="/root/env/param[@name='jobOptions']"/>
  652. </out:when>
  653. <!-- visited the step options dialog -->
  654. <out:when test="key('env-param','step_options_visited') = 'true'">
  655. <out:variable name="current-step" select="/root/env/param[@name='current_step']"/>
  656. <xts:delete>
  657. <xsl:attribute name="select">
  658. <xsl:text>/root/steps/*/*/*[local-name() = 'displaySequence' and string()='{$current-step}']/../*[local-name()='parameters' or local-name()='options' or local-name()='UIHelpers']</xsl:text>
  659. </xsl:attribute>
  660. </xts:delete>
  661. <!-- if the override default report options checkbox isn't checked, then delete all the m_ro_ from the env except m_ro_promptCacheMode -->
  662. <out:if test="not(key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true')">
  663. <xts:delete select="/root/env/param[(starts-with(@name,'m_ro_') or starts-with(@name, 'm_pdf_') or starts-with(@name, 'm_arc_')) and (@name!='m_ro_promptCacheMode')]"/>
  664. </out:if>
  665. <out:if test="(key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true') and key('env-param','m_ro_promptCacheMode')='create'">
  666. <xts:delete select="/root/env/param[(starts-with(@name,'m_ro_') or starts-with(@name,'m_go_') or starts-with(@name, 'm_pdf_') or starts-with(@name, 'm_arc_')) and (@name!='m_ro_promptCacheMode') and (@name!='m_ro_outputLocale')]"/>
  667. </out:if>
  668. <out:if test="key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true' or key('env-param','override_default_parameters')='true' or key('env-param','m_ro_promptCacheMode')">
  669. <xts:append>
  670. <xsl:attribute name="select">
  671. <xsl:text>/root/steps/*/*/*[local-name() = 'displaySequence' and string()='{$current-step}']/..</xsl:text>
  672. </xsl:attribute>
  673. <out:if test="key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true' or key('env-param','m_ro_promptCacheMode')">
  674. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  675. <root>
  676. <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
  677. <root>
  678. <xts:queryNode select="/root/env"/>
  679. <xts:transform name="XML" src="portal/options.xml"/>
  680. <contentLocale><out:value-of select="$contentLocale"/></contentLocale>
  681. <out:choose>
  682. <out:when test="key('env-param','step_class')='contentTask'">
  683. <optionType>contentTaskOptions</optionType>
  684. </out:when>
  685. <out:when test="key('env-param','step_class')='importDeployment'">
  686. <optionType>deploymentOptions</optionType>
  687. </out:when>
  688. <out:when test="key('env-param','step_class')='indexUpdateTask'">
  689. <optionType>indexOptions</optionType>
  690. </out:when>
  691. <out:otherwise>
  692. <out:if test="key('env-param','deliveryOptions') != ''">
  693. <deliveryOptions>
  694. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','deliveryOptions') )), true() )" disable-output-escaping="yes"/>
  695. </deliveryOptions>
  696. </out:if>
  697. <out:if test="key('env-param','mobileOptions') != ''">
  698. <mobileOptions>
  699. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','mobileOptions') )), true() )" disable-output-escaping="yes"/>
  700. </mobileOptions>
  701. </out:if>
  702. <out:choose>
  703. <out:when test="contains(' powerPlay8Report powerPlay8ReportView ', concat(' ', key('env-param', 'step_class'), ' '))">
  704. <optionType>powerPlay8Options</optionType>
  705. </out:when>
  706. <out:otherwise>
  707. <optionType>runOptions</optionType>
  708. </out:otherwise>
  709. </out:choose>
  710. <optionType>pdfOptions</optionType>
  711. <out:if test="key('env-param','override_default_options')='true' or key('env-param','override_outputFormat_option')='true'">
  712. <optionType>genericOptions</optionType>
  713. </out:if>
  714. <optionType>archiveOptions</optionType>
  715. </out:otherwise>
  716. </out:choose>
  717. <out:if test="not(key('env-param','override_default_options') or key('env-param','override_outputFormat_option')='true') and key('env-param','m_ro_promptCacheMode')='none'">
  718. <genDefaults>false</genDefaults>
  719. </out:if>
  720. <batchOptions>true</batchOptions>
  721. <jobDefaultSaveOutputOption><out:value-of select="/root/jobOptions/options/value/item[name='saveOutput']/value"/></jobDefaultSaveOutputOption>
  722. </root>
  723. </xts:transform>
  724. </root>
  725. </xts:transform>
  726. </out:if>
  727. <out:if test="((key('env-param','m_ro_promptCacheMode')='none' or not(key('env-param','m_ro_promptCacheMode'))) and (key('env-param','override_default_parameters')='true' or key('env-param','m_rp_parameters') ) and key('env-param','m_rp_parameters')!='')">
  728. <out:value-of select="xtsext:web64decode( string(key('env-param','m_rp_parameters')), true() )" disable-output-escaping="yes"/>
  729. </out:if>
  730. <xsl:call-template name="dt:buildUIHelper">
  731. <xsl:with-param name="default" select="'false()'"/>
  732. <xsl:with-param name="jobDefinition" select="'false()'"/>
  733. <xsl:with-param name="parameters" select="'key(&quot;env-param&quot;,&quot;override_default_parameters&quot;)=&quot;true&quot;'"/>
  734. </xsl:call-template>
  735. <out:if test="count(/root/steps//cm:jobStepDefinition[cm:displaySequence=$current-step][x:added]) = 0 and count(/root/steps//cm:jobStepDefinition[cm:displaySequence=$current-step][x:updated]) = 0">
  736. <x:updated/>
  737. </out:if>
  738. </xts:append>
  739. </out:if>
  740. <!-- delete the web64 blob for job steps. This will make sure that it get repopulated -->
  741. <xts:delete select="/root/env/param[@name = 'jobSteps']"/>
  742. </out:when>
  743. </out:choose>
  744. <!-- done with the params returned from the step options or job options, so replace the env -->
  745. <out:if test="key('env-param','jobDefinitionEnv') != ''">
  746. <xts:delete select="/root/env/param[not(starts-with(@name, 'stack_') or @name = 'ps_nav_source' or @name = 'ps_nav_stack' or @name = 'm' or @name = 'ps_nav_op')]"/>
  747. <xts:append select="/root/env">
  748. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobDefinitionEnv') )), true() )" disable-output-escaping="yes"/>
  749. </xts:append>
  750. </out:if>
  751. </out:when>
  752. <out:otherwise>
  753. <!-- done with the params returned from the step options or job options, so replace the env -->
  754. <out:if test="key('env-param','jobDefinitionEnv') != ''">
  755. <xts:replace select="/root/env">
  756. <out:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobDefinitionEnv') )), true() )" disable-output-escaping="yes"/>
  757. </xts:replace>
  758. </out:if>
  759. </out:otherwise>
  760. </out:choose>
  761. </xts:sequence>
  762. </out:template>
  763. </xsl:template>
  764. <!--
  765. dt:generateUIHelpersFromOptions
  766. generates the summary information using options from CM
  767. -->
  768. <xsl:template match="dt:generateUIHelpersFromOptions" name="dt:generateUIHelpersFromOptions">
  769. <out:template name="dt:generateUIHelpersFromOptions">
  770. <out:param name="queryReplyPath"/>
  771. <out:param name="saveAsPath"/> <!-- used to generate the default saveAs when dealing with scheduled reports -->
  772. <out:param name="deliveryInfo"/>
  773. <out:param name="deliveryReplyPosition" select="1"/>
  774. <out:param name="appendPath"/>
  775. <out:param name="currentReply" select="1"/>
  776. <out:param name="steps"/>
  777. <out:param name="genParams" select="false()"/>
  778. <out:variable name="optionItems" select="$queryReplyPath[position()=$currentReply]/*[local-name()='options']/*[local-name()='value']/*"/>
  779. <out:variable name="emailRecipientOptionItems" select="$queryReplyPath[position()=$currentReply]/*[local-name()='options']/*[local-name()='value']/*[contains(@*[local-name()='type'],'bus:deliveryOptionSearchPathMultipleObjectArray')]"/>
  780. <out:variable name="mobileRecipientOptionItems" select="$queryReplyPath[position()=$currentReply]/*[local-name()='options']/*[local-name()='value']/*[contains(@*[local-name()='type'],'bus:mobileOptionSearchPathMultipleObjectArray')]"/>
  781. <out:variable name="email" select="$optionItems[./*[local-name()='name']='email']/*[local-name()='value'] = 'true'"/>
  782. <out:variable name="mobile" select="$optionItems[./*[local-name()='name']='mobile']/*[local-name()='value'] = 'true'"/>
  783. <out:variable name="a11y" select="$optionItems[./*[local-name()='name']='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/*[local-name()='value']='true'"/>
  784. <!-- deliveryOptions recipients -->
  785. <out:variable name="typedRecipients" select="$optionItems[./*[local-name()='name' and (.='toAddress' or .='ccAddress' or .='bccAddress')]]/*[local-name()='value']/*"/>
  786. <out:variable name="typedRecipientsCount" select="count($typedRecipients)"/>
  787. <out:variable name="selectedRecipients" select="$emailRecipientOptionItems[./*[local-name()='name' and (.='to' or .='cc' or .='bcc')]]/*[local-name()='value']/*"/>
  788. <out:variable name="selectedRecipientsCount" select="count($selectedRecipients)"/>
  789. <!-- mobileOptions recipients -->
  790. <out:variable name="mobileRecipients" select="$mobileRecipientOptionItems[./*[local-name()='name' and (.='to')]]/*[local-name()='value']/*"/>
  791. <out:variable name="mobileRecipientsCount" select="count($mobileRecipients)"/>
  792. <!-- runOptions recipients, Baltic way of storing email recipients -->
  793. <out:variable name="old_typedRecipients" select="$optionItems[./*[local-name()='name' and .='emailToAddress']]/*[local-name()='value']/*"/>
  794. <out:variable name="old_typedRecipientsCount" select="count($old_typedRecipients)"/>
  795. <out:variable name="old_selectedRecipients" select="$optionItems[./*[local-name()='name' and .='emailTo']]/*[local-name()='value']/*"/>
  796. <out:variable name="old_selectedRecipientsCount" select="count($old_selectedRecipients)"/>
  797. <out:variable name="recipientCount">
  798. <out:choose>
  799. <out:when test="($typedRecipientsCount + $selectedRecipientsCount) = 0">
  800. <out:value-of select="$old_typedRecipientsCount + $old_selectedRecipientsCount"/>
  801. </out:when>
  802. <out:otherwise>
  803. <out:value-of select="$typedRecipientsCount + $selectedRecipientsCount"/>
  804. </out:otherwise>
  805. </out:choose>
  806. </out:variable>
  807. <!--
  808. find out if we had to query for the email recipient for this step. Set a value of 0 or 1 so it can be added to the
  809. current reply count used to keep track of what query we're looking at.
  810. -->
  811. <out:variable name="queriedEmail">
  812. <out:choose>
  813. <!-- if we only have 1 recipient and it's a reference to another object -->
  814. <out:when test="$typedRecipientsCount = 0 and $selectedRecipientsCount = 1">
  815. <xsl:value-of select="1"/>
  816. </out:when>
  817. <out:when test="$typedRecipientsCount = 0 and $selectedRecipientsCount = 0 and $old_typedRecipientsCount = 0 and $old_selectedRecipientsCount = 1">
  818. <xsl:value-of select="1"/>
  819. </out:when>
  820. <out:otherwise>
  821. <xsl:value-of select="0"/>
  822. </out:otherwise>
  823. </out:choose>
  824. </out:variable>
  825. <!--
  826. find out if we had to query for the printer name for this step. Set a value of 0 or 1 so it can be added to the
  827. current reply count used to keep track of what query we're looking at.
  828. -->
  829. <out:variable name="queriedPrinter">
  830. <out:choose>
  831. <out:when test="$optionItems[./*[local-name()='name']='print']/*[local-name()='value'] = 'true' and $optionItems[./*[local-name()='name']='printer']/*[local-name()='value'] != ''">
  832. <xsl:value-of select="1"/>
  833. </out:when>
  834. <out:otherwise>
  835. <xsl:value-of select="0"/>
  836. </out:otherwise>
  837. </out:choose>
  838. </out:variable>
  839. <!--
  840. find out if we had to query for the saveAs information for this step. Set a value of 0 or 1 so it can be added to the
  841. current reply count used to keep track of what query we're looking at.
  842. -->
  843. <out:variable name="queriedSaveAs">
  844. <out:choose>
  845. <out:when test="$optionItems[./*[local-name()='name']='saveAs']/*[local-name()='parentSearchPath'] != ''">
  846. <xsl:value-of select="1"/>
  847. </out:when>
  848. <out:otherwise>
  849. <xsl:value-of select="0"/>
  850. </out:otherwise>
  851. </out:choose>
  852. </out:variable>
  853. <out:variable name="newPath">
  854. <out:value-of select="$appendPath"/>[<out:value-of select="$currentReply"/>]
  855. </out:variable>
  856. <out:variable name="hasRecipients">
  857. <out:choose>
  858. <out:when test="$recipientCount='0'">false</out:when>
  859. <out:otherwise>true</out:otherwise>
  860. </out:choose>
  861. </out:variable>
  862. <out:variable name="hasMobileRecipients">
  863. <out:choose>
  864. <out:when test="$mobileRecipientsCount='0'">false</out:when>
  865. <out:otherwise>true</out:otherwise>
  866. </out:choose>
  867. </out:variable>
  868. <out:variable name="emailSummary">
  869. <xsl:call-template name="dt:generateEmailSummary">
  870. <xsl:with-param name="jobDefinition" select="'$queryReplyPath[position()=$currentReply]/*[local-name()=&quot;objectClass&quot;]=&quot;jobDefinition&quot;'"/>
  871. <xsl:with-param name="emailAsAttachment" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;emailAsAttachment&quot;]/*[local-name()=&quot;value&quot;]=&quot;true&quot;'"/>
  872. <xsl:with-param name="emailAsURL" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;emailAsURL&quot;]/*[local-name()=&quot;value&quot;]=&quot;true&quot;'"/>
  873. </xsl:call-template>
  874. </out:variable>
  875. <out:variable name="mobileSummary">
  876. <xsl:call-template name="dt:generateMobileSummary">
  877. <xsl:with-param name="jobDefinition" select="'$queryReplyPath[position()=$currentReply]/*[local-name()=&quot;objectClass&quot;]=&quot;jobDefinition&quot;'"/>
  878. </xsl:call-template>
  879. </out:variable>
  880. <out:variable name="printerSummary">
  881. <out:choose>
  882. <out:when test="$queriedPrinter = '1' and $deliveryInfo != ''">
  883. <out:value-of select="$deliveryInfo/*[local-name()='queryReply' and position() = ($deliveryReplyPosition + $queriedEmail)]/*/*[local-name()='defaultName']"/>
  884. </out:when>
  885. <out:when test="$optionItems[./*[local-name()='name']='print']/*[local-name()='value'] = 'true' and $optionItems[./*[local-name()='name']='printerAddress']/*[local-name()='value'] != ''">
  886. <out:value-of select="$optionItems[./*[local-name()='name']='printerAddress']/*[local-name()='value']"/>
  887. </out:when>
  888. </out:choose>
  889. </out:variable>
  890. <!-- get the PDF option summary -->
  891. <out:variable name="PDFOptionSummary">
  892. <xsl:call-template name="dt:buildPDFOptionSummary">
  893. <xsl:with-param name="orientation" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;outputPageOrientation&quot;]/*[local-name()=&quot;value&quot;]'"/>
  894. <xsl:with-param name="paperSize" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;outputPageDefinition&quot;]/*[local-name()=&quot;value&quot;]'"/>
  895. <xsl:with-param name="userPassword" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;userPassword&quot;]/*[local-name()=&quot;value&quot;]'"/>
  896. <xsl:with-param name="ownerPassword" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;ownerPassword&quot;]/*[local-name()=&quot;value&quot;]'"/>
  897. </xsl:call-template>
  898. </out:variable>
  899. <out:variable name="formatSummary">
  900. <xsl:call-template name="dt:buildFormatSummary">
  901. <xsl:with-param name="formats" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;outputFormat&quot;]/*[local-name()=&quot;value&quot;]/*'"/>
  902. <xsl:with-param name="PDFSummary" select="'$PDFOptionSummary'"/>
  903. <xsl:with-param name="htmlSelected" select="'true()'"/>
  904. <xsl:with-param name="XLSSelected" select="'true()'"/>
  905. <xsl:with-param name="enableSelection" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;selectionBasedFeatures&quot;]/*[local-name()=&quot;value&quot;]'"/>
  906. <xsl:with-param name="verticalElements" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;verticalElements&quot;]/*[local-name()=&quot;value&quot;]'"/>
  907. </xsl:call-template>
  908. </out:variable>
  909. <out:variable name="burstSummary">
  910. <xsl:call-template name="dt:buildBurstSummary">
  911. <xsl:with-param name="burstDistribution" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;burstDistribution&quot;]/*[local-name()=&quot;value&quot;]'"/>
  912. <xsl:with-param name="burstQueryPrefetch" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;burstQueryPrefetch&quot;]/*[local-name()=&quot;value&quot;]'"/>
  913. <xsl:with-param name="burstKeyLimit" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;burstKeyLimit&quot;]/*[local-name()=&quot;value&quot;]'"/>
  914. </xsl:call-template>
  915. </out:variable>
  916. <out:variable name="a11ySummary">
  917. <out:if test="$a11y">
  918. <xts:string id="IDS_PROP_RUN_A11Y_SUPPORT"/>
  919. </out:if>
  920. </out:variable>
  921. <out:variable name="archiveOptionSummary">
  922. <xsl:call-template name="dt:buildArchiveOptionSummary">
  923. <xsl:with-param name="name" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;filenameStub&quot;]/*[local-name()=&quot;value&quot;]'"/>
  924. <xsl:with-param name="location" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;archiveLocation&quot;]/*[local-name()=&quot;value&quot;]'"/>
  925. <xsl:with-param name="conflict" select="'$optionItems[./*[local-name()=&quot;name&quot;]=&quot;conflictResolution&quot;]/*[local-name()=&quot;value&quot;]'"/>
  926. </xsl:call-template>
  927. </out:variable>
  928. <xts:append select="{'{$newPath}'}">
  929. <out:choose>
  930. <out:when test="not($genParams)">
  931. <xsl:element name="UIHelpers">
  932. <xsl:element name="emailRecipients">
  933. <xsl:call-template name="dt:generateEmailRecipientSummary"/>
  934. </xsl:element>
  935. <xsl:element name="emailRecipientsCount"><out:value-of select="$recipientCount"/></xsl:element>
  936. <xsl:element name="hasRecipients"><out:value-of select="$hasRecipients"/></xsl:element>
  937. <xsl:element name="emailSummary"><out:value-of select="$emailSummary"/></xsl:element>
  938. <xsl:element name="mobileRecipients">
  939. <xsl:call-template name="dt:generateMobileRecipientSummary"/>
  940. </xsl:element>
  941. <xsl:element name="mobileRecipientsCount"><out:value-of select="$mobileRecipientsCount"/></xsl:element>
  942. <xsl:element name="hasMobileRecipients"><out:value-of select="$hasMobileRecipients"/></xsl:element>
  943. <xsl:element name="mobileSummary"><out:value-of select="$mobileSummary"/></xsl:element>
  944. <xsl:element name="printerSummary"><out:value-of select="$printerSummary"/></xsl:element>
  945. <xsl:element name="saveAsSummary"><xsl:call-template name="dt:saveAsSummary"/></xsl:element>
  946. <xsl:element name="formatSummary"><out:value-of select="$formatSummary"/></xsl:element>
  947. <xsl:element name="burstSummary"><out:value-of select="$burstSummary"/></xsl:element>
  948. <xsl:element name="a11ySummary"><out:value-of select="$a11ySummary"/></xsl:element>
  949. <out:if test="$archiveOptionSummary != ''">
  950. <xsl:element name="saveToFileSystemSummary">
  951. <xts:string id="IDS_OTHERRUN_SAVE_FILE_SYSTEM"/>
  952. <xsl:text> (</xsl:text>
  953. <out:value-of select="$archiveOptionSummary"/>
  954. <xsl:text>)</xsl:text>
  955. </xsl:element>
  956. </out:if>
  957. <xsl:call-template name="dt:promptSummaryText">
  958. <xsl:with-param name="parameterPath" select="'$queryReplyPath[position()=$currentReply]/*[local-name()=&quot;parameters&quot;]'"/>
  959. </xsl:call-template>
  960. <xsl:element name="parameterDescription"><out:value-of select="$visibleDescription"/></xsl:element>
  961. <out:if test="string-length($description) > 45">
  962. <xsl:element name="parameterDescriptionToLong">true</xsl:element>
  963. </out:if>
  964. </xsl:element>
  965. </out:when>
  966. <out:otherwise>
  967. <xsl:element name="param">
  968. <xsl:attribute name="name">emailDescription</xsl:attribute>
  969. <xsl:call-template name="dt:generateEmailRecipientSummary"/>
  970. </xsl:element>
  971. <xsl:element name="param">
  972. <xsl:attribute name="name">emailRecipientsCount</xsl:attribute>
  973. <out:value-of select="$recipientCount"/>
  974. </xsl:element>
  975. <xsl:element name="param">
  976. <xsl:attribute name="name">hasRecipients</xsl:attribute>
  977. <out:value-of select="$hasRecipients"/>
  978. </xsl:element>
  979. <xsl:element name="param">
  980. <xsl:attribute name="name">emailSummary</xsl:attribute>
  981. <out:value-of select="$emailSummary"/>
  982. </xsl:element>
  983. <xsl:element name="param">
  984. <xsl:attribute name="name">mobileDescription</xsl:attribute>
  985. <xsl:call-template name="dt:generateMobileRecipientSummary"/>
  986. </xsl:element>
  987. <xsl:element name="param">
  988. <xsl:attribute name="name">mobileRecipientsCount</xsl:attribute>
  989. <out:value-of select="$mobileRecipientsCount"/>
  990. </xsl:element>
  991. <xsl:element name="param">
  992. <xsl:attribute name="name">hasMobileRecipients</xsl:attribute>
  993. <out:value-of select="$hasMobileRecipients"/>
  994. </xsl:element>
  995. <xsl:element name="param">
  996. <xsl:attribute name="name">mobileSummary</xsl:attribute>
  997. <out:value-of select="$mobileSummary"/>
  998. </xsl:element>
  999. <xsl:element name="param">
  1000. <xsl:attribute name="name">printerSummary</xsl:attribute>
  1001. <out:value-of select="$printerSummary"/>
  1002. </xsl:element>
  1003. <xsl:element name="param">
  1004. <xsl:attribute name="name">saveAsPathText</xsl:attribute>
  1005. <xsl:call-template name="dt:saveAsSummary"/>
  1006. </xsl:element>
  1007. <xsl:element name="param">
  1008. <xsl:attribute name="name">formatSummary</xsl:attribute>
  1009. <out:value-of select="$formatSummary"/>
  1010. </xsl:element>
  1011. <xsl:element name="param">
  1012. <xsl:attribute name="name">burstSummary</xsl:attribute>
  1013. <out:value-of select="$burstSummary"/>
  1014. </xsl:element>
  1015. <xsl:element name="param">
  1016. <xsl:attribute name="name">a11ySummary</xsl:attribute>
  1017. <out:value-of select="$a11ySummary"/>
  1018. </xsl:element>
  1019. <xsl:element name="param">
  1020. <xsl:attribute name="name">saveToFileSystemSummary</xsl:attribute>
  1021. <xts:string id="IDS_OTHERRUN_SAVE_FILE_SYSTEM"/>
  1022. <xsl:text> (</xsl:text>
  1023. <out:value-of select="$archiveOptionSummary"/>
  1024. <xsl:text>)</xsl:text>
  1025. </xsl:element>
  1026. </out:otherwise>
  1027. </out:choose>
  1028. </xts:append>
  1029. <out:if test="$steps and ($currentReply &lt; count($steps))">
  1030. <out:call-template name="dt:generateUIHelpersFromOptions">
  1031. <out:with-param name="deliveryReplyPosition" select="$deliveryReplyPosition + $queriedEmail + $queriedSaveAs + $queriedPrinter"/>
  1032. <out:with-param name="queryReplyPath" select="$queryReplyPath"/>
  1033. <out:with-param name="saveAsPath" select="$saveAsPath"/>
  1034. <out:with-param name="deliveryInfo" select="$deliveryInfo"/>
  1035. <out:with-param name="appendPath" select="$appendPath"/>
  1036. <out:with-param name="currentReply" select="$currentReply + 1"/>
  1037. <out:with-param name="steps" select="$steps"/>
  1038. <out:with-param name="genParams" select="$genParams"/>
  1039. </out:call-template>
  1040. </out:if>
  1041. </out:template>
  1042. </xsl:template>
  1043. <xsl:template name="dt:saveAsSummary">
  1044. <out:if test="not($queryReplyPath[position()=$currentReply]/*[local-name()='objectClass'] = 'jobDefinition')">
  1045. <out:choose>
  1046. <out:when test="$queriedSaveAs = '1'">
  1047. <out:if test="$deliveryInfo != ''">
  1048. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  1049. <out:variable name="path" select="$optionItems[./*[local-name()='name']='saveAs']/*[local-name()='parentSearchPath']"/>
  1050. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  1051. <out:variable name="rootPath">
  1052. <out:choose>
  1053. <out:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))"><out:value-of select="'~/folder'"/></out:when>
  1054. <out:otherwise><out:value-of select="$defaultContentRoot"/></out:otherwise>
  1055. </out:choose>
  1056. </out:variable>
  1057. <cf:do-the-path-link>
  1058. <cf:param name="familytree">$deliveryInfo/*[local-name()='queryReply' and position() = ($deliveryReplyPosition + $queriedEmail + $queriedPrinter)]/*/*[local-name()='ancestors']</cf:param>
  1059. <cf:param name="familymember">$deliveryInfo/*[local-name()='queryReply' and position() = ($deliveryReplyPosition + $queriedEmail + $queriedPrinter)]/*/*[local-name()='defaultName']</cf:param>
  1060. <cf:param name="home"><out:value-of select="$rootPath"/></cf:param>
  1061. </cf:do-the-path-link>
  1062. </out:if>
  1063. </out:when>
  1064. <!-- dealing with step objects and we don't have a saveAs options, so use the defaults for the summary -->
  1065. <out:when test="$queryReplyPath[position()=$currentReply]/*[local-name()='stepObject']">
  1066. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  1067. <out:variable name="path" select="$queryReplyPath[position()=$currentReply]/*[local-name()='stepObject']/*/*[local-name()='searchPath']"/>
  1068. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  1069. <out:variable name="rootPath">
  1070. <out:choose>
  1071. <out:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))"><out:value-of select="'~/folder'"/></out:when>
  1072. <out:otherwise><out:value-of select="$defaultContentRoot"/></out:otherwise>
  1073. </out:choose>
  1074. </out:variable>
  1075. <cf:do-the-path-link>
  1076. <cf:param name="familytree">$queryReplyPath[position()=$currentReply]/*[local-name()='stepObject']/*/*[local-name()='ancestors']</cf:param>
  1077. <cf:param name="familymember">$queryReplyPath[position()=$currentReply]/*[local-name()='stepObject']/*/*[local-name()='defaultName']</cf:param>
  1078. <cf:param name="home"><out:value-of select="$defaultContentRoot"/></cf:param>
  1079. <cf:param name="onlyAncestors">true</cf:param>
  1080. </cf:do-the-path-link>
  1081. </out:when>
  1082. <!-- don't have a saveAs options, so use the defaults for the summary -->
  1083. <out:when test="$saveAsPath != ''">
  1084. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  1085. <out:variable name="path" select="$saveAsPath/*[local-name()='searchPath']"/>
  1086. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  1087. <out:variable name="rootPath">
  1088. <out:choose>
  1089. <out:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))"><out:value-of select="'~/folder'"/></out:when>
  1090. <out:otherwise><out:value-of select="$defaultContentRoot"/></out:otherwise>
  1091. </out:choose>
  1092. </out:variable>
  1093. <cf:do-the-path-link>
  1094. <cf:param name="familytree">$saveAsPath/*[local-name()='ancestors']</cf:param>
  1095. <cf:param name="familymember">$saveAsPath/*[local-name()='defaultName']</cf:param>
  1096. <cf:param name="home"><out:value-of select="$defaultContentRoot"/></cf:param>
  1097. <cf:param name="onlyAncestors">true</cf:param>
  1098. </cf:do-the-path-link>
  1099. </out:when>
  1100. </out:choose>
  1101. </out:if>
  1102. </xsl:template>
  1103. <xsl:template name="dt:generateEmailRecipientSummary">
  1104. <out:choose>
  1105. <!-- recipient count of 0 -->
  1106. <out:when test="$recipientCount='0'">
  1107. <xts:string id ="IDS_OTHERRUN_EMAIL_NO_RECIPIENTS"/>
  1108. </out:when>
  1109. <!-- more then 1 recipient -->
  1110. <out:when test="$recipientCount &gt; 1">
  1111. <xts:string id="IDS_OTHERRUN_EMAIL_RECIPIENT_COUNT">
  1112. <xts:param name="numPeople">
  1113. <out:value-of select="$recipientCount"/>
  1114. </xts:param>
  1115. </xts:string>
  1116. </out:when>
  1117. <!-- only one recipient -->
  1118. <out:otherwise>
  1119. <out:choose>
  1120. <!-- if the recipient email was typed in -->
  1121. <out:when test="$typedRecipientsCount = '1'">
  1122. <out:value-of select="$typedRecipients"/>
  1123. </out:when>
  1124. <out:otherwise>
  1125. <xts:transform src="transforms/portal/emailOptions/generateRecipientsSummary.xslt" processor="XSLT">
  1126. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  1127. <xts:param name="messageBase">/messages/portalRL.xml</xts:param>
  1128. <root>
  1129. <queryResponse>
  1130. <out:if test="$deliveryInfo!=''">
  1131. <out:copy-of select="$deliveryInfo/*[local-name()='queryReply' and position() = $deliveryReplyPosition]"/>
  1132. </out:if>
  1133. </queryResponse>
  1134. <asParam>false</asParam>
  1135. </root>
  1136. </xts:transform>
  1137. </out:otherwise>
  1138. </out:choose>
  1139. </out:otherwise>
  1140. </out:choose>
  1141. </xsl:template>
  1142. <xsl:template name="dt:generateMobileRecipientSummary">
  1143. <out:choose>
  1144. <!-- recipient count of 0 -->
  1145. <out:when test="$mobileRecipientsCount='0'">
  1146. <xts:string id ="IDS_OTHERRUN_MOBILE_NO_RECIPIENTS"/>
  1147. </out:when>
  1148. <!-- more then 1 recipient -->
  1149. <out:when test="$mobileRecipientsCount &gt; 0">
  1150. <xts:string id="IDS_OTHERRUN_MOBILE_RECIPIENT_COUNT">
  1151. <xts:param name="numPeople">
  1152. <out:value-of select="$mobileRecipientsCount"/>
  1153. </xts:param>
  1154. </xts:string>
  1155. </out:when>
  1156. </out:choose>
  1157. </xsl:template>
  1158. <!--
  1159. dt:generateEmailSummary generates the appropriate email summary
  1160. -->
  1161. <xsl:template name="dt:generateEmailSummary" match="dt:generateEmailSummary">
  1162. <xsl:param name="jobDefinition" select="false()"/>
  1163. <xsl:param name="emailAsAttachment" select="false()"/>
  1164. <xsl:param name="emailAsURL" select="false()"/>
  1165. <out:variable name="genEmailSum_jobDefinition">
  1166. <xsl:choose>
  1167. <xsl:when test="@jobDefinition"><out:value-of select="{@jobDefinition}"/></xsl:when>
  1168. <xsl:otherwise><out:value-of select="{$jobDefinition}"/></xsl:otherwise>
  1169. </xsl:choose>
  1170. </out:variable>
  1171. <out:variable name="genEmailSum_emailAsAttachment">
  1172. <xsl:choose>
  1173. <xsl:when test="@emailAsAttachment"><out:value-of select="{@emailAsAttachment}"/></xsl:when>
  1174. <xsl:otherwise><out:value-of select="{$emailAsAttachment}"/></xsl:otherwise>
  1175. </xsl:choose>
  1176. </out:variable>
  1177. <out:variable name="genEmailSum_emailAsURL">
  1178. <xsl:choose>
  1179. <xsl:when test="@emailAsURL"><out:value-of select="{@emailAsURL}"/></xsl:when>
  1180. <xsl:otherwise><out:value-of select="{$emailAsURL}"/></xsl:otherwise>
  1181. </xsl:choose>
  1182. </out:variable>
  1183. <out:choose>
  1184. <out:when test="$genEmailSum_jobDefinition = 'true' or (key('env-param','genJobDefinitionSummary') ='true')">
  1185. <out:choose>
  1186. <out:when test="$genEmailSum_emailAsAttachment = 'false' and $genEmailSum_emailAsURL = 'false'">
  1187. <xts:string id="IDS_OTHERRUN_DELIVERY_NOTIFY_MULTIPLE_REPORTS"/>
  1188. </out:when>
  1189. <out:when test="$genEmailSum_emailAsAttachment = 'true' and $genEmailSum_emailAsURL = 'false'">
  1190. <xts:string id="IDS_OTHERRUN_DELIVERY_REPORTS"/>
  1191. </out:when>
  1192. <out:when test="$genEmailSum_emailAsAttachment = 'false' and $genEmailSum_emailAsURL = 'true'">
  1193. <xts:string id="IDS_OTHERRUN_DELIVERY_URLS"/>
  1194. </out:when>
  1195. <out:otherwise>
  1196. <xts:string id="IDS_OTHERRUN_DELIVERY_BOTH_MULTIPLE_REPORTS"/>
  1197. </out:otherwise>
  1198. </out:choose>
  1199. </out:when>
  1200. <out:otherwise>
  1201. <out:choose>
  1202. <out:when test="$genEmailSum_emailAsAttachment ='false' and $genEmailSum_emailAsURL = 'false'">
  1203. <xts:string id="IDS_OTHERRUN_DELIVERY_NOTIFY"/>
  1204. </out:when>
  1205. <out:when test="$genEmailSum_emailAsAttachment = 'true' and $genEmailSum_emailAsURL ='false'">
  1206. <xts:string id="IDS_OTHERRUN_DELIVERY_REPORT"/>
  1207. </out:when>
  1208. <out:when test="$genEmailSum_emailAsAttachment = 'false' and $genEmailSum_emailAsURL = 'true'">
  1209. <xts:string id="IDS_OTHERRUN_DELIVERY_URL"/>
  1210. </out:when>
  1211. <out:otherwise>
  1212. <xts:string id="IDS_OTHERRUN_DELIVERY_BOTH"/>
  1213. </out:otherwise>
  1214. </out:choose>
  1215. </out:otherwise>
  1216. </out:choose>
  1217. </xsl:template>
  1218. <!--
  1219. dt:generateMobileSummary - generates the appropriate mobile summary
  1220. -->
  1221. <xsl:template name="dt:generateMobileSummary" match="dt:generateMobileSummary">
  1222. <xsl:param name="jobDefinition" select="false()"/>
  1223. <out:variable name="genMobileSum_jobDefinition">
  1224. <xsl:choose>
  1225. <xsl:when test="@jobDefinition"><out:value-of select="{@jobDefinition}"/></xsl:when>
  1226. <xsl:otherwise><out:value-of select="{$jobDefinition}"/></xsl:otherwise>
  1227. </xsl:choose>
  1228. </out:variable>
  1229. <out:choose>
  1230. <out:when test="$genMobileSum_jobDefinition = 'true' or (key('env-param','genJobDefinitionSummary') ='true')">
  1231. <xts:string id="IDS_OTHERRUN_DELIVERY_MOBILE_REPORTS"/>
  1232. </out:when>
  1233. <out:otherwise>
  1234. <xts:string id="IDS_OTHERRUN_DELIVERY_MOBILE_REPORT"/>
  1235. </out:otherwise>
  1236. </out:choose>
  1237. </xsl:template>
  1238. <xsl:template name="dt:buildBurstSummary">
  1239. <xsl:param name="burstDistribution" />
  1240. <xsl:param name="burstQueryPrefetch" />
  1241. <xsl:param name="burstKeyLimit" />
  1242. <out:choose>
  1243. <out:when test="string({$burstDistribution}) = 'enabled'">
  1244. <xts:string id="IDS_OTHERRUN_BURST_DISTRIBUTED_ENABLED"/>
  1245. </out:when>
  1246. <out:when test="string({$burstDistribution}) = 'disabled'">
  1247. <xts:string id="IDS_OTHERRUN_BURST_DISTRIBUTED_DISABLED"/>
  1248. </out:when>
  1249. <out:otherwise>
  1250. <xts:string id="IDS_OTHERRUN_BURST_DISTRIBUTED_DEFAULT"/>
  1251. </out:otherwise>
  1252. </out:choose>
  1253. <xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/>
  1254. <out:choose>
  1255. <out:when test="string({$burstQueryPrefetch}) = 'enabled'">
  1256. <xts:string id="IDS_OTHERRUN_BURST_QUERY_PREFETCH_ENABLED"/>
  1257. </out:when>
  1258. <out:when test="string({$burstQueryPrefetch}) = 'disabled'">
  1259. <xts:string id="IDS_OTHERRUN_BURST_QUERY_PREFETCH_DISABLED"/>
  1260. </out:when>
  1261. <out:otherwise>
  1262. <xts:string id="IDS_OTHERRUN_BURST_QUERY_PREFETCH_DEFAULT"/>
  1263. </out:otherwise>
  1264. </out:choose>
  1265. <xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/>
  1266. <out:choose>
  1267. <out:when test="string({$burstKeyLimit}) = ''">
  1268. <xts:string id="IDS_OTHERRUN_BURST_QUERY_MAX_KEYS_DEFAULT"/>
  1269. </out:when>
  1270. <out:when test="string({$burstKeyLimit}) = '0'">
  1271. <xts:string id="IDS_OTHERRUN_BURST_QUERY_MAX_KEYS_UNLIMITED"/>
  1272. </out:when>
  1273. <out:otherwise>
  1274. <xts:string id="IDS_OTHERRUN_BURST_QUERY_MAX_KEYS_VALUE">
  1275. <xts:param name="numKeys"><out:value-of select="{$burstKeyLimit}"/></xts:param>
  1276. </xts:string>
  1277. </out:otherwise>
  1278. </out:choose>
  1279. </xsl:template>
  1280. <!--
  1281. dt:buildUIHelper
  1282. -->
  1283. <xsl:template name="dt:buildUIHelper" match="dt:buildUIHelper">
  1284. <xsl:param name="default" select="'false()'"/>
  1285. <xsl:param name="jobDefinition" select="'false()'"/>
  1286. <xsl:param name="parameters" select="'false()'"/>
  1287. <xsl:element name="UIHelpers">
  1288. <!-- keep track of the summaries -->
  1289. <xsl:element name="emailSummary">
  1290. <out:choose>
  1291. <out:when test="{$default} or key('env-param','emailSummary')='' or not(key('env-param','m_ro_email') = 'true')"><xts:string id="IDS_OTHERRUN_DELIVERY_NOTIFY"/></out:when>
  1292. <out:otherwise><out:value-of select="key('env-param','emailSummary')"/></out:otherwise>
  1293. </out:choose>
  1294. </xsl:element>
  1295. <xsl:element name="emailRecipients">
  1296. <out:choose>
  1297. <out:when test="{$default} or key('env-param','emailDescription')='' or not(key('env-param','m_ro_email') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited')))"><xts:string id="IDS_OTHERRUN_EMAIL_NO_RECIPIENTS"/></out:when>
  1298. <out:otherwise><out:value-of select="key('env-param','emailDescription')"/></out:otherwise>
  1299. </out:choose>
  1300. </xsl:element>
  1301. <out:if test="not({$default} or key('env-param','emailRecipientsCount')='' or not(key('env-param','m_ro_email') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited'))))">
  1302. <xsl:element name="emailRecipientsCount">
  1303. <out:value-of select="key('env-param','emailRecipientsCount')"/>
  1304. </xsl:element>
  1305. </out:if>
  1306. <xsl:element name="hasRecipients">
  1307. <out:choose>
  1308. <out:when test="{$default} or key('env-param','hasRecipients')='' or not(key('env-param','hasRecipients') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited')))">false</out:when>
  1309. <out:otherwise>true</out:otherwise>
  1310. </out:choose>
  1311. </xsl:element>
  1312. <xsl:element name="mobileSummary">
  1313. <out:choose>
  1314. <out:when test="{$default} or key('env-param','mobileSummary')='' or not(key('env-param','m_ro_mobile') = 'true')"><xts:string id="IDS_OTHERRUN_DELIVERY_NOTIFY"/></out:when>
  1315. <out:otherwise><out:value-of select="key('env-param','mobileSummary')"/></out:otherwise>
  1316. </out:choose>
  1317. </xsl:element>
  1318. <xsl:element name="mobileRecipients">
  1319. <out:choose>
  1320. <out:when test="{$default} or key('env-param','mobileDescription')='' or not(key('env-param','m_ro_mobile') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited')))"><xts:string id="IDS_OTHERRUN_MOBILE_NO_RECIPIENTS"/></out:when>
  1321. <out:otherwise><out:value-of select="key('env-param','mobileDescription')"/></out:otherwise>
  1322. </out:choose>
  1323. </xsl:element>
  1324. <out:if test="not({$default} or key('env-param','mobileRecipientsCount')='' or not(key('env-param','m_ro_mobile') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited'))))">
  1325. <xsl:element name="mobileRecipientsCount">
  1326. <out:value-of select="key('env-param','mobileRecipientsCount')"/>
  1327. </xsl:element>
  1328. </out:if>
  1329. <xsl:element name="hasMobileRecipients">
  1330. <out:choose>
  1331. <out:when test="{$default} or key('env-param','hasMobileRecipients')='' or not(key('env-param','hasMobileRecipients') = 'true') or (key('env-param','m_ro_burst')='true' and not(key('env-param','run_options_visited')))">false</out:when>
  1332. <out:otherwise>true</out:otherwise>
  1333. </out:choose>
  1334. </xsl:element>
  1335. <xsl:element name="printerSummary">
  1336. <out:if test="not({$default}) and key('env-param','select_printerAddress')!='' and key('env-param','m_ro_print') = 'true'">
  1337. <out:value-of select="key('env-param','select_printerAddress')"/>
  1338. </out:if>
  1339. </xsl:element>
  1340. <xsl:element name="formatSummary">
  1341. <out:if test="not({$default})">
  1342. <!-- get the PDF option summary -->
  1343. <out:variable name="PDFOptionSummary">
  1344. <xsl:call-template name="dt:buildPDFOptionSummary"/>
  1345. </out:variable>
  1346. <xsl:call-template name="dt:buildFormatSummary">
  1347. <xsl:with-param name="PDFSummary" select="'$PDFOptionSummary'"/>
  1348. </xsl:call-template>
  1349. </out:if>
  1350. </xsl:element>
  1351. <xsl:element name="a11ySummary">
  1352. <out:if test="key('env-param', 'm_go_accessibilityFeatures') = 'true'">
  1353. <xts:string id="IDS_PROP_RUN_A11Y_SUPPORT"/>
  1354. </out:if>
  1355. </xsl:element>
  1356. <out:if test="not({$jobDefinition})">
  1357. <xsl:element name="saveAsSummary">
  1358. <out:if test="key('env-param','save_how')='new_entry' and key('env-param','saveAsPathText')!=''">
  1359. <out:value-of select="key('env-param','saveAsPathText')"/>
  1360. </out:if>
  1361. </xsl:element>
  1362. </out:if>
  1363. <out:if test="{$parameters} and not({$default})">
  1364. <xsl:element name="parameterDescriptionToLong"><out:value-of select="key('env-param','parameterDescriptionToLong')"/></xsl:element>
  1365. <xsl:element name="parameterDescription"><out:value-of select="key('env-param','parameterDescription')"/></xsl:element>
  1366. </out:if>
  1367. <xsl:element name="saveToFileSystemSummary">
  1368. <out:if test="key('env-param','m_ro_archive') = 'true'">
  1369. <xts:string id="IDS_OTHERRUN_SAVE_FILE_SYSTEM"/>
  1370. <xsl:text> (</xsl:text>
  1371. <xsl:call-template name="dt:buildArchiveOptionSummary"/>
  1372. <xsl:text>)</xsl:text>
  1373. </out:if>
  1374. </xsl:element>
  1375. </xsl:element>
  1376. </xsl:template>
  1377. <!--
  1378. Build the archive option summar (name, location, conflixt resolution)
  1379. -->
  1380. <xsl:template name="dt:buildArchiveOptionSummary" match="dt:buildArchiveOptionSummary">
  1381. <xsl:param name="name" select="'key(&quot;env-param&quot;,&quot;m_arc_filenameStub&quot;)'"/>
  1382. <xsl:param name="location" select="'key(&quot;env-param&quot;,&quot;m_arc_archiveLocation&quot;)'"/>
  1383. <xsl:param name="conflict" select="'key(&quot;env-param&quot;,&quot;m_arc_conflictResolution&quot;)'"/>
  1384. <!-- if the location is empty, then don't display a summary -->
  1385. <out:if test="string({$location}) != ''">
  1386. <out:variable name="fileName">
  1387. <out:choose>
  1388. <out:when test="string({$name}) != ''"><out:value-of select="{$name}"/></out:when>
  1389. <out:otherwise><xts:string id="IDS_ARC_DEFAULT_NAME_SUMMARY"/></out:otherwise>
  1390. </out:choose>
  1391. </out:variable>
  1392. <xts:string id="IDS_ARC_NAME_SUMMARY">
  1393. <xts:param name="name"><out:value-of select="$fileName"/></xts:param>
  1394. </xts:string>
  1395. <xsl:text>&#160;</xsl:text>
  1396. <!-- location -->
  1397. <out:variable name="locationName">
  1398. <out:choose>
  1399. <out:when test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='archiveLocation']/*[local-name()='searchPath' and . = string({$location})]">
  1400. <out:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='archiveLocation' and ./*[local-name()='searchPath' and . = string({$location})]]/*[local-name()='defaultName']"/>
  1401. </out:when>
  1402. <out:otherwise><xts:string id="IDS_ARC_LOCATION_UNAVAILABLE_SUMMARY"/></out:otherwise>
  1403. </out:choose>
  1404. </out:variable>
  1405. <xts:string id="IDS_ARC_LOCATION_SUMMARY">
  1406. <xts:param name="location"><out:value-of select="$locationName"/></xts:param>
  1407. </xts:string>
  1408. <!-- conflict resolution -->
  1409. <xsl:text>&#160;</xsl:text>
  1410. <out:choose>
  1411. <out:when test="{$conflict} = 'appendDateTime'">
  1412. <xts:string id="IDS_ARC_APPEND_TIMESTAMP"/>
  1413. </out:when>
  1414. <out:when test="{$conflict} = 'appendSequenceNumber'">
  1415. <xts:string id="IDS_ARC_APPEND_SEQUENCE_NUMBER"/>
  1416. </out:when>
  1417. <out:when test="{$conflict} = 'fail'">
  1418. <xts:string id="IDS_ARC_KEEP_EXISTING_FILES"/>
  1419. </out:when>
  1420. <out:otherwise>
  1421. <xts:string id="IDS_ARC_REPLACE_EXISTING_FILES"/>
  1422. </out:otherwise>
  1423. </out:choose>
  1424. </out:if>
  1425. </xsl:template>
  1426. <!--
  1427. Build the PDF summary (orientation, paperSize, userPassword, ownerPassword)
  1428. Note: requires the pageDefinition from CM to be in the DOM under /root/cm:queryResponse/cm:queryReply/cm:pageDefinition
  1429. -->
  1430. <xsl:template name="dt:buildPDFOptionSummary" match="dt:buildPDFOptionSummary">
  1431. <xsl:param name="orientation" select="'key(&quot;env-param&quot;,&quot;m_ro_outputPageOrientation&quot;)'"/>
  1432. <xsl:param name="paperSize" select="'key(&quot;env-param&quot;,&quot;m_ro_outputPageDefinition&quot;)'"/>
  1433. <xsl:param name="userPassword" select="'key(&quot;env-param&quot;,&quot;m_pdf_userPassword_runOption&quot;)'"/>
  1434. <xsl:param name="userPasswordEncrypted" select="'key(&quot;env-param&quot;,&quot;m_pdf_userPassword_runOption_Encrypted&quot;)'"/>
  1435. <xsl:param name="preserveUserPasswordField" select="'key(&quot;env-param&quot;,&quot;preserve_pdf_userPwd&quot;)'"/>
  1436. <xsl:param name="ownerPassword" select="'key(&quot;env-param&quot;,&quot;m_pdf_ownerPassword_runOption&quot;)'"/>
  1437. <xsl:param name="ownerPasswordEncrypted" select="'key(&quot;env-param&quot;,&quot;m_pdf_ownerPassword_runOption_Encrypted&quot;)'"/>
  1438. <xsl:param name="preserveOwnerPasswordField" select="'key(&quot;env-param&quot;,&quot;preserve_pdf_ownerPwd&quot;)'"/>
  1439. <out:variable name="separator"><xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/></out:variable>
  1440. <out:variable name="pdfSummary">
  1441. <out:choose>
  1442. <out:when test="{$orientation} = 'portrait'">
  1443. <xts:string id="IDS_OTHERRUN_PORTRAIT"/>
  1444. </out:when>
  1445. <out:when test="{$orientation} = 'landscape'">
  1446. <xts:string id="IDS_OTHERRUN_LANDSCAPE"/>
  1447. </out:when>
  1448. </out:choose>
  1449. <out:if test="{$paperSize} != 'default' and {$paperSize} != ''">
  1450. <out:value-of select="$separator"/>
  1451. <out:variable name="pageDefinitionPath" select="{$paperSize}"/>
  1452. <out:value-of select="/root/cm:queryResponse/cm:queryReply/cm:pageDefinition[cm:searchPath=$pageDefinitionPath]/cm:defaultName"/>
  1453. </out:if>
  1454. <out:if test="{$userPassword} != '' or {$userPasswordEncrypted} != '' or {$preserveUserPasswordField} = 'true'">
  1455. <out:value-of select="$separator"/>
  1456. <xts:string id="IDS_PDF_OPEN_PASSWORD_SUMMARY"/>
  1457. </out:if>
  1458. <out:if test="{$ownerPassword} != '' or {$ownerPasswordEncrypted} != '' or {$preserveOwnerPasswordField} = 'true'">
  1459. <out:value-of select="$separator"/>
  1460. <xts:string id="IDS_PDF_OPTION_PASSWORD_SUMMARY"/>
  1461. </out:if>
  1462. </out:variable>
  1463. <!-- Catch the scenario where our string starts with a ',' -->
  1464. <out:choose>
  1465. <out:when test="starts-with($pdfSummary, $separator)">
  1466. <out:value-of select="substring-after($pdfSummary, $separator)"/>
  1467. </out:when>
  1468. <out:otherwise><out:value-of select="$pdfSummary"/></out:otherwise>
  1469. </out:choose>
  1470. </xsl:template>
  1471. <!--
  1472. outputFormatSummary
  1473. Logic needed to build the format summary
  1474. -->
  1475. <xsl:template match="dt:buildFormatSummary" name="dt:buildFormatSummary">
  1476. <xsl:param name="formats" select="'/root/env/param[starts-with(@name,&quot;m_ro_outputFormat&quot;)]'"/>
  1477. <xsl:param name="PDFSummary" select="''"/>
  1478. <xsl:param name="htmlSelected" select="'(key(&quot;env-param&quot;,&quot;m_ro_outputF_HTML_Type&quot;) = &quot;true&quot; or not(key(&quot;env-param&quot;,&quot;changed_m_ro_outputF_HTML_Type&quot;)))'"/>
  1479. <xsl:param name="XLSSelected" select="'(key(&quot;env-param&quot;,&quot;m_ro_outputF_XLS2000_Type&quot;) = &quot;true&quot; or not(key(&quot;env-param&quot;,&quot;changed_m_ro_outputF_XLS2000_Type&quot;)))'"/>
  1480. <xsl:param name="enableSelection" select="'key(&quot;env-param&quot;,&quot;m_ro_selectionBasedFeatures&quot;) = &quot;true&quot;'"/>
  1481. <xsl:param name="verticalElements" select="'key(&quot;env-param&quot;,&quot;m_ro_verticalElements&quot;)'"/>
  1482. <!-- do not process the node if value is HTML but HTML checkbox is not checked or if the value is XLS but the XLS checbox is not checked -->
  1483. <out:for-each select="set:distinct({$formats}[not((contains(' HTML HTMLFragment XHTML ', concat(' ',.,' ')) and not({$htmlSelected})) or (contains(' XLS singleXLS ', concat(' ',.,' ')) and not({$XLSSelected}))) ])" xmlns:set="http://exslt.org/sets">
  1484. <out:sort select="."/>
  1485. <out:choose>
  1486. <out:when test="{$htmlSelected} and . = 'HTML'">
  1487. <xts:string id="IDS_OTHERRUN_FORMAT_HTML"/>
  1488. <out:if test="{$enableSelection}='true' or {$verticalElements}!=''">
  1489. <xsl:text> (</xsl:text>
  1490. <out:if test="{$verticalElements}!=''">
  1491. <xts:string id="IDS_OTHERRUN_NUMBER_OF_ROWS_HTML_SUMMARY"><xts:param name="rows_number"><out:value-of select="{$verticalElements}"/></xts:param></xts:string>
  1492. </out:if>
  1493. <out:if test="{$enableSelection}='true'">
  1494. <out:if test="{$verticalElements}!=''">
  1495. <xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/>
  1496. </out:if>
  1497. <xts:string id="IDS_OTHERRUN_ENABLE_INTERACTIVITY"/>
  1498. </out:if>
  1499. <xsl:text>)</xsl:text>
  1500. </out:if>
  1501. </out:when>
  1502. <out:when test="{$htmlSelected} and . = 'HTMLFragment'">
  1503. <xts:string id="IDS_OTHERRUN_FORMAT_HTMLFRAGMENT"/>
  1504. <out:if test="{$verticalElements}!=''">
  1505. <xsl:text> (</xsl:text>
  1506. <xts:string id="IDS_OTHERRUN_NUMBER_OF_ROWS_HTML_SUMMARY"><xts:param name="rows_number"><out:value-of select="{$verticalElements}"/></xts:param></xts:string>
  1507. <xsl:text>)</xsl:text>
  1508. </out:if>
  1509. </out:when>
  1510. <out:when test="{$htmlSelected} and . = 'XHTML'">
  1511. <xts:string id="IDS_OTHERRUN_FORMAT_XHTML"/>
  1512. <out:if test="{$verticalElements}!=''">
  1513. <xsl:text> (</xsl:text>
  1514. <xts:string id="IDS_OTHERRUN_NUMBER_OF_ROWS_HTML_SUMMARY"><xts:param name="rows_number"><out:value-of select="{$verticalElements}"/></xts:param></xts:string>
  1515. <xsl:text>)</xsl:text>
  1516. </out:if>
  1517. </out:when>
  1518. <out:when test=". = 'XML'">
  1519. <xts:string id="IDS_OTHERRUN_FORMAT_XML"/>
  1520. </out:when>
  1521. <out:when test="{$XLSSelected} and . = 'XLS' and $browser != 'safari'">
  1522. <xts:string id="IDS_OTHERRUN_FORMAT_XLS"/>
  1523. </out:when>
  1524. <out:when test="{$XLSSelected} and . = 'singleXLS' and $browser != 'safari'">
  1525. <xts:string id="IDS_OTHERRUN_FORMAT_SINGLE_XLS"/>
  1526. </out:when>
  1527. <out:when test=". = 'XLWA' and $browser != 'safari'">
  1528. <xts:string id="IDS_OTHERRUN_FORMAT_XLS_2002"/>
  1529. </out:when>
  1530. <out:when test=". = 'CSV'">
  1531. <xts:string id="IDS_OTHERRUN_FORMAT_CSV"/>
  1532. </out:when>
  1533. <out:when test=". = 'spreadsheetML'">
  1534. <xts:string id="IDS_OTHERRUN_FORMAT_XLS_2007"/>
  1535. </out:when>
  1536. <out:when test=". = 'xlsxData'">
  1537. <xts:string id="IDS_PROP_FORMAT_XLS_2007_DATA"/>
  1538. </out:when>
  1539. <out:when test=". = 'spreadsheetMLOfficeConnectionEnabled'">
  1540. <xts:string id="IDS_OTHERRUN_FORMAT_XLS_2007_OFFICE_ENABLED"/>
  1541. </out:when>
  1542. <out:when test=". = 'PDF'">
  1543. <xsl:choose>
  1544. <xsl:when test="@PDFSummary != ''">
  1545. <out:choose>
  1546. <out:when test="string({@PDFSummary}) != ''">
  1547. <xts:string id="IDS_OTHERRUN_FORMAT_PDF_WITH_ONE_OPTIONS">
  1548. <xts:param name="option"><out:value-of select="{@PDFSummary}"/></xts:param>
  1549. </xts:string>
  1550. </out:when>
  1551. <out:otherwise><xts:string id="IDS_PROP_FORMAT_PDF"/></out:otherwise>
  1552. </out:choose>
  1553. </xsl:when>
  1554. <xsl:when test="string($PDFSummary) = ''"><xts:string id="IDS_PROP_FORMAT_PDF"/></xsl:when>
  1555. <xsl:otherwise>
  1556. <out:choose>
  1557. <out:when test="string({$PDFSummary}) = ''"><xts:string id="IDS_PROP_FORMAT_PDF"/></out:when>
  1558. <out:otherwise>
  1559. <xts:string id="IDS_OTHERRUN_FORMAT_PDF_WITH_ONE_OPTIONS">
  1560. <xts:param name="option"><out:value-of select="{$PDFSummary}"/></xts:param>
  1561. </xts:string>
  1562. </out:otherwise>
  1563. </out:choose>
  1564. </xsl:otherwise>
  1565. </xsl:choose>
  1566. </out:when>
  1567. </out:choose>
  1568. <out:if test="position() != last()"><xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/></out:if>
  1569. </out:for-each>
  1570. </xsl:template>
  1571. <!--
  1572. ===============================================================================================
  1573. Execute the operation: delete, additems_
  1574. ===============================================================================================
  1575. -->
  1576. <xsl:template match="dt:jobExecuteCommand">
  1577. <out:variable name="query-values" select="/root/env/param"/>
  1578. <out:variable name="op" select="$query-values[@name = 'listop']"/>
  1579. <out:variable name="object-class" select="/root/morphlet/variable[@name = 'object-class']"/>
  1580. <out:template match="/">
  1581. <out:choose>
  1582. <!-- clear the options on one of the steps -->
  1583. <out:when test="$op = 'clear_step_options' and /root/env/param[@name = 'clear_step'] != ''">
  1584. <xts:sequence>
  1585. <out:variable name="current-step" select="/root/env/param[@name='clear_step']"/>
  1586. <xts:delete>
  1587. <xsl:attribute name="select">
  1588. <xsl:text>/root/steps/*/*[./*[local-name() = 'displaySequence' and string()='{$current-step}']]/*[local-name()='parameters' or local-name()='options' or local-name()='UIHelpers']</xsl:text>
  1589. </xsl:attribute>
  1590. </xts:delete>
  1591. <out:if test="count(/root/steps/*/*[./*[local-name() = 'displaySequence' and string()=$current-step]]/*[local-name()='added']) = 0 and count(/root/steps/*/*[./*[local-name() = 'displaySequence' and string()=$current-step]]/*[local-name()='updated']) = 0">
  1592. <xts:append>
  1593. <xsl:attribute name="select">
  1594. <xsl:text>/root/steps/*/*[./*[local-name() = 'displaySequence' and string()='{$current-step}']]</xsl:text>
  1595. </xsl:attribute>
  1596. <x:updated/>
  1597. </xts:append>
  1598. </out:if>
  1599. <xts:append>
  1600. <xsl:attribute name="select">
  1601. <xsl:text>/root/steps/*/*[./*[local-name() = 'displaySequence' and string()='{$current-step}']]</xsl:text>
  1602. </xsl:attribute>
  1603. <xsl:call-template name="dt:buildUIHelper">
  1604. <xsl:with-param name="default" select="'true()'"/>
  1605. </xsl:call-template>
  1606. </xts:append>
  1607. <xts:delete select="/root/env/param[@name='clear_step']"/>
  1608. <!-- delete the web64 blob for job steps. This will make sure that it get repopulated -->
  1609. <xts:delete select="/root/env/param[@name = 'jobSteps']"/>
  1610. </xts:sequence>
  1611. </out:when>
  1612. <!-- clear the options and promtps for all the selected steps -->
  1613. <out:when test="$op = 'resetToDefaults'">
  1614. <xts:sequence>
  1615. <!-- loop through selection params -->
  1616. <out:for-each select="$query-values[starts-with( @name, 'jobSteps_chk_' )]">
  1617. <out:variable name="current-guid" select="."/>
  1618. <!-- todo: delete any saved prompts -->
  1619. <xts:delete>
  1620. <xsl:attribute name="select">
  1621. <xsl:text>/root/steps/*/*[./*[local-name() = 'guid' and string()='{$current-guid}']]/*[local-name()='options' or local-name()='UIHelpers']</xsl:text>
  1622. </xsl:attribute>
  1623. </xts:delete>
  1624. <out:if test="count(/root/steps/*/*[./*[local-name() = 'guid' and string()=$current-guid]]/*[local-name()='added']) = 0 and count(/root/steps/*/*[./*[local-name() = 'guid' and string()=$current-guid]]/*[local-name()='updated']) = 0">
  1625. <xts:append>
  1626. <xsl:attribute name="select">
  1627. <xsl:text>/root/steps/*/*[./*[local-name() = 'guid' and string()='{$current-guid}']]</xsl:text>
  1628. </xsl:attribute>
  1629. <x:updated/>
  1630. </xts:append>
  1631. </out:if>
  1632. <xts:append>
  1633. <xsl:attribute name="select">
  1634. <xsl:text>/root/steps/*/*[./*[local-name() = 'guid' and string()='{$current-guid}']]</xsl:text>
  1635. </xsl:attribute>
  1636. <xsl:call-template name="dt:buildUIHelper">
  1637. <xsl:with-param name="default" select="'true()'"/>
  1638. </xsl:call-template>
  1639. </xts:append>
  1640. </out:for-each>
  1641. </xts:sequence>
  1642. </out:when>
  1643. <!-- clear the job options -->
  1644. <out:when test="$op = 'clear_job_options'">
  1645. <xts:sequence>
  1646. <xts:delete select="/root/*[local-name()='jobOptions']/*[local-name()='options' or local-name()='UIHelpers']"/>
  1647. <xts:append select="/root/*[local-name()='jobOptions']">
  1648. <xsl:call-template name="dt:buildUIHelper">
  1649. <xsl:with-param name="default" select="'true()'"/>
  1650. <xsl:with-param name="jobDefinition" select="'true()'"/>
  1651. </xsl:call-template>
  1652. <!-- default the job options. Make sure that the saveOutput runOption is true and that the prompt
  1653. runOption is set to false -->
  1654. <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
  1655. <root>
  1656. <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
  1657. <root>
  1658. <xts:transform name="XML" src="portal/options.xml"/>
  1659. <optionType>runOptions</optionType>
  1660. <optionType>powerPlay8Options</optionType>
  1661. <env>
  1662. <param name="m_ro_saveOutput">true</param>
  1663. <param name="save_how">report</param>
  1664. <param name="m_ro_prompt">false</param>
  1665. <param name="m_ro_selectionBasedFeatures">true</param>
  1666. </env>
  1667. <genDefaults>false</genDefaults>
  1668. </root>
  1669. </xts:transform>
  1670. </root>
  1671. </xts:transform>
  1672. </xts:append>
  1673. </xts:sequence>
  1674. </out:when>
  1675. <out:when test="$op = 'removeNilSteps'">
  1676. <xts:sequence>
  1677. <xts:append select="/root/*[local-name()='steps']/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition' and ./*[local-name()='stepObject']/@nil='true']">
  1678. <!-- append a deleted marker so node can be excluded with xpath -->
  1679. <xsl:element name="x:deleted" namespace="x"/>
  1680. </xts:append>
  1681. </xts:sequence>
  1682. </out:when>
  1683. <out:when test="$op = 'delete'">
  1684. <xts:sequence>
  1685. <!-- loop through selection params -->
  1686. <out:for-each select="$query-values[starts-with( @name, 'jobSteps_chk_' )]">
  1687. <!-- lookup item in list -->
  1688. <out:variable name="current-guid" select="."/>
  1689. <out:variable name="item" select="/root/steps/*/*[x:guid = $current-guid]"/>
  1690. <out:choose>
  1691. <!-- if the object was recently added (not saved in CM yet) then simply remove the entire step
  1692. from our XML blob -->
  1693. <out:when test="$item[x:added]">
  1694. <!-- delete the added object from the list -->
  1695. <xts:delete>
  1696. <xsl:attribute name="select">
  1697. <xsl:text>/root/steps/*/*[*[local-name() = 'guid' and string() = '{$current-guid}']]</xsl:text>
  1698. </xsl:attribute>
  1699. </xts:delete>
  1700. </out:when>
  1701. <!-- the step is currently saved in CM so we must add a deleted flag so when the user
  1702. hits OK the step gets deleted from CM -->
  1703. <out:otherwise>
  1704. <!-- if the user updated this step before deleting it, get rid of the update flag
  1705. since we end up trying to update the step after it got delete from CM -->
  1706. <out:if test="$item[x:updated]">
  1707. <xts:delete>
  1708. <xsl:attribute name="select">
  1709. <xsl:text>/root/steps/*[local-name()='queryResponse']/*[*[local-name() = 'guid' and string() = '{$current-guid}']]/*[local-name()='updated']</xsl:text>
  1710. </xsl:attribute>
  1711. </xts:delete>
  1712. </out:if>
  1713. <xts:append>
  1714. <xsl:attribute name="select">
  1715. <xsl:text>/root/steps/*/*[*[local-name() = 'guid' and string() = '{$current-guid}']]</xsl:text>
  1716. </xsl:attribute>
  1717. <!-- append a deleted marker so node can be excluded with xpath -->
  1718. <xsl:element name="x:deleted" namespace="x"/>
  1719. </xts:append>
  1720. </out:otherwise>
  1721. </out:choose>
  1722. </out:for-each>
  1723. <xts:delete select="/root/env/param[starts-with( @name, 'jobSteps_chk_' )]"/>
  1724. </xts:sequence>
  1725. </out:when>
  1726. <out:when test="$op = 'link_orphaned_step' and key('env-param','so.storeID') != ''">
  1727. <xts:sequence>
  1728. <out:variable name="current-step" select="/root/env/param[@name='current_step']"/>
  1729. <xts:delete>
  1730. <xsl:attribute name="select">
  1731. <xsl:text>/root/steps/*/*[./*[local-name() = 'guid' and string()='{$current-step}']]/*[local-name()='stepObject']</xsl:text>
  1732. </xsl:attribute>
  1733. </xts:delete>
  1734. <xts:append>
  1735. <xsl:attribute name="select">
  1736. <xsl:text>/root/steps/*/*[./*[local-name() = 'guid' and string()='{$current-step}']]</xsl:text>
  1737. </xsl:attribute>
  1738. <x:updated/>
  1739. <x:linkedOrphaned/>
  1740. <xts:transform src="transforms/portal/jobDefinition/gen_stepObject.xslt" processor="XSLT">
  1741. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  1742. <send:request provider="cm">
  1743. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  1744. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  1745. <cm:requests>
  1746. <cm:query>
  1747. <cm:search><out:value-of select="key('env-param','so.storeID')"/></cm:search>
  1748. <cm:properties>
  1749. <cml:prop-base/>
  1750. <cm:property name="ancestors"/>
  1751. <cm:property name="canBurst"/>
  1752. <cm:property name="runAsOwner"/>
  1753. <cm:property name="runWithOwnerCapabilities"/>
  1754. <cm:property name="permissions"/>
  1755. <cm:property name="parent"/>
  1756. <cm:property name="executionFormat"/>
  1757. <cm:property name="executionLocale"/>
  1758. <cm:property name="executionPageDefinition"/>
  1759. <cm:property name="executionPageOrientation"/>
  1760. </cm:properties>
  1761. </cm:query>
  1762. </cm:requests>
  1763. </cm:query>
  1764. </xts:transform>
  1765. </send:request>
  1766. </xts:transform>
  1767. </xts:transform>
  1768. </xts:append>
  1769. </xts:sequence>
  1770. </out:when>
  1771. <!-- adding new entries -->
  1772. <out:when test="/root/newEntries">
  1773. <out:variable name="added-items" select="/root/newEntries/*"/>
  1774. <out:variable name="steps" select="/root/steps/*/*"/>
  1775. <out:if test="count( $added-items ) > 0">
  1776. <out:variable name="appends">
  1777. <out:for-each select="$added-items">
  1778. <out:variable name="current-guid" select="x:guid"/>
  1779. <out:variable name="original" select="$steps[x:guid = $current-guid]"/>
  1780. <out:variable name="new-state">
  1781. <out:choose>
  1782. <out:when test="$original[x:deleted]">
  1783. <x:changed/>
  1784. </out:when>
  1785. <out:otherwise>
  1786. <x:added/>
  1787. </out:otherwise>
  1788. </out:choose>
  1789. </out:variable>
  1790. <out:if test="$original[x:deleted]">
  1791. <xts:delete>
  1792. <xsl:attribute name="select">
  1793. <xsl:text>/root/steps/*/*[*[local-name() = 'guid' and string() = '{$current-guid}']]</xsl:text>
  1794. </xsl:attribute>
  1795. </xts:delete>
  1796. </out:if>
  1797. <!-- copy item to list and append the added marker -->
  1798. <xts:append select="/root/steps/*">
  1799. <out:variable name="object-class" select="local-name()"/>
  1800. <out:element name="jobStepDefinition" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  1801. <out:element name="objectClass" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  1802. <out:value-of select="'jobStepDefinition'"/>
  1803. </out:element>
  1804. <out:element name="stepObject" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  1805. <out:element namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  1806. <xsl:attribute name="name">
  1807. <xsl:value-of select="'{$object-class}'"/>
  1808. </xsl:attribute>
  1809. <out:copy-of select="*[not((local-name() = 'guid') and (namespace-uri() = 'x'))]"/>
  1810. </out:element>
  1811. </out:element>
  1812. <out:element name="x:guid" namespace="x">
  1813. <out:choose>
  1814. <out:when test="$current-guid != ''">
  1815. <out:value-of select="$current-guid"/>
  1816. </out:when>
  1817. <out:otherwise>
  1818. <out:value-of select="xtsext:generateGUID()"/>
  1819. </out:otherwise>
  1820. </out:choose>
  1821. </out:element>
  1822. <out:copy-of select="$new-state"/>
  1823. <xsl:call-template name="dt:buildUIHelper">
  1824. <xsl:with-param name="default" select="'true()'"/>
  1825. </xsl:call-template>
  1826. <!-- special case for contentTask. We must find out if we're dealing with a
  1827. report upgrade or consistency scan -->
  1828. <out:if test="$object-class = 'contentTask' and *[local-name()='searchPath'] != ''">
  1829. <xts:transform src="transforms/portal/options/parseContentTaskOptions.xslt" processor="XSLT">
  1830. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  1831. <send:request provider="cm">
  1832. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  1833. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  1834. <cm:requests>
  1835. <cm:query>
  1836. <cm:search><out:value-of select="*[local-name()='searchPath']"/></cm:search>
  1837. <cm:properties>
  1838. <cm:property name="options"/>
  1839. </cm:properties>
  1840. </cm:query>
  1841. </cm:requests>
  1842. </cm:query>
  1843. </xts:transform>
  1844. </send:request>
  1845. </xts:transform>
  1846. </xts:transform>
  1847. </out:if>
  1848. </out:element>
  1849. </xts:append>
  1850. </out:for-each>
  1851. </out:variable>
  1852. <out:if test="$appends">
  1853. <xts:sequence>
  1854. <out:copy-of select="$appends"/>
  1855. </xts:sequence>
  1856. </out:if>
  1857. <xts:sequence>
  1858. <xts:replace select="/root/env/param[@name = 'listop']">
  1859. <param name="listop">save</param>
  1860. </xts:replace>
  1861. </xts:sequence>
  1862. </out:if>
  1863. </out:when>
  1864. </out:choose>
  1865. </out:template>
  1866. </xsl:template>
  1867. <!--
  1868. ===============================================================================================
  1869. Update the displaySequence property to reflect the order of the steps
  1870. ===============================================================================================
  1871. -->
  1872. <xsl:template match="dt:jobSetSequence">
  1873. <out:template match="/">
  1874. <xts:sequence>
  1875. <xts:replace select="/root/steps">
  1876. <xts:transform src="transforms/portal/jobDefinition/jobSetSequence.xslt" processor="XSLT">
  1877. <xts:queryNode select="/root/steps"/>
  1878. </xts:transform>
  1879. </xts:replace>
  1880. </xts:sequence>
  1881. </out:template>
  1882. </xsl:template>
  1883. <!--
  1884. ===============================================================================================
  1885. Serialize the data (web64 encoded)
  1886. ===============================================================================================
  1887. -->
  1888. <xsl:template match="dt:jobEncodeList">
  1889. <pf:serialize-xml/>
  1890. <out:variable name="wizard"><xsl:value-of select="@wizard"/></out:variable>
  1891. <out:template match="/">
  1892. <out:if test="not( /root/env/param[@name = 'jobSteps'] ) or not( /root/env/param[@name = 'listop'] = '' )">
  1893. <xts:sequence>
  1894. <xts:delete select="/root/env/param[@name = 'jobSteps']"/>
  1895. <out:if test="contains( /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, 'write' ) or $wizard='true'">
  1896. <out:variable name="markup">
  1897. <out:call-template name="serialize-xml">
  1898. <out:with-param name="node-set" select="/root/steps"/>
  1899. </out:call-template>
  1900. </out:variable>
  1901. <xts:append select="/root/env">
  1902. <param name="jobSteps">
  1903. <out:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode( string( $markup ), true()))"/>
  1904. </param>
  1905. </xts:append>
  1906. </out:if>
  1907. </xts:sequence>
  1908. </out:if>
  1909. <out:if test="not( /root/env/param[@name = 'jobOptions'] ) or not( /root/env/param[@name = 'listop'] = '' )">
  1910. <xts:sequence>
  1911. <xts:delete select="/root/env/param[@name = 'jobOptions']"/>
  1912. <out:if test="contains( /root/cm:queryResponse/cm:queryReply[2]/*/cm:permissions, 'write' ) or $wizard='true'">
  1913. <out:variable name="markup">
  1914. <out:call-template name="serialize-xml">
  1915. <out:with-param name="node-set" select="/root/jobOptions"/>
  1916. </out:call-template>
  1917. </out:variable>
  1918. <xts:append select="/root/env">
  1919. <param name="jobOptions">
  1920. <out:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode( string( $markup ), true()))"/>
  1921. </param>
  1922. </xts:append>
  1923. </out:if>
  1924. </xts:sequence>
  1925. </out:if>
  1926. </out:template>
  1927. </xsl:template>
  1928. <!--
  1929. dt:generateDefaultScheduleParams
  1930. Generated the default schedule params
  1931. -->
  1932. <xsl:template match="dt:generateScheduleParams">
  1933. <xts:sequence>
  1934. <xts:append select="/root/env">
  1935. <xts:transform src="transforms/portal/schedule/generateParams.xslt" processor="XSLT">
  1936. <schedule>
  1937. <timeZone><out:value-of select="$timeZone"/></timeZone>
  1938. <contentLocale><out:value-of select="$contentLocale"/></contentLocale>
  1939. <xsl:if test="@schedule">
  1940. <out:copy-of select="{@schedule}"/>
  1941. </xsl:if>
  1942. </schedule>
  1943. </xts:transform>
  1944. </xts:append>
  1945. </xts:sequence>
  1946. </xsl:template>
  1947. <!--
  1948. dt:hierarchicalParmValueItem
  1949. Recursive template to build the description of a hierarchical parameter
  1950. -->
  1951. <xsl:template match="dt:hierarchicalParmValueItem">
  1952. <out:template match="*[local-name()='hierarchicalParmValueItem']">
  1953. <out:param name="ancestorText"/>
  1954. <out:param name="position"/>
  1955. <out:choose>
  1956. <out:when test="*[local-name()='hierarchicalParmValueItem']">
  1957. <out:for-each select="./*[local-name()='hierarchicalParmValueItem']">
  1958. <out:variable name="pos">
  1959. <out:choose>
  1960. <out:when test="$position = 'first' and position() = '1'">first</out:when>
  1961. <out:otherwise>not_first</out:otherwise>
  1962. </out:choose>
  1963. </out:variable>
  1964. <out:variable name="displayText">
  1965. <out:choose>
  1966. <out:when test="*[local-name()='value']/*[local-name()='display'] != ''">
  1967. <out:value-of select="*[local-name()='value']/*[local-name()='display']"/>
  1968. </out:when>
  1969. <out:otherwise>
  1970. <out:value-of select="*[local-name()='value']/*[local-name()='use']"/>
  1971. </out:otherwise>
  1972. </out:choose>
  1973. </out:variable>
  1974. <out:apply-templates select=".">
  1975. <out:with-param name="ancestorText" select="concat($ancestorText, ' &gt; ' ,$displayText)"/>
  1976. <out:with-param name="position" select="$pos"/>
  1977. </out:apply-templates>
  1978. </out:for-each>
  1979. </out:when>
  1980. <out:otherwise>
  1981. <out:if test="$position='not_first'">
  1982. <out:text>, </out:text>
  1983. </out:if>
  1984. <out:text>'</out:text>
  1985. <out:value-of select="$ancestorText"/>
  1986. <out:text>'</out:text>
  1987. </out:otherwise>
  1988. </out:choose>
  1989. </out:template>
  1990. </xsl:template>
  1991. <!--
  1992. dt:promptDescription
  1993. Creates the string for describing which prompts have been saved and appends them to the DOM
  1994. -->
  1995. <xsl:template match="dt:promptDescription">
  1996. <xsl:call-template name="dt:promptSummaryText"/>
  1997. <xts:sequence>
  1998. <xsl:if test="@params='default' or @params='both'">
  1999. <xts:delete select="/root/env/param[@name='defaultParameterDescription']"/>
  2000. <xts:delete select="/root/env/param[@name='defaultParameterDescriptionToLong']"/>
  2001. <xts:append select="/root/env">
  2002. <param name="defaultParameterDescription">
  2003. <out:value-of select="$visibleDescription"/>
  2004. </param>
  2005. <out:if test="string-length($description) > 45">
  2006. <param name="defaultParameterDescriptionToLong">true</param>
  2007. </out:if>
  2008. </xts:append>
  2009. </xsl:if>
  2010. <xsl:if test="@params='both' or not(@params)">
  2011. <xts:delete select="/root/env/param[@name='parameterDescription']"/>
  2012. <xts:delete select="/root/env/param[@name='parameterDescriptionToLong']"/>
  2013. <xts:append select="/root/env">
  2014. <param name="parameterDescription">
  2015. <out:value-of select="$visibleDescription"/>
  2016. </param>
  2017. <out:if test="string-length($description) > 45">
  2018. <param name="parameterDescriptionToLong">true</param>
  2019. </out:if>
  2020. </xts:append>
  2021. </xsl:if>
  2022. </xts:sequence>
  2023. </xsl:template>
  2024. <!--
  2025. dt:promptSummaryText
  2026. Append the javascript needed to validate the runOptions
  2027. @defaultFormat: the default format that should be used if no other format is selected
  2028. -->
  2029. <xsl:template match="dt:promptSummaryText" name="dt:promptSummaryText">
  2030. <!-- path the the non-connection parameters -->
  2031. <xsl:variable name="path">
  2032. <xsl:choose>
  2033. <xsl:when test="@parameterPath != ''"><xsl:value-of select="@parameterPath"/></xsl:when>
  2034. <xsl:when test="@checkRunnableParameters='true'"><xsl:value-of select="'/root/runnableParameters/parameters/*[local-name()=&quot;parameterValue&quot;]'"/></xsl:when>
  2035. <xsl:otherwise><xsl:value-of select="'/root/parameters/*[local-name()=&quot;parameterValue&quot;]'"/></xsl:otherwise>
  2036. </xsl:choose>
  2037. </xsl:variable>
  2038. <!-- path to the connection parameters -->
  2039. <xsl:variable name="dataSourceParameters">
  2040. <xsl:choose>
  2041. <xsl:when test="@dataSourcePath != ''"><xsl:value-of select="@dataSourcePath"/></xsl:when>
  2042. <xsl:when test="@checkRunnableParameters='true'"><xsl:value-of select="'/root/runnableParameters/credentialParameters/credential'"/></xsl:when>
  2043. <xsl:otherwise><xsl:value-of select="'/root/credentialParameters/credential'"/></xsl:otherwise>
  2044. </xsl:choose>
  2045. </xsl:variable>
  2046. <!-- path to the CM response for the connection information -->
  2047. <xsl:variable name="dataSourceQueryReply">
  2048. <xsl:choose>
  2049. <xsl:when test="@dataSourceQueryReply != ''"><xsl:value-of select="@dataSourceQueryReply"/></xsl:when>
  2050. <xsl:when test="@checkRunnableParameters='true'"><xsl:value-of select="'/root/defaultDataSources/cm:queryResponse/cm:queryReply/cm:dataSourceConnection'"/></xsl:when>
  2051. <xsl:otherwise><xsl:value-of select="'/root/dataSources/cm:queryResponse/cm:queryReply/cm:dataSourceConnection'"/></xsl:otherwise>
  2052. </xsl:choose>
  2053. </xsl:variable>
  2054. <out:variable name="description">
  2055. <!-- build the connection parameter description -->
  2056. <out:for-each select="{$dataSourceParameters}">
  2057. <out:variable name="pos" select="position()"/>
  2058. <out:variable name="dsConnections" select="{$dataSourceQueryReply}"/>
  2059. <xts:string id="IDS_VIEW_PROMPTS_CONNECTION_SUMMARY">
  2060. <xts:param name="datasource_name">
  2061. <out:value-of select="$dsConnections[$pos]/cm:parent/cm:dataSource/cm:defaultName"/>
  2062. </xts:param>
  2063. <xts:param name="connection_name">
  2064. <out:value-of select="$dsConnections[$pos]/cm:defaultName"/>
  2065. </xts:param>
  2066. </xts:string>
  2067. <out:choose>
  2068. <out:when test="dataSourceSignon != ''">
  2069. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  2070. <xts:param name="signon_name">
  2071. <out:value-of select="$dsConnections[$pos]/../following-sibling::*[1]/cm:dataSourceSignon/cm:defaultName"/>
  2072. </xts:param>
  2073. </xts:string>
  2074. </out:when>
  2075. <out:when test="username != '' and password != ''">
  2076. <out:variable name="signon_name">
  2077. <xts:string id="IDS_VIEW_PROMPTS_USERID_PASSWORD"/>
  2078. </out:variable>
  2079. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  2080. <xts:param name="signon_name">
  2081. <out:value-of select="$signon_name"/>
  2082. </xts:param>
  2083. </xts:string>
  2084. </out:when>
  2085. <out:when test="username != ''">
  2086. <out:variable name="signon_name">
  2087. <xts:string id="IDS_VIEW_PROMPTS_USERID_ONLY"/>
  2088. </out:variable>
  2089. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  2090. <xts:param name="signon_name">
  2091. <out:value-of select="$signon_name"/>
  2092. </xts:param>
  2093. </xts:string>
  2094. </out:when>
  2095. <out:when test="password != ''">
  2096. <out:variable name="signon_name">
  2097. <xts:string id="IDS_VIEW_PROMPTS_PASSWORD_ONLY"/>
  2098. </out:variable>
  2099. <xts:string id="IDS_VIEW_PROMPTS_SIGNON">
  2100. <xts:param name="signon_name">
  2101. <out:value-of select="$signon_name"/>
  2102. </xts:param>
  2103. </xts:string>
  2104. </out:when>
  2105. </out:choose>
  2106. </out:for-each>
  2107. <!-- build the non-connection parameter summary -->
  2108. <out:for-each select="{$path}">
  2109. <out:sort select="*[local-name()='name']"/>
  2110. <out:value-of select="*[local-name()='name']"/>
  2111. <xts:string id="IDS_LIST_START"/>
  2112. <out:value-of select="' '"/>
  2113. <out:for-each select="*[local-name()!='name']">
  2114. <out:variable name="displayText">
  2115. <out:choose>
  2116. <out:when test="./*[local-name()='value']/*[local-name()='display'] != ''">
  2117. <out:value-of select="./*[local-name()='value']/*[local-name()='display']"/>
  2118. </out:when>
  2119. <out:otherwise>
  2120. <out:value-of select="./*[local-name()='value']/*[local-name()='use']"/>
  2121. </out:otherwise>
  2122. </out:choose>
  2123. </out:variable>
  2124. <out:choose>
  2125. <out:when test="local-name() = 'hierarchicalParmValueItem'">
  2126. <out:apply-templates select=".">
  2127. <out:with-param name="ancestorText" select="$displayText"/>
  2128. <out:with-param name="position" select="'first'"/>
  2129. </out:apply-templates>
  2130. </out:when>
  2131. <out:otherwise>
  2132. <out:text>'</out:text>
  2133. <out:choose>
  2134. <out:when test="local-name() = 'simpleParmValueItem'">
  2135. <out:choose>
  2136. <out:when test="*[local-name()='display'] != ''">
  2137. <out:value-of select="*[local-name()='display']"/>
  2138. </out:when>
  2139. <out:otherwise>
  2140. <out:value-of select="*[local-name()='use']"/>
  2141. </out:otherwise>
  2142. </out:choose>
  2143. </out:when>
  2144. <out:otherwise>
  2145. <out:variable name="startDisplay">
  2146. <out:choose>
  2147. <out:when test="*[local-name()='start']/*[local-name()='display'] != ''">
  2148. <out:value-of select="*[local-name()='start']/*[local-name()='display']"/>
  2149. </out:when>
  2150. <out:otherwise>
  2151. <out:value-of select="*[local-name()='start']/*[local-name()='use']"/>
  2152. </out:otherwise>
  2153. </out:choose>
  2154. </out:variable>
  2155. <out:variable name="endDisplay">
  2156. <out:choose>
  2157. <out:when test="*[local-name()='end']/*[local-name()='display'] != ''">
  2158. <out:value-of select="*[local-name()='end']/*[local-name()='display']"/>
  2159. </out:when>
  2160. <out:otherwise>
  2161. <out:value-of select="*[local-name()='end']/*[local-name()='use']"/>
  2162. </out:otherwise>
  2163. </out:choose>
  2164. </out:variable>
  2165. <out:choose>
  2166. <out:when test="$startDisplay != '' and $endDisplay!=''">
  2167. <out:choose>
  2168. <out:when test="string($startDisplay) != string($endDisplay)">
  2169. <xts:string id="IDS_OTHERRUN_BOUNDED_RANGE_VALUE">
  2170. <xts:param name="startValue">
  2171. <out:value-of select="$startDisplay"/>
  2172. </xts:param>
  2173. <xts:param name="endValue">
  2174. <out:value-of select="$endDisplay"/>
  2175. </xts:param>
  2176. </xts:string>
  2177. </out:when>
  2178. <out:otherwise>
  2179. <out:value-of select="$endDisplay"/>
  2180. </out:otherwise>
  2181. </out:choose>
  2182. </out:when>
  2183. <out:when test="$startDisplay != ''">
  2184. <xts:string id="IDS_OTHERRUN_RANGED_START_PARAM_VALUE">
  2185. <xts:param name="startValue"><out:value-of select="$startDisplay"/></xts:param>
  2186. </xts:string>
  2187. </out:when>
  2188. <out:when test="$endDisplay != ''">
  2189. <xts:string id="IDS_OTHERRUN_RANGED_END_PARAM_VALUE">
  2190. <xts:param name="endValue"><out:value-of select="$endDisplay"/></xts:param>
  2191. </xts:string>
  2192. </out:when>
  2193. </out:choose>
  2194. </out:otherwise>
  2195. </out:choose>
  2196. <out:text>'</out:text>
  2197. </out:otherwise>
  2198. </out:choose>
  2199. <out:choose>
  2200. <out:when test="position()=last()"><xts:string id="IDS_LIST_END"/></out:when>
  2201. <out:otherwise><xts:string id="IDS_LIST_SEPARATOR"/></out:otherwise>
  2202. </out:choose>
  2203. </out:for-each>
  2204. <out:value-of select="' '"/>
  2205. </out:for-each>
  2206. </out:variable>
  2207. <out:variable name="ellipsis"><xts:string id="IDS_LIST_ELLIPSIS"/></out:variable>
  2208. <out:variable name="visibleDescription">
  2209. <out:choose>
  2210. <out:when test="string-length($description) > 45">
  2211. <out:value-of select="concat(substring($description,1,42),$ellipsis)"/>
  2212. </out:when>
  2213. <out:otherwise><out:value-of select="$description"/></out:otherwise>
  2214. </out:choose>
  2215. </out:variable>
  2216. </xsl:template>
  2217. <!--
  2218. dt:runOptionValidation
  2219. Setup global js variables to be used in the validation script
  2220. -->
  2221. <xsl:template match="dt:runOptionValidation">
  2222. <out:variable name="defaultFormat">
  2223. <out:choose>
  2224. <out:when test="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat!=''">
  2225. <out:value-of select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:executionFormat"/>
  2226. </out:when>
  2227. <out:when test="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value'] != ''">
  2228. <out:value-of select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() = 'userPreferenceVars']/*[local-name()='item']/*[local-name()='name' and .='format']/../*[local-name()='value']"/>
  2229. </out:when>
  2230. <out:otherwise>HTML</out:otherwise>
  2231. </out:choose>
  2232. </out:variable>
  2233. <out:variable name="formatName">
  2234. <out:choose>
  2235. <out:when test="$defaultFormat = 'HTML'"><xts:string id="IDS_OTHERRUN_FORMAT_HTML" encode="javascript"/></out:when>
  2236. <out:when test="$defaultFormat = 'HTMLFragment'"><xts:string id="IDS_OTHERRUN_FORMAT_HTMLFRAGMENT" encode="javascript"/></out:when>
  2237. <out:when test="$defaultFormat = 'XHTML'"><xts:string id="IDS_OTHERRUN_FORMAT_XHTML" encode="javascript"/></out:when>
  2238. <out:when test="$defaultFormat = 'XML'"><xts:string id="IDS_OTHERRUN_FORMAT_XML" encode="javascript"/></out:when>
  2239. <out:when test="$defaultFormat = 'XLS' and $browser != 'safari'"><xts:string id="IDS_OTHERRUN_FORMAT_XLS" encode="javascript"/></out:when>
  2240. <out:when test="$defaultFormat = 'XLWA' and $browser != 'safari'"><xts:string id="IDS_OTHERRUN_FORMAT_XLS_2002" encode="javascript"/></out:when>
  2241. <out:when test="$defaultFormat = 'singleXLS' and $browser != 'safari'"><xts:string id="IDS_OTHERRUN_FORMAT_SINGLE_XLS" encode="javascript"/></out:when>
  2242. <out:when test="$defaultFormat = 'CSV'"><xts:string id="IDS_OTHERRUN_FORMAT_CSV" encode="javascript"/></out:when>
  2243. <out:when test="$defaultFormat = 'PDF'"><xts:string id="IDS_OTHERRUN_FORMAT_PDF" encode="javascript"/></out:when>
  2244. <out:otherwise><xts:string id="IDS_OTHERRUN_FORMAT_HTML" encode="javascript"/></out:otherwise>
  2245. </out:choose>
  2246. </out:variable>
  2247. var g_defaultFormat = "<out:value-of select="$defaultFormat"/>";
  2248. var g_hasRecipients = "<out:value-of select="/root/env/param[@name='hasRecipients'] = 'true'"/>";
  2249. var g_validation_msg_array = new Array();
  2250. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_PRINTER'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_PRINTER" encode="javascript"/>';
  2251. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_ARCHIVE_LOCATION'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_ARCHIVE_LOCATION" encode="javascript"/>';
  2252. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_RECIPIENTS'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_RECIPIENTS" encode="javascript"/>';
  2253. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_MOBILE_RECIPIENTS'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_MOBILE_RECIPIENTS" encode="javascript"/>';
  2254. g_validation_msg_array['IDS_OTHERRUN_MOBILE_NO_RECIPIENTS'] = '<xts:string id="IDS_OTHERRUN_MOBILE_NO_RECIPIENTS" encode="javascript"/>';
  2255. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_DELIVERY'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_DELIVERY" encode="javascript"/>';
  2256. g_validation_msg_array['IDS_OTHERRUN_ERR_NO_FORMAT'] = '<xts:string id="IDS_OTHERRUN_ERR_NO_FORMAT" encode="javascript"><xts:param name="format"><out:value-of select="$formatName"/></xts:param></xts:string>';
  2257. g_validation_msg_array['IDS_OTHERRUN_ERR_EXTRA_LANG'] = '<xts:string id="IDS_OTHERRUN_ERR_EXTRA_LANG" encode="javascript"/>';
  2258. g_validation_msg_array['IDS_OTHERRUN_ERR_EXTRA_FORMAT'] = '<xts:string id="IDS_OTHERRUN_ERR_EXTRA_FORMAT" encode="javascript"/>';
  2259. g_validation_msg_array['IDS_OTHERRUN_ERR_BRUST'] = '<xts:string id="IDS_OTHERRUN_ERR_BRUST" encode="javascript"/>';
  2260. g_validation_msg_array['IDS_OTHERRUN_ERR_LINK_NO_SAVE'] = '<xts:string id="IDS_OTHERRUN_ERR_LINK_NO_SAVE" encode="javascript"/>';
  2261. g_validation_msg_array['IDS_OTHERRUN_ERR_NOTIFY_NO_SAVE_PRINT'] = '<xts:string id="IDS_OTHERRUN_ERR_NOTIFY_NO_SAVE_PRINT" encode="javascript"/>';
  2262. g_validation_msg_array['IDS_OTHERRUN_REQUEST_SUBMITTED'] = '<xts:string id="IDS_OTHERRUN_REQUEST_SUBMITTED" encode="javascript"/>';
  2263. g_validation_msg_array['IDS_PDF_OPEN_PASSWORD_SUMMARY'] = '<xts:string id="IDS_PDF_OPEN_PASSWORD_SUMMARY" encode="javascript"/>';
  2264. g_validation_msg_array['IDS_PDF_OPTION_PASSWORD_SUMMARY'] = '<xts:string id="IDS_PDF_OPTION_PASSWORD_SUMMARY" encode="javascript"/>';
  2265. g_validation_msg_array['IDS_OTHERRUN_NO_PDF_OPTIONS'] = '<xts:string id="IDS_OTHERRUN_NO_PDF_OPTIONS" encode="javascript"/>';
  2266. </xsl:template>
  2267. <!--
  2268. dt:runOptionJavaScriptInit
  2269. Append the common javascript used in the init() function for runOptions
  2270. -->
  2271. <xsl:template match="dt:runOptionJavaScriptInit">
  2272. initRunOptions();
  2273. </xsl:template>
  2274. <xsl:template match="dt:updateSaveAsPathText">
  2275. <xts:sequence>
  2276. <!-- if we just came back from the saveAs dialog, then update the saveAsSummary -->
  2277. <xts:delete select="/root/env/param[@name='saveAsPathText' or @name='visited_save_as']"/>
  2278. <xts:append select="/root/env">
  2279. <param name="saveAsPathText">
  2280. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  2281. <out:variable name="path" select="/root/env/param[@name='m_ro_saveAsPath']"/>
  2282. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  2283. <out:variable name="rootPath">
  2284. <out:choose>
  2285. <out:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))"><out:value-of select="'~/folder'"/></out:when>
  2286. <out:otherwise><out:value-of select="$defaultContentRoot"/></out:otherwise>
  2287. </out:choose>
  2288. </out:variable>
  2289. <cf:do-the-path-link>
  2290. <cf:param name="familytree"><xsl:value-of select="@ancestors"/></cf:param>
  2291. <cf:param name="familymember"><xsl:value-of select="@defaultName"/></cf:param>
  2292. <cf:param name="home"><out:value-of select="$rootPath"/></cf:param>
  2293. </cf:do-the-path-link>
  2294. </param>
  2295. </xts:append>
  2296. </xts:sequence>
  2297. </xsl:template>
  2298. <!-- template that splits connection parameters from other parameters -->
  2299. <xsl:template match="dt:splitParameters">
  2300. <xts:append>
  2301. <xts:transform src="transforms/portal/parameters/group-parameters.xslt" processor="XSLT">
  2302. <root>
  2303. <out:choose>
  2304. <out:when test="key('env-param','m_rp_parameters') != ''">
  2305. <out:value-of select="xtsext:web64decode(string(key('env-param','m_rp_parameters')), true())" disable-output-escaping="yes"/>
  2306. </out:when>
  2307. <out:otherwise>
  2308. <xsl:if test="@queryNode!=''">
  2309. <xts:queryNode select="{@queryNode}"/>
  2310. </xsl:if>
  2311. </out:otherwise>
  2312. </out:choose>
  2313. </root>
  2314. </xts:transform>
  2315. </xts:append>
  2316. </xsl:template>
  2317. <!-- template that splits connection parameters from other parameters. Used to get the default parameters -->
  2318. <xsl:template match="dt:splitRunnableParameters">
  2319. <xts:append>
  2320. <runnableParameters>
  2321. <xts:transform src="transforms/portal/parameters/group-parameters.xslt" processor="XSLT">
  2322. <root>
  2323. <xsl:if test="@queryNode!=''">
  2324. <xts:queryNode select="{@queryNode}"/>
  2325. </xsl:if>
  2326. </root>
  2327. </xts:transform>
  2328. </runnableParameters>
  2329. </xts:append>
  2330. </xsl:template>
  2331. <xsl:template match="dt:domainListPopup">
  2332. <cp:genericDialog id="validDomains" interactive="true" align="left" width="300" positionVertical="true" positionHorizontal="true" helpid="12345" focusidOnShiftTab="IDS_OK">
  2333. <cp:param name="title"><xts:string id="IDS_NEW_URL_VALID_DOMAINS"/></cp:param>
  2334. <cp:param name="body">
  2335. <div style="height:100px;overflow:auto">
  2336. <out:choose>
  2337. <out:when test="/root/configuration/property[@name ='CAF']/*/*[@name='caf_validDomainList']/*/*">
  2338. <table cellpadding="4" cellspacing="0" border="1" width="100%" style="border:solid 1px #cccccc; border-collapse: collapse;" role="presentation">
  2339. <out:for-each select="/root/configuration/property[@name ='CAF']/*/*[@name='caf_validDomainList']/*/*">
  2340. <tr>
  2341. <td class="formText"><out:value-of select="."/></td>
  2342. </tr>
  2343. </out:for-each>
  2344. </table>
  2345. </out:when>
  2346. <out:otherwise>
  2347. <p class="objectNoneFound">
  2348. <xts:string id="IDS_NO_ITEMS_FOUND"/>
  2349. </p>
  2350. </out:otherwise>
  2351. </out:choose>
  2352. </div>
  2353. </cp:param>
  2354. <cp:param name="footer">
  2355. <dp:simpleFooter>
  2356. <cp:cmdButton defaultState="active" id="IDS_OK">
  2357. <cp:cmdButtonText><xts:string id="IDS_OK"/></cp:cmdButtonText>
  2358. <cp:cmdButtonEvents>
  2359. <cp:cmdButtonEvent name="onclick">javascript:validDomains.hide();</cp:cmdButtonEvent>
  2360. <cp:cmdButtonEvent name="onkeypress">javascript:if (event.keyCode==13 || event.keyCode==32 || event.charCode==32) { this.onclick(); return false; } return true;</cp:cmdButtonEvent>
  2361. <cp:cmdButtonEvent name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else { if(document.getElementById("12345")) {document.getElementById("12345").focus(); return false; } } } return true;</cp:cmdButtonEvent>
  2362. </cp:cmdButtonEvents>
  2363. </cp:cmdButton>
  2364. </dp:simpleFooter>
  2365. </cp:param>
  2366. </cp:genericDialog>
  2367. </xsl:template>
  2368. <!-- the main engine -->
  2369. <xsl:template match="*">
  2370. <xsl:copy>
  2371. <xsl:copy-of select="@*"/>
  2372. <xsl:apply-templates/>
  2373. </xsl:copy>
  2374. </xsl:template>
  2375. </xsl:stylesheet>