meta.xsl 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: CCS
  5. (c) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns="http://developer.cognos.com/schemas/rds/types/1" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdsCM="http://developer.cognos.com/schemas/rds/contentmodel/1">
  9. <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
  10. <xsl:template match="/">
  11. <document>
  12. <xsl:apply-templates select="/report/layouts/layout/reportPages/*"/>
  13. </document>
  14. </xsl:template>
  15. <xsl:template priority="2" match="*[contains(style/CSS/@value, 'visibility:hidden') ]"/>
  16. <xsl:template match="pageSet">
  17. <xsl:apply-templates select="./pageOverallGroup/headerPages/*"/>
  18. <xsl:apply-templates select="./detailPages/*"/>
  19. <xsl:apply-templates select="./pageOverallGroup/footerPages/*"/>
  20. <xsl:for-each select="./pageGroups/pageGroup">
  21. <xsl:apply-templates select="headerPages/*"/>
  22. <xsl:apply-templates select="footerPages/*"/>
  23. </xsl:for-each>
  24. </xsl:template>
  25. <xsl:template match="page">
  26. <xsl:variable name="countType">
  27. <xsl:value-of select="count(../page)"/>
  28. </xsl:variable>
  29. <xsl:variable name="index">
  30. <xsl:value-of select="1 + count(preceding-sibling::page)"/>
  31. </xsl:variable>
  32. <page>
  33. <xsl:if test="@name">
  34. <rdsCM:id>
  35. <xsl:value-of select="@name"/>
  36. </rdsCM:id>
  37. </xsl:if>
  38. <posId>
  39. <xsl:choose>
  40. <xsl:when test="$countType &gt; 1">
  41. <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']')"/>
  42. </xsl:when>
  43. <xsl:otherwise>./layouts/layout/reportPages/page</xsl:otherwise>
  44. </xsl:choose>
  45. </posId>
  46. <xsl:if test="pageHeader/contents/*">
  47. <header>
  48. <xsl:apply-templates select="pageHeader/contents/*">
  49. <xsl:with-param name="posId">
  50. <xsl:choose>
  51. <xsl:when test="$countType &gt; 1">
  52. <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageHeader/contents')"/>
  53. </xsl:when>
  54. <xsl:otherwise>./layouts/layout/reportPages/page/pageHeader/contents</xsl:otherwise>
  55. </xsl:choose>
  56. </xsl:with-param>
  57. <xsl:with-param name="conditional">false</xsl:with-param>
  58. </xsl:apply-templates>
  59. </header>
  60. </xsl:if>
  61. <xsl:if test="pageBody/contents/*">
  62. <body>
  63. <xsl:apply-templates select="pageBody/contents/*">
  64. <xsl:with-param name="posId">
  65. <xsl:choose>
  66. <xsl:when test="$countType &gt; 1">
  67. <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageBody/contents')"/>
  68. </xsl:when>
  69. <xsl:otherwise>./layouts/layout/reportPages/page/pageBody/contents</xsl:otherwise>
  70. </xsl:choose>
  71. </xsl:with-param>
  72. <xsl:with-param name="conditional">false</xsl:with-param>
  73. </xsl:apply-templates>
  74. </body>
  75. </xsl:if>
  76. <xsl:if test="pageFooter/contents/*">
  77. <footer>
  78. <xsl:apply-templates select="pageFooter/contents/*">
  79. <xsl:with-param name="posId">
  80. <xsl:choose>
  81. <xsl:when test="$countType &gt; 1">
  82. <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageFooter/contents')"/>
  83. </xsl:when>
  84. <xsl:otherwise>./layouts/layout/reportPages/page/pageFooter/contents</xsl:otherwise>
  85. </xsl:choose>
  86. </xsl:with-param>
  87. <xsl:with-param name="conditional">false</xsl:with-param>
  88. </xsl:apply-templates>
  89. </footer>
  90. </xsl:if>
  91. </page>
  92. </xsl:template>
  93. <xsl:template match="table">
  94. <xsl:param name="posId"/>
  95. <xsl:param name="conditional"/>
  96. <xsl:variable name="countType">
  97. <xsl:value-of select="count(../table)"/>
  98. </xsl:variable>
  99. <xsl:variable name="index">
  100. <xsl:value-of select="1 + count(preceding-sibling::table)"/>
  101. </xsl:variable>
  102. <xsl:apply-templates select="tableRows/tableRow">
  103. <xsl:with-param name="posId">
  104. <xsl:choose>
  105. <xsl:when test="$countType &gt; 1">
  106. <xsl:value-of select="concat($posId,'/table[',$index,']')"/>
  107. </xsl:when>
  108. <xsl:otherwise>
  109. <xsl:value-of select="concat($posId,'/table')"/>
  110. </xsl:otherwise>
  111. </xsl:choose>
  112. </xsl:with-param>
  113. <xsl:with-param name="conditional">
  114. <xsl:value-of select="$conditional"/>
  115. </xsl:with-param>
  116. </xsl:apply-templates>
  117. </xsl:template>
  118. <xsl:template match="tableRow">
  119. <xsl:param name="posId"/>
  120. <xsl:param name="conditional"/>
  121. <xsl:variable name="countType">
  122. <xsl:value-of select="count(../tableRow)"/>
  123. </xsl:variable>
  124. <xsl:variable name="index">
  125. <xsl:value-of select="1 + count(preceding-sibling::tableRow)"/>
  126. </xsl:variable>
  127. <xsl:apply-templates select="tableCells/tableCell">
  128. <xsl:with-param name="posId">
  129. <xsl:choose>
  130. <xsl:when test="$countType &gt; 1">
  131. <xsl:value-of select="concat($posId,'/tableRows/tableRow[',$index,']')"/>
  132. </xsl:when>
  133. <xsl:otherwise>
  134. <xsl:value-of select="concat($posId,'/tableRows/tableRow')"/>
  135. </xsl:otherwise>
  136. </xsl:choose>
  137. </xsl:with-param>
  138. <xsl:with-param name="conditional">
  139. <xsl:value-of select="$conditional"/>
  140. </xsl:with-param>
  141. </xsl:apply-templates>
  142. </xsl:template>
  143. <xsl:template match="tableCell">
  144. <xsl:param name="posId"/>
  145. <xsl:param name="conditional"/>
  146. <xsl:variable name="countType">
  147. <xsl:value-of select="count(../tableCell)"/>
  148. </xsl:variable>
  149. <xsl:variable name="index">
  150. <xsl:value-of select="1 + count(preceding-sibling::tableCell)"/>
  151. </xsl:variable>
  152. <xsl:apply-templates select="contents/*">
  153. <xsl:with-param name="posId">
  154. <xsl:choose>
  155. <xsl:when test="$countType &gt; 1">
  156. <xsl:value-of select="concat($posId,'/tableCells/tableCell[',$index,']/contents')"/>
  157. </xsl:when>
  158. <xsl:otherwise>
  159. <xsl:value-of select="concat($posId,'/tableCells/tableCell/contents')"/>
  160. </xsl:otherwise>
  161. </xsl:choose>
  162. </xsl:with-param>
  163. <xsl:with-param name="conditional">
  164. <xsl:value-of select="$conditional"/>
  165. </xsl:with-param>
  166. </xsl:apply-templates>
  167. </xsl:template>
  168. <xsl:template match="block">
  169. <xsl:param name="posId"/>
  170. <xsl:param name="conditional"/>
  171. <xsl:variable name="countType">
  172. <xsl:value-of select="count(../block)"/>
  173. </xsl:variable>
  174. <xsl:variable name="index">
  175. <xsl:value-of select="1 + count(preceding-sibling::block)"/>
  176. </xsl:variable>
  177. <xsl:apply-templates select="contents/*">
  178. <xsl:with-param name="posId">
  179. <xsl:choose>
  180. <xsl:when test="$countType &gt; 1">
  181. <xsl:value-of select="concat($posId,'/block[',$index,']/contents')"/>
  182. </xsl:when>
  183. <xsl:otherwise>
  184. <xsl:value-of select="concat($posId,'/block/contents')"/>
  185. </xsl:otherwise>
  186. </xsl:choose>
  187. </xsl:with-param>
  188. <xsl:with-param name="conditional">
  189. <xsl:value-of select="$conditional"/>
  190. </xsl:with-param>
  191. </xsl:apply-templates>
  192. </xsl:template>
  193. <xsl:template match="list">
  194. <xsl:param name="posId"/>
  195. <xsl:param name="conditional"/>
  196. <xsl:variable name="countType">
  197. <xsl:value-of select="count(../list)"/>
  198. </xsl:variable>
  199. <xsl:variable name="index">
  200. <xsl:value-of select="1 + count(preceding-sibling::list)"/>
  201. </xsl:variable>
  202. <item>
  203. <posId>
  204. <xsl:choose>
  205. <xsl:when test="$countType &gt; 1">
  206. <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
  207. </xsl:when>
  208. <xsl:otherwise>
  209. <xsl:value-of select="concat($posId,'/list')"/>
  210. </xsl:otherwise>
  211. </xsl:choose>
  212. </posId>
  213. <conditional>
  214. <xsl:choose>
  215. <xsl:when test="./conditionalRender">true</xsl:when>
  216. <xsl:otherwise>
  217. <xsl:value-of select="$conditional"/>
  218. </xsl:otherwise>
  219. </xsl:choose>
  220. </conditional>
  221. <MListFrame>
  222. <xsl:variable name="listId">
  223. <xsl:choose>
  224. <xsl:when test="$countType &gt; 1">
  225. <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
  226. </xsl:when>
  227. <xsl:otherwise>
  228. <xsl:value-of select="concat($posId,'/list')"/>
  229. </xsl:otherwise>
  230. </xsl:choose>
  231. </xsl:variable>
  232. <xsl:if test="@name">
  233. <rdsCM:id>
  234. <xsl:value-of select="@name"/>
  235. </rdsCM:id>
  236. </xsl:if>
  237. <columns>
  238. <xsl:for-each select="listColumns/listColumn">
  239. <column>
  240. <title>
  241. <xsl:choose>
  242. <xsl:when test="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem">
  243. <xsl:value-of select="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem"/>
  244. </xsl:when>
  245. <xsl:otherwise>
  246. <xsl:value-of select="listColumnTitle/contents/textItem/dataSource/staticValue"/>
  247. </xsl:otherwise>
  248. </xsl:choose>
  249. </title>
  250. <contents>
  251. <xsl:apply-templates select="listColumnBody/contents/*">
  252. <xsl:with-param name="posId">
  253. <xsl:value-of select="concat($listId, '/listColumnBody/contents')"/>
  254. </xsl:with-param>
  255. <xsl:with-param name="conditional">
  256. <xsl:value-of select="$conditional"/>
  257. </xsl:with-param>
  258. </xsl:apply-templates>
  259. </contents>
  260. </column>
  261. </xsl:for-each>
  262. </columns>
  263. <xsl:apply-templates select="listGroups/*">
  264. <xsl:with-param name="posId">
  265. <xsl:value-of select="concat($listId, '/listGroups')"/>
  266. </xsl:with-param>
  267. <xsl:with-param name="conditional">
  268. <xsl:value-of select="$conditional"/>
  269. </xsl:with-param>
  270. </xsl:apply-templates>
  271. <xsl:apply-templates select="listOverallGroup/*">
  272. <xsl:with-param name="posId">
  273. <xsl:value-of select="$listId"/>
  274. </xsl:with-param>
  275. <xsl:with-param name="conditional">
  276. <xsl:value-of select="$conditional"/>
  277. </xsl:with-param>
  278. </xsl:apply-templates>
  279. </MListFrame>
  280. </item>
  281. </xsl:template>
  282. <xsl:template match="listGroup">
  283. <xsl:param name="posId"/>
  284. <xsl:param name="conditional"/>
  285. <xsl:variable name="countType">
  286. <xsl:value-of select="count(../list)"/>
  287. </xsl:variable>
  288. <xsl:variable name="index">
  289. <xsl:value-of select="1 + count(preceding-sibling::list)"/>
  290. </xsl:variable>
  291. <xsl:variable name="listGroupId">
  292. <xsl:choose>
  293. <xsl:when test="$countType &gt; 1">
  294. <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
  295. </xsl:when>
  296. <xsl:otherwise>
  297. <xsl:value-of select="concat($posId,'/list')"/>
  298. </xsl:otherwise>
  299. </xsl:choose>
  300. </xsl:variable>
  301. <listGroup>
  302. <key>
  303. <xsl:value-of select="@refDataItem"/>
  304. </key>
  305. <xsl:apply-templates select="*">
  306. <xsl:with-param name="posId">
  307. <xsl:value-of select="$listGroupId"/>
  308. </xsl:with-param>
  309. <xsl:with-param name="conditional">
  310. <xsl:value-of select="$conditional"/>
  311. </xsl:with-param>
  312. </xsl:apply-templates>
  313. </listGroup>
  314. </xsl:template>
  315. <xsl:template match="listHeader | listFooter">
  316. <xsl:param name="posId"/>
  317. <xsl:param name="conditional"/>
  318. <xsl:variable name="listSectionId">
  319. <xsl:value-of select="concat($posId,'/',name())"/>
  320. </xsl:variable>
  321. <xsl:element name="{name()}">
  322. <xsl:apply-templates select="listRows/listRow">
  323. <xsl:with-param name="posId">
  324. <xsl:value-of select="$listSectionId"/>
  325. </xsl:with-param>
  326. <xsl:with-param name="conditional">
  327. <xsl:value-of select="$conditional"/>
  328. </xsl:with-param>
  329. </xsl:apply-templates>
  330. </xsl:element>
  331. </xsl:template>
  332. <xsl:template match="listRow">
  333. <xsl:param name="posId"/>
  334. <xsl:param name="conditional"/>
  335. <xsl:variable name="listRowId">
  336. <xsl:value-of select="concat($posId,'/listRow')"/>
  337. </xsl:variable>
  338. <listRow>
  339. <xsl:apply-templates select="rowCells/rowCell">
  340. <xsl:with-param name="posId">
  341. <xsl:value-of select="$listRowId"/>
  342. </xsl:with-param>
  343. <xsl:with-param name="conditional">
  344. <xsl:value-of select="$conditional"/>
  345. </xsl:with-param>
  346. </xsl:apply-templates>
  347. </listRow>
  348. </xsl:template>
  349. <xsl:template match="rowCell">
  350. <xsl:param name="posId"/>
  351. <xsl:param name="conditional"/>
  352. <xsl:variable name="rowCellId">ll
  353. <xsl:value-of select="concat($posId,'/rowCell')"/>
  354. </xsl:variable>
  355. <rowCell>
  356. <xsl:choose>
  357. <xsl:when test="@colSpan">
  358. <xsl:attribute name="colSpan"><xsl:value-of select="@colSpan"/></xsl:attribute>
  359. </xsl:when>
  360. <xsl:otherwise>
  361. <xsl:attribute name="colSpan">1</xsl:attribute>
  362. </xsl:otherwise>
  363. </xsl:choose>
  364. <xsl:apply-templates select="contents/*">
  365. <xsl:with-param name="posId">
  366. <xsl:value-of select="$rowCellId"/>
  367. </xsl:with-param>
  368. <xsl:with-param name="conditional">
  369. <xsl:value-of select="$conditional"/>
  370. </xsl:with-param>
  371. </xsl:apply-templates>
  372. </rowCell>
  373. </xsl:template>
  374. <xsl:template match="TOC">
  375. <xsl:param name="posId"/>
  376. <xsl:param name="conditional"/>
  377. <xsl:variable name="countType">
  378. <xsl:value-of select="count(../TOC)"/>
  379. </xsl:variable>
  380. <xsl:variable name="index">
  381. <xsl:value-of select="1 + count(preceding-sibling::TOC)"/>
  382. </xsl:variable>
  383. <item>
  384. <posId>
  385. <xsl:choose>
  386. <xsl:when test="$countType &gt; 1">
  387. <xsl:value-of select="concat($posId,'/TOC[',$index,']')"/>
  388. </xsl:when>
  389. <xsl:otherwise>
  390. <xsl:value-of select="concat($posId,'/TOC')"/>
  391. </xsl:otherwise>
  392. </xsl:choose>
  393. </posId>
  394. <conditional>
  395. <xsl:choose>
  396. <xsl:when test="./conditionalRender">true</xsl:when>
  397. <xsl:otherwise>
  398. <xsl:value-of select="$conditional"/>
  399. </xsl:otherwise>
  400. </xsl:choose>
  401. </conditional>
  402. <MTableOfContents>
  403. <xsl:if test="@tocName">
  404. <rdsCM:id>
  405. <xsl:value-of select="@tocName"/>
  406. </rdsCM:id>
  407. </xsl:if>
  408. </MTableOfContents>
  409. </item>
  410. </xsl:template>
  411. <xsl:template match="textItem">
  412. <xsl:param name="conditional"/>
  413. <xsl:param name="posId"/>
  414. <xsl:variable name="countType">
  415. <xsl:value-of select="count(../textItem)"/>
  416. </xsl:variable>
  417. <xsl:variable name="index">
  418. <xsl:value-of select="1 + count(preceding-sibling::textItem)"/>
  419. </xsl:variable>
  420. <item>
  421. <posId>
  422. <xsl:choose>
  423. <xsl:when test="$countType &gt; 1">
  424. <xsl:value-of select="concat($posId,'/textItem[',$index,']')"/>
  425. </xsl:when>
  426. <xsl:otherwise>
  427. <xsl:value-of select="concat($posId,'/textItem')"/>
  428. </xsl:otherwise>
  429. </xsl:choose>
  430. </posId>
  431. <conditional>
  432. <xsl:choose>
  433. <xsl:when test="./conditionalRender">true</xsl:when>
  434. <xsl:otherwise>
  435. <xsl:value-of select="$conditional"/>
  436. </xsl:otherwise>
  437. </xsl:choose>
  438. </conditional>
  439. <MTextFrame>
  440. <xsl:if test="@name">
  441. <rdsCM:id>
  442. <xsl:value-of select="@name"/>
  443. </rdsCM:id>
  444. </xsl:if>
  445. </MTextFrame>
  446. </item>
  447. </xsl:template>
  448. <xsl:template match="image">
  449. <xsl:param name="posId"/>
  450. <xsl:param name="conditional"/>
  451. <xsl:variable name="countType">
  452. <xsl:value-of select="count(../image)"/>
  453. </xsl:variable>
  454. <xsl:variable name="index">
  455. <xsl:value-of select="1 + count(preceding-sibling::image)"/>
  456. </xsl:variable>
  457. <item>
  458. <posId>
  459. <xsl:choose>
  460. <xsl:when test="$countType &gt; 1">
  461. <xsl:value-of select="concat($posId,'/image[',$index,']')"/>
  462. </xsl:when>
  463. <xsl:otherwise>
  464. <xsl:value-of select="concat($posId,'/image')"/>
  465. </xsl:otherwise>
  466. </xsl:choose>
  467. </posId>
  468. <conditional>
  469. <xsl:choose>
  470. <xsl:when test="./conditionalRender">true</xsl:when>
  471. <xsl:otherwise>
  472. <xsl:value-of select="$conditional"/>
  473. </xsl:otherwise>
  474. </xsl:choose>
  475. </conditional>
  476. <MImage>
  477. <xsl:if test="@name">
  478. <rdsCM:id>
  479. <xsl:value-of select="@name"/>
  480. </rdsCM:id>
  481. </xsl:if>
  482. </MImage>
  483. </item>
  484. </xsl:template>
  485. <xsl:template match="crosstab">
  486. <xsl:param name="posId"/>
  487. <xsl:param name="conditional"/>
  488. <xsl:variable name="countType">
  489. <xsl:value-of select="count(../crosstab)"/>
  490. </xsl:variable>
  491. <xsl:variable name="index">
  492. <xsl:value-of select="1 + count(preceding-sibling::crosstab)"/>
  493. </xsl:variable>
  494. <item>
  495. <xsl:variable name="xtabId">
  496. <xsl:choose>
  497. <xsl:when test="$countType &gt; 1">
  498. <xsl:value-of select="concat($posId,'/crosstab[',$index,']')"/>
  499. </xsl:when>
  500. <xsl:otherwise>
  501. <xsl:value-of select="concat($posId,'/crosstab')"/>
  502. </xsl:otherwise>
  503. </xsl:choose>
  504. </xsl:variable>
  505. <posId>
  506. <xsl:value-of select="$xtabId"/>
  507. </posId>
  508. <conditional>
  509. <xsl:choose>
  510. <xsl:when test="./conditionalRender">true</xsl:when>
  511. <xsl:otherwise>
  512. <xsl:value-of select="$conditional"/>
  513. </xsl:otherwise>
  514. </xsl:choose>
  515. </conditional>
  516. <MCrossTab>
  517. <xsl:if test="@name">
  518. <rdsCM:id>
  519. <xsl:value-of select="@name"/>
  520. </rdsCM:id>
  521. <corner>
  522. <xsl:apply-templates select="crosstabCorner/contents/*">
  523. <xsl:with-param name="posId">
  524. <xsl:value-of select="concat($xtabId, '/crosstabCorner/contents')"/>
  525. </xsl:with-param>
  526. <xsl:with-param name="conditional">
  527. <xsl:value-of select="$conditional"/>
  528. </xsl:with-param>
  529. </xsl:apply-templates>
  530. </corner>
  531. <columns>
  532. <xsl:apply-templates select="crosstabColumns/crosstabNode">
  533. <xsl:with-param name="posId">
  534. <xsl:value-of select="concat($xtabId, 'crosstabColumns/crosstabNode')"/>
  535. </xsl:with-param>
  536. <xsl:with-param name="conditional">
  537. <xsl:value-of select="$conditional"/>
  538. </xsl:with-param>
  539. </xsl:apply-templates>
  540. </columns>
  541. <rows>
  542. <xsl:apply-templates select="crosstabRows/crosstabNode">
  543. <xsl:with-param name="posId">
  544. <xsl:value-of select="concat($xtabId, 'crosstabRows/crosstabNode')"/>
  545. </xsl:with-param>
  546. <xsl:with-param name="conditional">
  547. <xsl:value-of select="$conditional"/>
  548. </xsl:with-param>
  549. </xsl:apply-templates>
  550. </rows>
  551. </xsl:if>
  552. </MCrossTab>
  553. </item>
  554. </xsl:template>
  555. <xsl:template match="crosstabNode">
  556. <xsl:param name="posId"/>
  557. <xsl:param name="conditional"/>
  558. <xsl:variable name="crosstabNodeId">
  559. <xsl:value-of select="concat($posId,'/crosstabNestedNodes')"/>
  560. </xsl:variable>
  561. <crosstabNode>
  562. <xsl:apply-templates select="*">
  563. <xsl:with-param name="posId">
  564. <xsl:value-of select="$crosstabNodeId"/>
  565. </xsl:with-param>
  566. <xsl:with-param name="conditional">
  567. <xsl:value-of select="$conditional"/>
  568. </xsl:with-param>
  569. </xsl:apply-templates>
  570. </crosstabNode>
  571. </xsl:template>
  572. <xsl:template match="crosstabNestedNodes">
  573. <xsl:param name="posId"/>
  574. <xsl:param name="conditional"/>
  575. <xsl:variable name="crosstabNestedNodesId">
  576. <xsl:value-of select="concat($posId,'/crosstabNestedNodes')"/>
  577. </xsl:variable>
  578. <nestedNodes>
  579. <xsl:apply-templates select="*">
  580. <xsl:with-param name="posId">
  581. <xsl:value-of select="$crosstabNestedNodesId"/>
  582. </xsl:with-param>
  583. <xsl:with-param name="conditional">
  584. <xsl:value-of select="$conditional"/>
  585. </xsl:with-param>
  586. </xsl:apply-templates>
  587. </nestedNodes>
  588. </xsl:template>
  589. <xsl:template match="crosstabNodeMembers">
  590. <xsl:param name="posId"/>
  591. <xsl:param name="conditional"/>
  592. <xsl:variable name="crosstabNodeMembersId">
  593. <xsl:value-of select="concat($posId,'/crosstabNodeMembers')"/>
  594. </xsl:variable>
  595. <members>
  596. <xsl:apply-templates select="*">
  597. <xsl:with-param name="posId">
  598. <xsl:value-of select="$crosstabNodeMembersId"/>
  599. </xsl:with-param>
  600. <xsl:with-param name="conditional">
  601. <xsl:value-of select="$conditional"/>
  602. </xsl:with-param>
  603. </xsl:apply-templates>
  604. </members>
  605. </xsl:template>
  606. <xsl:template match="crosstabNodeMember">
  607. <xsl:param name="posId"/>
  608. <xsl:param name="conditional"/>
  609. <xsl:variable name="crosstabNodeMemberId">
  610. <xsl:value-of select="concat($posId,'/crosstabNodeMember')"/>
  611. </xsl:variable>
  612. <member>
  613. <title>
  614. <xsl:value-of select="@refDataItem"/>
  615. </title>
  616. <contents>
  617. <xsl:apply-templates select="contents/*">
  618. <xsl:with-param name="posId">
  619. <xsl:value-of select="concat($crosstabNodeMemberId, 'contents')"/>
  620. </xsl:with-param>
  621. <xsl:with-param name="conditional">
  622. <xsl:value-of select="$conditional"/>
  623. </xsl:with-param>
  624. </xsl:apply-templates>
  625. </contents>
  626. </member>
  627. </xsl:template>
  628. <xsl:template match="crosstabSpacer">
  629. <xsl:param name="posId"/>
  630. <xsl:param name="conditional"/>
  631. <xsl:variable name="crosstabSpacerId">
  632. <xsl:value-of select="concat($posId,'/crosstabSpacer')"/>
  633. </xsl:variable>
  634. <spacer>
  635. <contents>
  636. <xsl:apply-templates select="contents/*">
  637. <xsl:with-param name="posId">
  638. <xsl:value-of select="concat($crosstabSpacerId, 'contents')"/>
  639. </xsl:with-param>
  640. <xsl:with-param name="conditional">
  641. <xsl:value-of select="$conditional"/>
  642. </xsl:with-param>
  643. </xsl:apply-templates>
  644. </contents>
  645. </spacer>
  646. </xsl:template>
  647. <xsl:template match="repeaterTable">
  648. <xsl:param name="posId"/>
  649. <xsl:param name="conditional"/>
  650. <xsl:variable name="countType">
  651. <xsl:value-of select="count(../repeaterTable)"/>
  652. </xsl:variable>
  653. <xsl:variable name="index">
  654. <xsl:value-of select="1 + count(preceding-sibling::repeaterTable)"/>
  655. </xsl:variable>
  656. <xsl:variable name="rptId">
  657. <xsl:choose>
  658. <xsl:when test="$countType &gt; 1">
  659. <xsl:value-of select="concat($posId,'/repeaterTable[',$index,']')"/>
  660. </xsl:when>
  661. <xsl:otherwise>
  662. <xsl:value-of select="concat($posId,'/repeaterTable')"/>
  663. </xsl:otherwise>
  664. </xsl:choose>
  665. </xsl:variable>
  666. <item>
  667. <posId>
  668. <xsl:value-of select="$rptId"/>
  669. </posId>
  670. <conditional>
  671. <xsl:choose>
  672. <xsl:when test="./conditionalRender">true</xsl:when>
  673. <xsl:otherwise>
  674. <xsl:value-of select="$conditional"/>
  675. </xsl:otherwise>
  676. </xsl:choose>
  677. </conditional>
  678. <MRepeaterTable>
  679. <xsl:if test="@name">
  680. <rdsCM:id>
  681. <xsl:value-of select="@name"/>
  682. </rdsCM:id>
  683. </xsl:if>
  684. <pref_columns>
  685. <xsl:value-of select="@across"/>
  686. </pref_columns>
  687. <pref_rows>
  688. <xsl:value-of select="@down"/>
  689. </pref_rows>
  690. <xsl:apply-templates select="repeaterTableCell/contents/*">
  691. <xsl:with-param name="posId">
  692. <xsl:value-of select="concat($rptId, '/repeaterTableCell/contents')"/>
  693. </xsl:with-param>
  694. <xsl:with-param name="conditional">
  695. <xsl:value-of select="$conditional"/>
  696. </xsl:with-param>
  697. </xsl:apply-templates>
  698. </MRepeaterTable>
  699. </item>
  700. </xsl:template>
  701. <xsl:template match="repeater">
  702. <xsl:param name="posId"/>
  703. <xsl:param name="conditional"/>
  704. <xsl:variable name="countType">
  705. <xsl:value-of select="count(../repeater)"/>
  706. </xsl:variable>
  707. <xsl:variable name="index">
  708. <xsl:value-of select="1 + count(preceding-sibling::repeater)"/>
  709. </xsl:variable>
  710. <xsl:variable name="rptId">
  711. <xsl:choose>
  712. <xsl:when test="$countType &gt; 1">
  713. <xsl:value-of select="concat($posId,'/repeater[',$index,']')"/>
  714. </xsl:when>
  715. <xsl:otherwise>
  716. <xsl:value-of select="concat($posId,'/repeater')"/>
  717. </xsl:otherwise>
  718. </xsl:choose>
  719. </xsl:variable>
  720. <item>
  721. <posId>
  722. <xsl:value-of select="$rptId"/>
  723. </posId>
  724. <conditional>
  725. <xsl:choose>
  726. <xsl:when test="./conditionalRender">true</xsl:when>
  727. <xsl:otherwise>
  728. <xsl:value-of select="$conditional"/>
  729. </xsl:otherwise>
  730. </xsl:choose>
  731. </conditional>
  732. <MRepeater>
  733. <xsl:if test="@name">
  734. <rdsCM:id>
  735. <xsl:value-of select="@name"/>
  736. </rdsCM:id>
  737. </xsl:if>
  738. <xsl:apply-templates select="contents/*">
  739. <xsl:with-param name="posId">
  740. <xsl:value-of select="concat($rptId, '/contents')"/>
  741. </xsl:with-param>
  742. <xsl:with-param name="conditional">
  743. <xsl:value-of select="$conditional"/>
  744. </xsl:with-param>
  745. </xsl:apply-templates>
  746. </MRepeater>
  747. </item>
  748. </xsl:template>
  749. <xsl:template match="hyperlink">
  750. <xsl:param name="posId"/>
  751. <xsl:param name="conditional"/>
  752. <xsl:variable name="countType">
  753. <xsl:value-of select="count(../hyperlink)"/>
  754. </xsl:variable>
  755. <xsl:variable name="index">
  756. <xsl:value-of select="1 + count(preceding-sibling::hyperlink)"/>
  757. </xsl:variable>
  758. <item>
  759. <posId>
  760. <xsl:choose>
  761. <xsl:when test="$countType &gt; 1">
  762. <xsl:value-of select="concat($posId,'/hyperlink[',$index,']')"/>
  763. </xsl:when>
  764. <xsl:otherwise>
  765. <xsl:value-of select="concat($posId,'/hyperlink')"/>
  766. </xsl:otherwise>
  767. </xsl:choose>
  768. </posId>
  769. <conditional>
  770. <xsl:choose>
  771. <xsl:when test="./conditionalRender">true</xsl:when>
  772. <xsl:otherwise>
  773. <xsl:value-of select="$conditional"/>
  774. </xsl:otherwise>
  775. </xsl:choose>
  776. </conditional>
  777. <MHyperlink>
  778. <xsl:if test="@name">
  779. <rdsCM:id>
  780. <xsl:value-of select="@name"/>
  781. </rdsCM:id>
  782. </xsl:if>
  783. </MHyperlink>
  784. </item>
  785. </xsl:template>
  786. <xsl:template match="button">
  787. <!--Not yet handled-->
  788. </xsl:template>
  789. <xsl:template match="promptButton">
  790. <!--Not yet handled-->
  791. </xsl:template>
  792. <xsl:template match="HTMLItem">
  793. <xsl:param name="posId"/>
  794. <xsl:param name="conditional"/>
  795. <xsl:variable name="countType">
  796. <xsl:value-of select="count(../HTMLItem)"/>
  797. </xsl:variable>
  798. <xsl:variable name="index">
  799. <xsl:value-of select="1 + count(preceding-sibling::HTMLItem)"/>
  800. </xsl:variable>
  801. <item>
  802. <posId>
  803. <xsl:choose>
  804. <xsl:when test="$countType &gt; 1">
  805. <xsl:value-of select="concat($posId,'/HTMLItem[',$index,']')"/>
  806. </xsl:when>
  807. <xsl:otherwise>
  808. <xsl:value-of select="concat($posId,'/HTMLItem')"/>
  809. </xsl:otherwise>
  810. </xsl:choose>
  811. </posId>
  812. <conditional>
  813. <xsl:choose>
  814. <xsl:when test="./conditionalRender">true</xsl:when>
  815. <xsl:otherwise>
  816. <xsl:value-of select="$conditional"/>
  817. </xsl:otherwise>
  818. </xsl:choose>
  819. </conditional>
  820. <MHTML>
  821. <xsl:if test="@name">
  822. <rdsCM:id>
  823. <xsl:value-of select="@name"/>
  824. </rdsCM:id>
  825. </xsl:if>
  826. </MHTML>
  827. </item>
  828. </xsl:template>
  829. <xsl:template match="richTextItem">
  830. <xsl:param name="posId"/>
  831. <xsl:param name="conditional"/>
  832. <xsl:variable name="countType">
  833. <xsl:value-of select="count(../richTextItem)"/>
  834. </xsl:variable>
  835. <xsl:variable name="index">
  836. <xsl:value-of select="1 + count(preceding-sibling::richTextItem)"/>
  837. </xsl:variable>
  838. <item>
  839. <posId>
  840. <xsl:choose>
  841. <xsl:when test="$countType &gt; 1">
  842. <xsl:value-of select="concat($posId,'/richTextItem[',$index,']')"/>
  843. </xsl:when>
  844. <xsl:otherwise>
  845. <xsl:value-of select="concat($posId,'/richTextItem')"/>
  846. </xsl:otherwise>
  847. </xsl:choose>
  848. </posId>
  849. <conditional>
  850. <xsl:choose>
  851. <xsl:when test="./conditionalRender">true</xsl:when>
  852. <xsl:otherwise>
  853. <xsl:value-of select="$conditional"/>
  854. </xsl:otherwise>
  855. </xsl:choose>
  856. </conditional>
  857. <MRichText>
  858. <xsl:if test="@name">
  859. <rdsCM:id>
  860. <xsl:value-of select="@name"/>
  861. </rdsCM:id>
  862. </xsl:if>
  863. </MRichText>
  864. </item>
  865. </xsl:template>
  866. <xsl:template match="bookmark">
  867. <xsl:param name="posId"/>
  868. <xsl:param name="conditional"/>
  869. <xsl:variable name="countType">
  870. <xsl:value-of select="count(../bookmark)"/>
  871. </xsl:variable>
  872. <xsl:variable name="index">
  873. <xsl:value-of select="1 + count(preceding-sibling::bookmark)"/>
  874. </xsl:variable>
  875. <item>
  876. <posId>
  877. <xsl:choose>
  878. <xsl:when test="$countType &gt; 1">
  879. <xsl:value-of select="concat($posId,'/bookmark[',$index,']')"/>
  880. </xsl:when>
  881. <xsl:otherwise>
  882. <xsl:value-of select="concat($posId,'/bookmark')"/>
  883. </xsl:otherwise>
  884. </xsl:choose>
  885. </posId>
  886. <conditional>
  887. <xsl:choose>
  888. <xsl:when test="./conditionalRender">true</xsl:when>
  889. <xsl:otherwise>
  890. <xsl:value-of select="$conditional"/>
  891. </xsl:otherwise>
  892. </xsl:choose>
  893. </conditional>
  894. <MBookmark>
  895. <xsl:if test="@name">
  896. <rdsCM:id>
  897. <xsl:value-of select="@name"/>
  898. </rdsCM:id>
  899. </xsl:if>
  900. </MBookmark>
  901. </item>
  902. </xsl:template>
  903. <xsl:template match="TOCEntry">
  904. <xsl:param name="posId"/>
  905. <xsl:param name="conditional"/>
  906. <xsl:variable name="countType">
  907. <xsl:value-of select="count(../TOCEntry)"/>
  908. </xsl:variable>
  909. <xsl:variable name="index">
  910. <xsl:value-of select="1 + count(preceding-sibling::TOCEntry)"/>
  911. </xsl:variable>
  912. <item>
  913. <posId>
  914. <xsl:choose>
  915. <xsl:when test="$countType &gt; 1">
  916. <xsl:value-of select="concat($posId,'/TOCEntry[',$index,']')"/>
  917. </xsl:when>
  918. <xsl:otherwise>
  919. <xsl:value-of select="concat($posId,'/TOCEntry')"/>
  920. </xsl:otherwise>
  921. </xsl:choose>
  922. </posId>
  923. <!-- TOCEntry items are also mapped to bookmark object -->
  924. <!-- Note: neither TOCEntry nor bookmark have name attrbitues, so id will be empty -->
  925. <conditional>
  926. <xsl:choose>
  927. <xsl:when test="./conditionalRender">true</xsl:when>
  928. <xsl:otherwise>
  929. <xsl:value-of select="$conditional"/>
  930. </xsl:otherwise>
  931. </xsl:choose>
  932. </conditional>
  933. <MBookmark>
  934. <xsl:if test="@name">
  935. <rdsCM:id>
  936. <xsl:value-of select="@name"/>
  937. </rdsCM:id>
  938. </xsl:if>
  939. </MBookmark>
  940. </item>
  941. </xsl:template>
  942. <xsl:template match="fieldset">
  943. <xsl:param name="posId"/>
  944. <xsl:param name="conditional"/>
  945. <xsl:variable name="countType">
  946. <xsl:value-of select="count(../fieldset)"/>
  947. </xsl:variable>
  948. <xsl:variable name="index">
  949. <xsl:value-of select="1 + count(preceding-sibling::fieldset)"/>
  950. </xsl:variable>
  951. <xsl:apply-templates select="contents/*"/>
  952. </xsl:template>
  953. <xsl:template match="conditionalBlocks">
  954. <xsl:param name="posId"/>
  955. <xsl:variable name="countType">
  956. <xsl:value-of select="count(../conditionalBlocks)"/>
  957. </xsl:variable>
  958. <xsl:variable name="index">
  959. <xsl:value-of select="1 + count(preceding-sibling::conditionalBlocks)"/>
  960. </xsl:variable>
  961. <xsl:apply-templates select="./conditionalBlockDefault/contents/*">
  962. <xsl:with-param name="posId">
  963. <xsl:value-of select="concat($posId,'/conditionalBlockDefault/contents')"/>
  964. </xsl:with-param>
  965. <xsl:with-param name="conditional">true</xsl:with-param>
  966. </xsl:apply-templates>
  967. <xsl:for-each select="./conditionalBlockCases/conditionalBlock">
  968. <xsl:apply-templates select="./contents/*">
  969. <xsl:with-param name="posId">
  970. <xsl:choose>
  971. <xsl:when test="count(../conditionalBlock) &gt; 1">
  972. <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock[',1 + count(preceding-sibling::conditionalBlock),'/contents')"/>
  973. </xsl:when>
  974. <xsl:otherwise>
  975. <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock/contents')"/>
  976. </xsl:otherwise>
  977. </xsl:choose>
  978. </xsl:with-param>
  979. <xsl:with-param name="conditional">true</xsl:with-param>
  980. </xsl:apply-templates>
  981. </xsl:for-each>
  982. </xsl:template>
  983. <xsl:template match="layoutComponentRef">
  984. <xsl:param name="conditional"/>
  985. <xsl:param name="posId"/>
  986. <xsl:variable name="countType">
  987. <xsl:value-of select="count(../layoutComponentRef)"/>
  988. </xsl:variable>
  989. <xsl:variable name="index">
  990. <xsl:value-of select="1 + count(preceding-sibling::layoutComponentRef)"/>
  991. </xsl:variable>
  992. <!-- LCR will be handled in next version -->
  993. </xsl:template>
  994. <xsl:template match="CMMMap">
  995. <xsl:param name="posId"/>
  996. <xsl:param name="conditional"/>
  997. <xsl:variable name="countType">
  998. <xsl:value-of select="count(../CMMMap)"/>
  999. </xsl:variable>
  1000. <xsl:variable name="index">
  1001. <xsl:value-of select="1 + count(preceding-sibling::CMMMap)"/>
  1002. </xsl:variable>
  1003. <item>
  1004. <posId>
  1005. <xsl:choose>
  1006. <xsl:when test="$countType &gt; 1">
  1007. <xsl:value-of select="concat($posId,'/CMMMap[',$index,']')"/>
  1008. </xsl:when>
  1009. <xsl:otherwise>
  1010. <xsl:value-of select="concat($posId,'/CMMMap')"/>
  1011. </xsl:otherwise>
  1012. </xsl:choose>
  1013. </posId>
  1014. <conditional>
  1015. <xsl:choose>
  1016. <xsl:when test="./conditionalRender">true</xsl:when>
  1017. <xsl:otherwise>
  1018. <xsl:value-of select="$conditional"/>
  1019. </xsl:otherwise>
  1020. </xsl:choose>
  1021. </conditional>
  1022. <MImage>
  1023. <xsl:if test="@cmmID">
  1024. <rdsCM:id>
  1025. <xsl:value-of select="@cmmID"/>
  1026. </rdsCM:id>
  1027. </xsl:if>
  1028. </MImage>
  1029. </item>
  1030. </xsl:template>
  1031. <xsl:template match="asOfTime">
  1032. <!--Not yet handled-->
  1033. </xsl:template>
  1034. <xsl:template match="pieChart | paretoChart | scatterChart | polarChart | radarChart | progressiveChart | combinationChart | bubbleChart | threeDCombinationChart | threeDScatterChart | gaugeChart | mapChart | metricsChart | marimekkoChart | winLossChart | v2_combinationChart | v2_scatterChart | v2_pieChart | v2_gaugeChart | v2_matrixChart | v2_progressiveChart | v2_paretoChart | v2_bubbleChart | v2_repeaterChart | v2_bulletChart">
  1035. <xsl:param name="posId"/>
  1036. <xsl:param name="conditional"/>
  1037. <item>
  1038. <posId>
  1039. <xsl:choose>
  1040. <xsl:when test="name() = 'pieChart'">
  1041. <xsl:choose>
  1042. <xsl:when test="count(../pieChart) &gt; 1">
  1043. <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::pieChart),']')"/>
  1044. </xsl:when>
  1045. <xsl:otherwise>
  1046. <xsl:value-of select="concat($posId,'/pieChart')"/>
  1047. </xsl:otherwise>
  1048. </xsl:choose>
  1049. </xsl:when>
  1050. <xsl:when test="name() = 'paretoChart'">
  1051. <xsl:choose>
  1052. <xsl:when test="count(../paretoChart) &gt; 1">
  1053. <xsl:value-of select="concat($posId,'/paretoChart[',1 + count(preceding-sibling::paretoChart),']')"/>
  1054. </xsl:when>
  1055. <xsl:otherwise>
  1056. <xsl:value-of select="concat($posId,'/paretoChart')"/>
  1057. </xsl:otherwise>
  1058. </xsl:choose>
  1059. </xsl:when>
  1060. <xsl:when test="name() = 'scatterChart'">
  1061. <xsl:choose>
  1062. <xsl:when test="count(../scatterChart) &gt; 1">
  1063. <xsl:value-of select="concat($posId,'/scatterChart[',1 + count(preceding-sibling::scatterChart),']')"/>
  1064. </xsl:when>
  1065. <xsl:otherwise>
  1066. <xsl:value-of select="concat($posId,'/scatterChart')"/>
  1067. </xsl:otherwise>
  1068. </xsl:choose>
  1069. </xsl:when>
  1070. <xsl:when test="name() = 'polarChart'">
  1071. <xsl:choose>
  1072. <xsl:when test="count(../polarChart) &gt; 1">
  1073. <xsl:value-of select="concat($posId,'/polarChart[',1 + count(preceding-sibling::polarChart),']')"/>
  1074. </xsl:when>
  1075. <xsl:otherwise>
  1076. <xsl:value-of select="concat($posId,'/polarChart')"/>
  1077. </xsl:otherwise>
  1078. </xsl:choose>
  1079. </xsl:when>
  1080. <xsl:when test="name() = 'radarChart'">
  1081. <xsl:choose>
  1082. <xsl:when test="count(../radarChart) &gt; 1">
  1083. <xsl:value-of select="concat($posId,'/radarChart[',1 + count(preceding-sibling::radarChart),']')"/>
  1084. </xsl:when>
  1085. <xsl:otherwise>
  1086. <xsl:value-of select="concat($posId,'/radarChart')"/>
  1087. </xsl:otherwise>
  1088. </xsl:choose>
  1089. </xsl:when>
  1090. <xsl:when test="name() = 'progressiveChart'">
  1091. <xsl:choose>
  1092. <xsl:when test="count(../progressiveChart) &gt; 1">
  1093. <xsl:value-of select="concat($posId,'/progressiveChart[',1 + count(preceding-sibling::progressiveChart),']')"/>
  1094. </xsl:when>
  1095. <xsl:otherwise>
  1096. <xsl:value-of select="concat($posId,'/progressiveChart')"/>
  1097. </xsl:otherwise>
  1098. </xsl:choose>
  1099. </xsl:when>
  1100. <xsl:when test="name() = 'combinationChart'">
  1101. <xsl:choose>
  1102. <xsl:when test="count(../combinationChart) &gt; 1">
  1103. <xsl:value-of select="concat($posId,'/combinationChart[',1 + count(preceding-sibling::combinationChart),']')"/>
  1104. </xsl:when>
  1105. <xsl:otherwise>
  1106. <xsl:value-of select="concat($posId,'/combinationChart')"/>
  1107. </xsl:otherwise>
  1108. </xsl:choose>
  1109. </xsl:when>
  1110. <xsl:when test="name() = 'bubbleChart'">
  1111. <xsl:choose>
  1112. <xsl:when test="count(../bubbleChart) &gt; 1">
  1113. <xsl:value-of select="concat($posId,'/bubbleChart[',1 + count(preceding-sibling::bubbleChart),']')"/>
  1114. </xsl:when>
  1115. <xsl:otherwise>
  1116. <xsl:value-of select="concat($posId,'/bubbleChart')"/>
  1117. </xsl:otherwise>
  1118. </xsl:choose>
  1119. </xsl:when>
  1120. <xsl:when test="name() = 'threeDCombinationChart'">
  1121. <xsl:choose>
  1122. <xsl:when test="count(../threeDCombinationChart) &gt; 1">
  1123. <xsl:value-of select="concat($posId,'/threeDCombinationChart[',1 + count(preceding-sibling::threeDCombinationChart),']')"/>
  1124. </xsl:when>
  1125. <xsl:otherwise>
  1126. <xsl:value-of select="concat($posId,'/threeDCombinationChart')"/>
  1127. </xsl:otherwise>
  1128. </xsl:choose>
  1129. </xsl:when>
  1130. <xsl:when test="name() = 'threeDScatterChart'">
  1131. <xsl:choose>
  1132. <xsl:when test="count(../threeDScatterChart) &gt; 1">
  1133. <xsl:value-of select="concat($posId,'/threeDScatterChart[',1 + count(preceding-sibling::threeDScatterChart),']')"/>
  1134. </xsl:when>
  1135. <xsl:otherwise>
  1136. <xsl:value-of select="concat($posId,'/threeDScatterChart')"/>
  1137. </xsl:otherwise>
  1138. </xsl:choose>
  1139. </xsl:when>
  1140. <xsl:when test="name() = 'gaugeChart'">
  1141. <xsl:choose>
  1142. <xsl:when test="count(../gaugeChart) &gt; 1">
  1143. <xsl:value-of select="concat($posId,'/gaugeChart[',1 + count(preceding-sibling::gaugeChart),']')"/>
  1144. </xsl:when>
  1145. <xsl:otherwise>
  1146. <xsl:value-of select="concat($posId,'/gaugeChart')"/>
  1147. </xsl:otherwise>
  1148. </xsl:choose>
  1149. </xsl:when>
  1150. <xsl:when test="name() = 'mapChart'">
  1151. <xsl:choose>
  1152. <xsl:when test="count(../mapChart) &gt; 1">
  1153. <xsl:value-of select="concat($posId,'/mapChart[',1 + count(preceding-sibling::mapChart),']')"/>
  1154. </xsl:when>
  1155. <xsl:otherwise>
  1156. <xsl:value-of select="concat($posId,'/mapChart')"/>
  1157. </xsl:otherwise>
  1158. </xsl:choose>
  1159. </xsl:when>
  1160. <xsl:when test="name() = 'metricsChart'">
  1161. <xsl:choose>
  1162. <xsl:when test="count(../metricsChart) &gt; 1">
  1163. <xsl:value-of select="concat($posId,'/metricsChart[',1 + count(preceding-sibling::metricsChart),']')"/>
  1164. </xsl:when>
  1165. <xsl:otherwise>
  1166. <xsl:value-of select="concat($posId,'/metricsChart')"/>
  1167. </xsl:otherwise>
  1168. </xsl:choose>
  1169. </xsl:when>
  1170. <xsl:when test="name() = 'marimekkoChart'">
  1171. <xsl:choose>
  1172. <xsl:when test="count(../marimekkoChart) &gt; 1">
  1173. <xsl:value-of select="concat($posId,'/marimekkoChart[',1 + count(preceding-sibling::marimekkoChart),']')"/>
  1174. </xsl:when>
  1175. <xsl:otherwise>
  1176. <xsl:value-of select="concat($posId,'/marimekkoChart')"/>
  1177. </xsl:otherwise>
  1178. </xsl:choose>
  1179. </xsl:when>
  1180. <xsl:when test="name() = 'winLossChart'">
  1181. <xsl:choose>
  1182. <xsl:when test="count(../winLossChart) &gt; 1">
  1183. <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::winLossChart),']')"/>
  1184. </xsl:when>
  1185. <xsl:otherwise>
  1186. <xsl:value-of select="concat($posId,'/winLossChart')"/>
  1187. </xsl:otherwise>
  1188. </xsl:choose>
  1189. </xsl:when>
  1190. <xsl:when test="name() = 'v2_combinationChart'">
  1191. <xsl:choose>
  1192. <xsl:when test="count(../v2_combinationChart) &gt; 1">
  1193. <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::v2_combinationChart),']')"/>
  1194. </xsl:when>
  1195. <xsl:otherwise>
  1196. <xsl:value-of select="concat($posId,'/v2_combinationChart')"/>
  1197. </xsl:otherwise>
  1198. </xsl:choose>
  1199. </xsl:when>
  1200. <xsl:when test="name() = 'v2_scatterChart'">
  1201. <xsl:choose>
  1202. <xsl:when test="count(../v2_scatterChart) &gt; 1">
  1203. <xsl:value-of select="concat($posId,'/v2_scatterChart[',1 + count(preceding-sibling::v2_scatterChart),']')"/>
  1204. </xsl:when>
  1205. <xsl:otherwise>
  1206. <xsl:value-of select="concat($posId,'/v2_schatterChart')"/>
  1207. </xsl:otherwise>
  1208. </xsl:choose>
  1209. </xsl:when>
  1210. <xsl:when test="name() = 'v2_pieChart'">
  1211. <xsl:choose>
  1212. <xsl:when test="count(../v2_combinationChart) &gt; 1">
  1213. <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::v2_pieChart),']')"/>
  1214. </xsl:when>
  1215. <xsl:otherwise>
  1216. <xsl:value-of select="concat($posId,'/v2_pieChart')"/>
  1217. </xsl:otherwise>
  1218. </xsl:choose>
  1219. </xsl:when>
  1220. <xsl:when test="name() = 'v2_guageChart'">
  1221. <xsl:choose>
  1222. <xsl:when test="count(../v2_guageChart) &gt; 1">
  1223. <xsl:value-of select="concat($posId,'/v2_guageChart[',1 + count(preceding-sibling::v2_guageChart),']')"/>
  1224. </xsl:when>
  1225. <xsl:otherwise>
  1226. <xsl:value-of select="concat($posId,'/v2_guageChart')"/>
  1227. </xsl:otherwise>
  1228. </xsl:choose>
  1229. </xsl:when>
  1230. <xsl:when test="name() = 'v2_matrixChart'">
  1231. <xsl:choose>
  1232. <xsl:when test="count(../v2_matrixChart) &gt; 1">
  1233. <xsl:value-of select="concat($posId,'/v2_matrixChart[',1 + count(preceding-sibling::v2_matrixChart),']')"/>
  1234. </xsl:when>
  1235. <xsl:otherwise>
  1236. <xsl:value-of select="concat($posId,'/v2_matrixChart')"/>
  1237. </xsl:otherwise>
  1238. </xsl:choose>
  1239. </xsl:when>
  1240. <xsl:when test="name() = 'v2_progressiveChart'">
  1241. <xsl:choose>
  1242. <xsl:when test="count(../v2_progressiveChart) &gt; 1">
  1243. <xsl:value-of select="concat($posId,'/v2_progressiveChart[',1 + count(preceding-sibling::v2_progressiveChart),']')"/>
  1244. </xsl:when>
  1245. <xsl:otherwise>
  1246. <xsl:value-of select="concat($posId,'/v2_progressiveChart')"/>
  1247. </xsl:otherwise>
  1248. </xsl:choose>
  1249. </xsl:when>
  1250. <xsl:when test="name() = 'v2_paretoChart'">
  1251. <xsl:choose>
  1252. <xsl:when test="count(../v2_paretoChart) &gt; 1">
  1253. <xsl:value-of select="concat($posId,'/v2_paretoChart[',1 + count(preceding-sibling::v2_paretoChart),']')"/>
  1254. </xsl:when>
  1255. <xsl:otherwise>
  1256. <xsl:value-of select="concat($posId,'/v2_paretoChart')"/>
  1257. </xsl:otherwise>
  1258. </xsl:choose>
  1259. </xsl:when>
  1260. <xsl:when test="name() = 'v2_bubbleChart'">
  1261. <xsl:choose>
  1262. <xsl:when test="count(../v2_bubbleChart) &gt; 1">
  1263. <xsl:value-of select="concat($posId,'/v2_bubbleChart[',1 + count(preceding-sibling::v2_bubbleChart),']')"/>
  1264. </xsl:when>
  1265. <xsl:otherwise>
  1266. <xsl:value-of select="concat($posId,'/v2_bubbleChart')"/>
  1267. </xsl:otherwise>
  1268. </xsl:choose>
  1269. </xsl:when>
  1270. <xsl:when test="name() = 'v2_repeaterChart'">
  1271. <xsl:choose>
  1272. <xsl:when test="count(../v2_repeaterChart) &gt; 1">
  1273. <xsl:value-of select="concat($posId,'/v2_repeaterChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
  1274. </xsl:when>
  1275. <xsl:otherwise>
  1276. <xsl:value-of select="concat($posId,'/v2_repeaterChart')"/>
  1277. </xsl:otherwise>
  1278. </xsl:choose>
  1279. </xsl:when>
  1280. <xsl:when test="name() = 'v2_bubbleChart'">
  1281. <xsl:choose>
  1282. <xsl:when test="count(../v2_bubbleChart) &gt; 1">
  1283. <xsl:value-of select="concat($posId,'/v2_bubbleChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
  1284. </xsl:when>
  1285. <xsl:otherwise>
  1286. <xsl:value-of select="concat($posId,'/v2_bubbleChart')"/>
  1287. </xsl:otherwise>
  1288. </xsl:choose>
  1289. </xsl:when>
  1290. <xsl:otherwise>
  1291. <xsl:value-of select="concat($posId,'/unknownChartType')"/>
  1292. </xsl:otherwise>
  1293. </xsl:choose>
  1294. </posId>
  1295. <conditional>
  1296. <xsl:choose>
  1297. <xsl:when test="./conditionalRender">true</xsl:when>
  1298. <xsl:otherwise>
  1299. <xsl:value-of select="$conditional"/>
  1300. </xsl:otherwise>
  1301. </xsl:choose>
  1302. </conditional>
  1303. <MChart>
  1304. <xsl:if test="@name">
  1305. <rdsCM:id>
  1306. <xsl:value-of select="@name"/>
  1307. </rdsCM:id>
  1308. </xsl:if>
  1309. </MChart>
  1310. </item>
  1311. </xsl:template>
  1312. <xsl:template match="singleton">
  1313. <xsl:param name="posId"/>
  1314. <xsl:param name="conditional"/>
  1315. <xsl:variable name="countType">
  1316. <xsl:value-of select="count(../singleton)"/>
  1317. </xsl:variable>
  1318. <xsl:variable name="index">
  1319. <xsl:value-of select="1 + count(preceding-sibling::singleton)"/>
  1320. </xsl:variable>
  1321. <xsl:apply-templates select="contents/*">
  1322. <xsl:with-param name="posId">
  1323. <xsl:choose>
  1324. <xsl:when test="$countType &gt; 1">
  1325. <xsl:value-of select="concat($posId,'/singleton[',$index,']/contents')"/>
  1326. </xsl:when>
  1327. <xsl:otherwise>
  1328. <xsl:value-of select="concat($posId,'/singleton/contents')"/>
  1329. </xsl:otherwise>
  1330. </xsl:choose>
  1331. </xsl:with-param>
  1332. <xsl:with-param name="conditional"><xsl:value-of select="$conditional"/></xsl:with-param>
  1333. </xsl:apply-templates>
  1334. </xsl:template>
  1335. <xsl:template match="*">
  1336. <!--Unknown element. Ignore-->
  1337. </xsl:template>
  1338. </xsl:stylesheet>