system_upgrade.xslt 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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, 2013
  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">
  13. <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  14. <xsl:variable name="system_version">
  15. <xsl:choose>
  16. <xsl:when test="string(/system/@version) = ''">
  17. <xsl:text>2.0</xsl:text>
  18. </xsl:when>
  19. <xsl:otherwise>
  20. <xsl:value-of select="/system/@version"/>
  21. </xsl:otherwise>
  22. </xsl:choose>
  23. </xsl:variable>
  24. <!-- Update the system version -->
  25. <!-- =================================================================================== -->
  26. <xsl:template match="/">
  27. <xsl:comment>
  28. Licensed Materials - Property of IBM
  29. IBM Cognos Products: ps
  30. (C) Copyright IBM Corp. 2005, 2013
  31. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  32. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  33. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  34. </xsl:comment>
  35. <system version="4.4">
  36. <xsl:if test="$system_version &lt; 2.2">
  37. <xsl:call-template name="upgrade_from_2_0"/>
  38. </xsl:if>
  39. <xsl:apply-templates select="system/child::node()"/>
  40. </system>
  41. </xsl:template>
  42. <!-- Remove deprecated parameters. This is safe to be done unconditionally for all upgrade paths. -->
  43. <!-- =================================================================================== -->
  44. <xsl:template match="param[@name='enable-custompages']"/>
  45. <xsl:template match="param[@name='defaultPortalPreferences']"/>
  46. <xsl:template match="param[@name='portlets']"/>
  47. <xsl:template match="param[@name='sessionPath']"/>
  48. <xsl:template match="param[@name='enable-object-count']"/>
  49. <xsl:template match="param[@name='OEMmessages']"/>
  50. <xsl:template match="param[@name='enable-excel-support']"/>
  51. <xsl:template match="param[@name='enable-csv-support']"/>
  52. <xsl:template match="param[@name='enable-xml-support']"/>
  53. <xsl:template match="param[@name='enable-download']"/>
  54. <xsl:template match="param[@name='enable-SAP-connection']"/>
  55. <!-- Remove deprecated objects. This is safe to be done unconditionally for all upgrade paths. -->
  56. <xsl:template match="object[@class='exportDeploymentFolder']" mode="cleanUpUIObjects"/>
  57. <xsl:template match="object[@class='importDeploymentFolder']" mode="cleanUpUIObjects"/>
  58. <xsl:template match="object[@class='jobAndScheduleMonitoringService']" mode="cleanUpUIObjects"/>
  59. <xsl:template match="object[@class='scheduleAndDeliveryService']" mode="cleanUpUIObjects"/>
  60. <xsl:template match="object[@class='dimensionalDataService']" mode="cleanUpUIObjects"/>
  61. <!-- Remove deprecated element only (keep output) -->
  62. <xsl:template match="object[@class='output']/type[@name='agentOutputHotList']"/>
  63. <!-- =================================================================================== -->
  64. <xsl:template name="upgrade_from_2_0">
  65. <xsl:if test="not(/system/param[@name='namespace_filter'])">
  66. <xsl:comment>CM filter added to requests for namespaces</xsl:comment>
  67. <param name="namespace_filter">[permission(&quot;read&quot;) or permission(&quot;write&quot;) or permission(&quot;execute&quot;) or permission(&quot;traverse&quot;) or permission(&quot;setPolicy&quot;)]</param>
  68. </xsl:if>
  69. </xsl:template>
  70. <!-- =================================================================================== -->
  71. <!-- Add new object definitions for all versions. -->
  72. <xsl:template match="param[@name='ui_objects']">
  73. <param name="ui_objects">
  74. <!-- add new object definitions -->
  75. <xsl:if test="$system_version &lt; 2.1">
  76. <!-- Objects added between 2.0 and 2.1 -->
  77. <!-- Those objects that could exist in 2.0(1) system files will be added conditionally. -->
  78. <xsl:if test="not(object[@class='mobileService'])">
  79. <object class="mobileService" icon="service" container="F" service="T"/>
  80. </xsl:if>
  81. <xsl:if test="not(object[@class='reportDataService'])">
  82. <object class="reportDataService" icon="service" container="F" service="T"/>
  83. </xsl:if>
  84. <xsl:if test="not(object[@class='indexUpdateTask'])">
  85. <object class="indexUpdateTask" icon="index_update" container="F" runnable="T"/>
  86. </xsl:if>
  87. <xsl:if test="not(object[@class='indexDataService'])">
  88. <object class="indexDataService" icon="service" container="F" service="T"/>
  89. </xsl:if>
  90. <xsl:if test="not(object[@class='indexSearchService'])">
  91. <object class="indexSearchService" icon="service" container="F" service="T"/>
  92. </xsl:if>
  93. <xsl:if test="not(object[@class='indexUpdateService'])">
  94. <object class="indexUpdateService" icon="service" container="F" service="T"/>
  95. </xsl:if>
  96. <object class="document" icon="document_coc" container="F"/>
  97. <object class="output" container="F"/>
  98. <object class="shortcutAgentRSSTask" icon="newsitem" container="F"/>
  99. </xsl:if>
  100. <!-- Params added between 2.2(Blaring) and 3.0 -->
  101. <xsl:if test="$system_version &lt; 2.2">
  102. <object class="dataMovementService" icon="service" container="F" service="T"/>
  103. <object class="dataMovementTask" icon="data_movement" container="F" runnable="T"/>
  104. <object class="planningMacroTask" icon="planning_macro" container="F" runnable="T"/>
  105. <object class="planningDataService" icon="service" container="F" service="T"/>
  106. </xsl:if>
  107. <!-- Params added between 2.2 and 3.0 -->
  108. <xsl:if test="$system_version &lt; 3.0">
  109. <object class="archiveLocation" icon="file_system_location" container="F"/>
  110. <object class="migrationTask" icon="migration" container="F" runnable="T"/>
  111. <object class="powerPlay8Report" icon="pp8_report" container="F" runnable="T"/>
  112. <object class="powerPlay8ReportView" icon="pp8_report_sub" container="F" runnable="T"/>
  113. <object class="portalSkinFolder" icon="folder" container="T"/>
  114. <object class="reportDataServiceAgentDefinition" icon="subscription" container="F" runnable="T"/>
  115. <object class="subscriptionFolder" icon="folder" container="T"/>
  116. <object class="uiProfile" icon="user_interface_profiles" container="F"/>
  117. <object class="migrationService" icon="service" container="F" service="T"/>
  118. <object class="powerPlayService" icon="service" container="F" service="T"/>
  119. </xsl:if>
  120. <!-- Params added between 3.0 and 3.1 -->
  121. <xsl:if test="$system_version &lt; 3.1">
  122. <object class="dashboard" icon="dashboard" container="F"/>
  123. <object class="metadataService" icon="service" container="F" service="T"/>
  124. </xsl:if>
  125. <!-- Params added between 3.1 and 4.0 -->
  126. <xsl:if test="$system_version &lt; 4.0">
  127. <object class="adaptiveAnalyticsService" icon="service" container="F" service="T"/>
  128. <object class="annotationService" icon="service" container="F" service="T"/>
  129. <object class="contentManagerCacheService" icon="service" container="F" service="T"/>
  130. <object class="dataMovementTaskAlias" icon="data_movement_sub" container="F" runnable="T"/>
  131. <object class="EVService" icon="service" container="F" service="T"/>
  132. <object class="graphicsService" icon="service" container="F" service="T"/>
  133. <object class="humanTask" icon="human_task" container="F"/>
  134. <object class="humanTaskService" icon="service" container="F" service="T"/>
  135. <object class="interactiveReport" icon="interactive_report" container="F" runnable="T">
  136. <uiprofile name="professional" icon="rs_report"/>
  137. <uiprofile name="default" icon="rs_report"/>
  138. </object>
  139. <object class="launchable" container="F"> <xsl:comment> MVC - Content Reference</xsl:comment>
  140. <launchableType name="application/vnd.ibm.cognos.instance" icon="cognos_content"/>
  141. <launchableType name="application/vnd.ibm.cognos.ev" icon="launchable_xa_analysis"/>
  142. <launchableType name="application/vnd.ibm.cognos.cd" icon="launchable_cd"/>
  143. <!-- added in 4.1, put here for system upgrade from system less than 3.1 -->
  144. <launchableType name="application/vnd.ibm.cognos.ev.canvas" icon="launchable_xa_canvas"/>
  145. <launchableType name="" icon="launchable_default"/>
  146. </object>
  147. <object class="model" icon="model" container="T"/>
  148. <object class="relationalMetadataService" icon="service" container="F" service="T"/>
  149. <object class="statisticsService" icon="service" container="F" service="T"/>
  150. <object class="queryService" icon="service" container="F" service="T"/>
  151. <object class="queryServiceTask" icon="queryServiceTask" container="F" runnable="T"/>
  152. </xsl:if>
  153. <xsl:if test="$system_version &lt; 4.1">
  154. <object class="dataAdvisorService" icon="service" container="F" service="T"/>
  155. <object class="modelView" icon="model_view" container="F"/>
  156. <object class="rolapDataSource" icon="rolapDataSource" container="F"/>
  157. <object class="rolapVirtualDataSource" icon="rolapVirtualDataSource" container="F"/>
  158. </xsl:if>
  159. <xsl:if test="$system_version &lt; 4.2">
  160. <object class="idVizService" icon="service" container="F" service="T"/>
  161. <object class="repositoryService" icon="service" container="F" service="T"/>
  162. </xsl:if>
  163. <xsl:if test="$system_version &lt; 4.3">
  164. <object class="catalog" icon="built_in_folder" container="T"/>
  165. <object class="tenant" icon="tenant" container="F"/>
  166. <object class="tenants" icon="folder" container="T"/>
  167. <object class="visualization" icon="visualization" container="F"/>
  168. <object class="catalogFolder" icon="catalog_folder" container="T"/>
  169. </xsl:if>
  170. <!-- Copy definitions of existing objects -->
  171. <xsl:apply-templates mode="cleanUpUIObjects"/>
  172. </param>
  173. </xsl:template>
  174. <!-- ======================================================================================= -->
  175. <xsl:template match="param[@name='base-object-actions']">
  176. <param name="base-object-actions">
  177. <actions>
  178. <xsl:if test="$system_version &lt; 2.1">
  179. <!-- Objects added between 2.0 and 2.1 -->
  180. <!-- Those objects that could exist in 2.0(1) system files will be added conditionally. -->
  181. <xsl:if test="not(actions/object[@class='indexUpdateTask'])">
  182. <xsl:call-template name="genRunnableActions">
  183. <xsl:with-param name="objectName" select="'indexUpdateTask'"/>
  184. </xsl:call-template>
  185. </xsl:if>
  186. <object class="document">
  187. <action name="shortcut"/>
  188. <action name="previous_versions"/>
  189. </object>
  190. </xsl:if>
  191. <!-- Params added between 2.2(Blaring) and 3.0 -->
  192. <xsl:if test="$system_version &lt; 2.2">
  193. <object class="dataMovementTask">
  194. <action name="run_options"/>
  195. <action name="schedule"/>
  196. <action name="previous_versions"/>
  197. <action name="run_history"/>
  198. </object>
  199. <object class="planningMacroTask">
  200. <action name="run_options"/>
  201. <action name="schedule"/>
  202. <action name="run_history"/>
  203. <action name="run_once"/>
  204. </object>
  205. <object class="planningTask">
  206. <action name="run_options"/>
  207. <action name="schedule"/>
  208. <action name="run_history"/>
  209. <action name="run_once"/>
  210. </object>
  211. </xsl:if>
  212. <!-- Update 'report' objects to include new actions and add other objects added between 2.2 and 3.0 -->
  213. <xsl:if test="$system_version &lt; 3.0">
  214. <object class="powerPlay8Report">
  215. <action name="run_once"/>
  216. <action name="run_options"/>
  217. <action name="edit"/>
  218. <action name="schedule"/>
  219. <action name="shortcut"/>
  220. <action name="previous_versions"/>
  221. <action name="run_history"/>
  222. <action name="customview"/>
  223. </object>
  224. <object class="powerPlay8ReportView">
  225. <action name="run_once"/>
  226. <action name="run_options"/>
  227. <action name="edit"/>
  228. <action name="schedule"/>
  229. <action name="shortcut"/>
  230. <action name="previous_versions"/>
  231. <action name="run_history"/>
  232. </object>
  233. <object class="reportDataServiceAgentDefinition">
  234. <action name="run_history"/>
  235. </object>
  236. </xsl:if>
  237. <!-- Params added between 3.0 and 3.1 -->
  238. <xsl:if test="$system_version &lt; 3.1">
  239. <object class="migrationTask">
  240. <action name="run_options"/>
  241. <action name="schedule"/>
  242. <action name="run_once"/>
  243. <action name="run_history"/>
  244. </object>
  245. <object class="dashboard">
  246. <action name="shortcut"/>
  247. </object>
  248. </xsl:if>
  249. <!-- Params added between 3.1 and 4.0 -->
  250. <xsl:if test="$system_version &lt; 4.0">
  251. <object class="dataMovementTaskAlias">
  252. <action name="run_options"/>
  253. <action name="schedule"/>
  254. <action name="previous_versions"/>
  255. <action name="run_history"/>
  256. </object>
  257. <object class="interactiveReport">
  258. <action name="run_options"/>
  259. <action name="edit"/>
  260. <action name="schedule"/>
  261. <action name="run_once"/>
  262. <action name="previous_versions"/>
  263. <action name="run_history"/>
  264. <action name="customview"/>
  265. <action name="shortcut"/>
  266. </object>
  267. <object class="launchable">
  268. <action name="shortcut"/>
  269. <launchableType name="application/vnd.ibm.cognos.instance">
  270. <action name="traverse"/>
  271. </launchableType>
  272. </object>
  273. <object class="queryServiceTask">
  274. <action name="run_once"/>
  275. <action name="run_options"/>
  276. <action name="schedule"/>
  277. <action name="previous_versions"/>
  278. <action name="run_history"/>
  279. </object>
  280. </xsl:if>
  281. <!-- Copy everything else as is (except package) -->
  282. <xsl:apply-templates select="actions/*"/>
  283. </actions>
  284. </param>
  285. </xsl:template>
  286. <!-- ===== update some base-object-actions for different versions ======================================================-->
  287. <xsl:template match="actions/object[@class='analysis']">
  288. <object class="analysis">
  289. <xsl:copy-of select="*"/>
  290. <xsl:if test="$system_version &lt; 3.0">
  291. <action name="add_alert"/>
  292. <action name="remove_all_alerts"/>
  293. </xsl:if>
  294. </object>
  295. </xsl:template>
  296. <xsl:template match="actions/object[@class='analysisView']">
  297. <object class="analysisView">
  298. <xsl:copy-of select="*"/>
  299. <xsl:if test="$system_version &lt; 3.0">
  300. <action name="add_alert"/>
  301. <action name="remove_all_alerts"/>
  302. </xsl:if>
  303. </object>
  304. </xsl:template>
  305. <xsl:template match="actions/object[@class='query']">
  306. <object class="query">
  307. <xsl:copy-of select="*"/>
  308. <xsl:if test="$system_version &lt; 3.0">
  309. <action name="add_alert"/>
  310. <action name="remove_all_alerts"/>
  311. </xsl:if>
  312. <!-- copy the custom action example always because if it is there it will not get copied because it will appear in incorrect format for copying-->
  313. <xsl:comment> Add custom actions here like so ...
  314. &lt;action name="mycustomAction" type="custom"&gt;
  315. &lt;icon&gt;action_myaction.gif&lt;/icon&gt;
  316. &lt;url&gt;http://www.yahoo.com&lt;/url&gt;
  317. &lt;label xml:lang="en"&gt;Custom Action English label&lt;/label&gt;
  318. &lt;label xml:lang="de"&gt;Custom Action German label&lt;/label&gt;
  319. &lt;tooltip xml:lang="en"&gt;Custom Action English tooltip&lt;/tooltip&gt;
  320. &lt;tooltip xml:lang="de"&gt;Custom Action German tooltip&lt;/tooltip&gt;
  321. &lt;objProperties encode="shift_jis"&gt;
  322. &lt;property&gt;defaultName&lt;/property&gt;
  323. &lt;property&gt;searchPath&lt;/property&gt;
  324. &lt;/objProperties&gt;
  325. &lt;/action&gt;
  326. </xsl:comment>
  327. </object>
  328. </xsl:template>
  329. <xsl:template match="actions/object[@class='report']">
  330. <object class="report">
  331. <xsl:copy-of select="*"/>
  332. <xsl:if test="$system_version &lt; 3.0">
  333. <action name="add_alert"/>
  334. <action name="remove_all_alerts"/>
  335. </xsl:if>
  336. <xsl:if test="$system_version &lt; 4.4">
  337. <xsl:if test="./action[@name='edit']">
  338. <action name="edit_cbia"/>
  339. </xsl:if>
  340. </xsl:if>
  341. </object>
  342. </xsl:template>
  343. <xsl:template match="actions/object[@class='reportTemplate']">
  344. <object class="reportTemplate">
  345. <xsl:copy-of select="*"/>
  346. <xsl:if test="$system_version &lt; 4.4">
  347. <xsl:if test="./action[@name='edit']">
  348. <action name="edit_cbia"/>
  349. </xsl:if>
  350. </xsl:if>
  351. </object>
  352. </xsl:template>
  353. <xsl:template match="actions/object[@class='reportView']">
  354. <object class="reportView">
  355. <xsl:copy-of select="*"/>
  356. <xsl:if test="$system_version &lt; 3.0">
  357. <action name="add_alert"/>
  358. <action name="remove_all_alerts"/>
  359. </xsl:if>
  360. </object>
  361. </xsl:template>
  362. <xsl:template match="actions/object[@class='package']">
  363. <object class="package">
  364. <xsl:copy-of select="*"/>
  365. <xsl:if test="$system_version &lt; 3.0">
  366. <action name="shortcut"/>
  367. </xsl:if>
  368. <xsl:if test="$system_version &lt; 4.0">
  369. <userInterface name="adaptiveAnalytics">
  370. <action name="traverse"/>
  371. <action name="launchAnalyticsTOC"/>
  372. </userInterface>
  373. <userInterface name="tm1Studio">
  374. <action name="traverse"/>
  375. </userInterface>
  376. </xsl:if>
  377. </object>
  378. </xsl:template>
  379. <xsl:template match="actions/object[@class='powerPlay8Report']">
  380. <object class="powerPlay8Report">
  381. <xsl:copy-of select="*"/>
  382. <xsl:if test="$system_version &lt; 3.1">
  383. <action name="run_once"/>
  384. <action name="schedule"/>
  385. </xsl:if>
  386. <xsl:if test="$system_version &lt; 4.4">
  387. <xsl:if test="./action[@name='edit']">
  388. <action name="edit_cbia"/>
  389. </xsl:if>
  390. </xsl:if>
  391. </object>
  392. </xsl:template>
  393. <xsl:template match="actions/object[@class='interactiveReport']">
  394. <object class="interactiveReport">
  395. <xsl:copy-of select="*"/>
  396. <xsl:if test="$system_version &lt; 4.4">
  397. <xsl:if test="./action[@name='edit']">
  398. <action name="edit_cbia"/>
  399. </xsl:if>
  400. </xsl:if>
  401. </object>
  402. </xsl:template>
  403. <xsl:template match="actions/object[@class='powerPlay8ReportView']">
  404. <object class="powerPlay8ReportView">
  405. <xsl:copy-of select="*"/>
  406. <xsl:if test="$system_version &lt; 3.1">
  407. <action name="run_once"/>
  408. <action name="schedule"/>
  409. </xsl:if>
  410. </object>
  411. </xsl:template>
  412. <xsl:template match="actions/object[@class='dataMovementTask']">
  413. <object class="dataMovementTask">
  414. <xsl:copy-of select="*"/>
  415. <xsl:if test="$system_version &lt; 4.0">
  416. <action name="customview"/>
  417. </xsl:if>
  418. </object>
  419. </xsl:template>
  420. <!--========== end of update for base-object-actions =======================================================================-->
  421. <xsl:template match="param[@name='ui_graphics']">
  422. <!-- This adds new objects that did not exist before -->
  423. <param name="ui_graphics">
  424. <!-- Params added between 2.2 and 3.0 -->
  425. <xsl:if test="$system_version &lt; 3.0">
  426. <param name="powerPlay8ReportView_suffix">_sub</param>
  427. <param name="agentHotlist_format">
  428. <format name="agentOutputHotlist" icon="event_list"/>
  429. </param>
  430. </xsl:if>
  431. <!-- Params added between 3.1 and 4.0 -->
  432. <xsl:if test="$system_version &lt; 4.0">
  433. <param name="datamovementtaskalias_suffix">_sub</param>
  434. </xsl:if>
  435. <xsl:apply-templates/>
  436. </param>
  437. </xsl:template>
  438. <xsl:template match="param[@name='ui_graphics']/param[@name='document_format']">
  439. <!-- updating existing objects -->
  440. <param name="document_format">
  441. <xsl:copy-of select="*"/>
  442. <xsl:if test="$system_version &lt; 2.1">
  443. <format name="application/vnd.coc-xl" icon="_excel"/>
  444. <format name="application/vnd.coc-wd" icon="_word"/>
  445. <format name="application/vnd.coc-pp" icon="_ppt"/>
  446. </xsl:if>
  447. <xsl:if test="$system_version &lt; 3.0">
  448. <format name="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" icon="_excel_2007"/>
  449. <format name="application/vnd.openxmlformats-officedocument.wordprocessingml.document" icon="_word_2007"/>
  450. <format name="application/vnd.openxmlformats-officedocument.presentationml.presentation" icon="_ppt_2007"/>
  451. </xsl:if>
  452. <xsl:if test="$system_version &lt; 4.0">
  453. <format name="application/vnd.coc-xl.2007.macroEnabled" icon="_excel_2007"/>
  454. <format name="application/vnd.coc-wd.2007.macroEnabled" icon="_word_2007"/>
  455. <format name="application/vnd.coc-pp.2007.macroEnabled" icon="_ppt_2007"/>
  456. </xsl:if>
  457. <xsl:if test="$system_version &lt; 4.1"> <!-- add format for document object 2010, uses same icon as 2007 -->
  458. <format name="application/vnd.ms-excel.sheet.binary.macroEnabled.12" icon="_excel_2007"/>
  459. <format name="application/vnd.ms-excel.sheet.macroEnabled.12" icon="_excel_2007"/>
  460. </xsl:if>
  461. </param>
  462. </xsl:template>
  463. <xsl:template match="param[@name='ui_graphics']/param[@name='output_format']">
  464. <param name='output_format'>
  465. <xsl:copy-of select="*"/>
  466. <xsl:if test="$system_version &lt; 4.2">
  467. <format name="xlsxData" icon="result_excel_2007"/>
  468. </xsl:if>
  469. <xsl:if test="$system_version &lt; 3.0">
  470. <format name="spreadsheetML" icon="result_excel_2007"/>
  471. </xsl:if>
  472. </param>
  473. </xsl:template>
  474. <!-- == Update ui_objects' attributes add/remove/change ========================================= -->
  475. <!-- Upgrade defintion of packeageConfiguration to remove deprecated attribute icon-->
  476. <xsl:template match="object[@class='packageConfiguration']" mode="cleanUpUIObjects">
  477. <object class="packageConfiguration" container="F"/>
  478. </xsl:template>
  479. <xsl:template match="object[@class='pageDefinition']" mode="cleanUpUIObjects">
  480. <object>
  481. <xsl:copy-of select="@*"/>
  482. <xsl:if test="$system_version &lt; 3.0">
  483. <attribute name="icon">paper_size</attribute>
  484. </xsl:if>
  485. </object>
  486. </xsl:template>
  487. <!-- Update attribute of 3.0 objects -->
  488. <xsl:template match="param[@name='ui_objects']/object[@class='archiveLocation']" mode="cleanUpUIObjects">
  489. <object>
  490. <xsl:copy-of select="@*"/>
  491. <xsl:if test="$system_version = 3.0">
  492. <xsl:attribute name="icon">file_system_location</xsl:attribute>
  493. </xsl:if>
  494. </object>
  495. </xsl:template>
  496. <!-- Update attribute for 4.0 -->
  497. <xsl:template match="param[@name='ui_objects']/object[@class='report']" mode="cleanUpUIObjects">
  498. <xsl:choose>
  499. <xsl:when test="$system_version &lt; 4.0">
  500. <object class="report" icon="report" container="F" runnable="T"> <!-- updating icon from rs_report to report -->
  501. <uiprofile name="professional" icon="rs_report"/>
  502. <uiprofile name="default" icon="rs_report"/>
  503. </object>
  504. </xsl:when>
  505. <xsl:otherwise>
  506. <object>
  507. <xsl:copy-of select="@*"/>
  508. <xsl:copy-of select="*"/>
  509. </object>
  510. </xsl:otherwise>
  511. </xsl:choose>
  512. </xsl:template>
  513. <xsl:template match="param[@name='ui_objects']/object[@class='report']" mode="cleanUpUIObjects">
  514. <xsl:choose>
  515. <xsl:when test="$system_version &lt; 4.3">
  516. <object class="interactiveReport" icon="interactive_report" container="F" runnable="T">
  517. <uiprofile name="bua" icon="rs_report_bua"/>
  518. <uiprofile name="professional" icon="rs_report"/>
  519. <uiprofile name="default" icon="rs_report"/>
  520. </object>
  521. </xsl:when>
  522. <xsl:otherwise>
  523. <object>
  524. <xsl:copy-of select="@*"/>
  525. <xsl:copy-of select="*"/>
  526. </object>
  527. </xsl:otherwise>
  528. </xsl:choose>
  529. </xsl:template>
  530. <xsl:template match="param[@name='ui_objects']/object[@class='interactiveReport']" mode="cleanUpUIObjects">
  531. <xsl:choose>
  532. <xsl:when test="$system_version &lt; 4.3">
  533. <object class="interactiveReport" icon="interactive_report" container="F" runnable="T">
  534. <uiprofile name="bua" icon="rs_report_bua"/>
  535. <uiprofile name="professional" icon="rs_report"/>
  536. <uiprofile name="default" icon="rs_report"/>
  537. </object>
  538. </xsl:when>
  539. <xsl:otherwise>
  540. <object>
  541. <xsl:copy-of select="@*"/>
  542. <xsl:copy-of select="*"/>
  543. </object>
  544. </xsl:otherwise>
  545. </xsl:choose>
  546. </xsl:template>
  547. <xsl:template match="param[@name='ui_objects']/object[@class='package']" mode="cleanUpUIObjects">
  548. <object>
  549. <xsl:copy-of select="@*"/>
  550. <xsl:copy-of select="*"/>
  551. <xsl:if test="$system_version &lt; 4.0">
  552. <userInterface name="adaptiveAnalytics" icon="analytic_package"/>
  553. <userInterface name="tm1Studio" icon="tm1_package"/>
  554. </xsl:if>
  555. </object>
  556. </xsl:template>
  557. <!-- added new launchableType in 4.1 -->
  558. <xsl:template match="param[@name='ui_objects']/object[@class='launchable']" mode="cleanUpUIObjects">
  559. <object>
  560. <xsl:copy-of select="@*"/>
  561. <xsl:copy-of select="*"/>
  562. <xsl:if test="$system_version &lt; 4.1">
  563. <launchableType name="application/vnd.ibm.cognos.ev.canvas" icon="launchable_xa_canvas"/>
  564. </xsl:if>
  565. </object>
  566. </xsl:template>
  567. <!-- update model attribute container to 'T' if it is false as it is F in 4.0 but T in 4.1 -->
  568. <xsl:template match="param[@name='ui_objects']/object[@class='model' and @container='F']" mode="cleanUpUIObjects">
  569. <object>
  570. <xsl:copy-of select="@*[name()!='container']"/>
  571. <xsl:attribute name="container">T</xsl:attribute>
  572. </object>
  573. </xsl:template>
  574. <!-- ====================== End of update of ui_objects =============================================== -->
  575. <xsl:template name="genRunnableActions">
  576. <xsl:param name="objectName"/>
  577. <object class="{$objectName}">
  578. <action name="run_options"/>
  579. <action name="schedule"/>
  580. <action name="run_history"/>
  581. <action name="run_once"/>
  582. </object>
  583. </xsl:template>
  584. <!-- Copy everything else in ui-object-->
  585. <xsl:template match="*|comment()" mode="cleanUpUIObjects">
  586. <xsl:copy>
  587. <xsl:copy-of select="@*"/>
  588. <xsl:apply-templates/>
  589. </xsl:copy>
  590. </xsl:template>
  591. <!-- Copy everything else -->
  592. <xsl:template match="*|comment()">
  593. <xsl:copy>
  594. <xsl:copy-of select="@*"/>
  595. <xsl:apply-templates/>
  596. </xsl:copy>
  597. </xsl:template>
  598. </xsl:stylesheet>