layout.xsl 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163
  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. <layout>
  12. <xsl:apply-templates select="/report/layouts/layout/reportPages/*">
  13. <xsl:with-param name="posId">./layouts/layout/reportPages</xsl:with-param>
  14. </xsl:apply-templates>
  15. <xsl:apply-templates select="/report/classStyles/*"/>
  16. </layout>
  17. </xsl:template>
  18. <xsl:template name="page">
  19. <xsl:param name="posId"/>
  20. <xsl:variable name="countType">
  21. <xsl:value-of select="count(../page)"/>
  22. </xsl:variable>
  23. <xsl:variable name="index">
  24. <xsl:value-of select="1 + count(preceding-sibling::page)"/>
  25. </xsl:variable>
  26. <page>
  27. <xsl:if test="@name">
  28. <rdsCM:id>
  29. <xsl:value-of select="@name"/>
  30. </rdsCM:id>
  31. </xsl:if>
  32. <posId>
  33. <xsl:choose>
  34. <xsl:when test="$countType &gt; 1">
  35. <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']')"/>
  36. </xsl:when>
  37. <xsl:otherwise>./layouts/layout/reportPages/page</xsl:otherwise>
  38. </xsl:choose>
  39. </posId>
  40. <xsl:if test="pageHeader/contents/*">
  41. <header>
  42. <xsl:apply-templates select="pageHeader/contents/*">
  43. <xsl:with-param name="posId">
  44. <xsl:choose>
  45. <xsl:when test="$countType &gt; 1">
  46. <xsl:value-of select="concat($posId, '/page[',$index,']/pageHeader/contents')"/>
  47. </xsl:when>
  48. <xsl:otherwise>
  49. <xsl:value-of select="concat($posId,'/page/pageHeader/contents')"/>
  50. </xsl:otherwise>
  51. </xsl:choose>
  52. </xsl:with-param>
  53. <xsl:with-param name="conditional">false</xsl:with-param>
  54. </xsl:apply-templates>
  55. </header>
  56. </xsl:if>
  57. <xsl:if test="pageBody/contents/*">
  58. <body>
  59. <xsl:apply-templates select="pageBody/contents/*">
  60. <xsl:with-param name="posId">
  61. <xsl:choose>
  62. <xsl:when test="$countType &gt; 1">
  63. <xsl:value-of select="concat($posId, '/page[',$index,']/pageBody/contents')"/>
  64. </xsl:when>
  65. <xsl:otherwise>
  66. <xsl:value-of select="concat($posId,'/page/pageBody/contents')"/>
  67. </xsl:otherwise>
  68. </xsl:choose>
  69. </xsl:with-param>
  70. <xsl:with-param name="conditional">false</xsl:with-param>
  71. </xsl:apply-templates>
  72. </body>
  73. </xsl:if>
  74. <xsl:if test="pageFooter/contents/*">
  75. <footer>
  76. <xsl:apply-templates select="pageFooter/contents/*">
  77. <xsl:with-param name="posId">
  78. <xsl:choose>
  79. <xsl:when test="$countType &gt; 1">
  80. <xsl:value-of select="concat($posId, '/page[',$index,']/pageFooter/contents')"/>
  81. </xsl:when>
  82. <xsl:otherwise>
  83. <xsl:value-of select="concat($posId,'/page/pageFooter/contents')"/>
  84. </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="page">
  94. <xsl:param name="posId"/>
  95. <xsl:call-template name="page">
  96. <xsl:with-param name="posId" select="$posId"/>
  97. </xsl:call-template>
  98. </xsl:template>
  99. <xsl:template match="page[pageSections]">
  100. <xsl:param name="posId"/>
  101. <xsl:variable name="countMembers" select="count(pageSections/pageSection/pageSectionDefinition/dmMembers/dmMember)"/>
  102. <pageGroup>
  103. <xsl:choose>
  104. <xsl:when test="$countMembers = 1">
  105. <rdsCM:id>
  106. <xsl:value-of select="concat('children(', pageSections/pageSection/pageSectionDefinition/dmMembers/dmMember/itemCaption, ')')"/>
  107. </rdsCM:id>
  108. </xsl:when>
  109. <xsl:otherwise>
  110. <rdsCM:id>
  111. <xsl:value-of select="concat(pageSections/pageSection/dmHierarchy/itemCaption, ' (list)')"/>
  112. </rdsCM:id>
  113. </xsl:otherwise>
  114. </xsl:choose>
  115. <xsl:call-template name="page">
  116. <xsl:with-param name="posId" select="$posId"/>
  117. </xsl:call-template>
  118. </pageGroup>
  119. </xsl:template>
  120. <xsl:template match="pageSet">
  121. <xsl:variable name="countType">
  122. <xsl:value-of select="count(../pageSet)"/>
  123. </xsl:variable>
  124. <xsl:variable name="index">
  125. <xsl:value-of select="1 + count(preceding-sibling::pageSet)"/>
  126. </xsl:variable>
  127. <xsl:apply-templates select="pageOverallGroup/headerPages/*">
  128. <xsl:with-param name="posId">
  129. <xsl:choose>
  130. <xsl:when test="$countType &gt; 1">
  131. <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageOverallGroup/headerPages')"/>
  132. </xsl:when>
  133. <xsl:otherwise>./layouts/layout/reportPages/pageSet/pageOverallGroup/headerPages</xsl:otherwise>
  134. </xsl:choose>
  135. </xsl:with-param>
  136. <xsl:with-param name="conditional">false</xsl:with-param>
  137. </xsl:apply-templates>
  138. <xsl:if test="count(pageGroups) = 0">
  139. <xsl:apply-templates select="detailPages/*">
  140. <xsl:with-param name="posId">
  141. <xsl:choose>
  142. <xsl:when test="$countType &gt; 1">
  143. <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/detailPages')"/>
  144. </xsl:when>
  145. <xsl:otherwise>./layouts/layout/reportPages/pageSet/detailPages</xsl:otherwise>
  146. </xsl:choose>
  147. </xsl:with-param>
  148. </xsl:apply-templates>
  149. </xsl:if>
  150. <xsl:apply-templates select="pageGroups/*">
  151. <xsl:with-param name="posId">
  152. <xsl:choose>
  153. <xsl:when test="$countType &gt; 1">
  154. <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageGroups')"/>
  155. </xsl:when>
  156. <xsl:otherwise>./layouts/layout/reportPages/pageSet/pageGroups</xsl:otherwise>
  157. </xsl:choose>
  158. </xsl:with-param>
  159. <xsl:with-param name="conditional">false</xsl:with-param>
  160. <xsl:with-param name="detailPages" select="detailPages/*"/>
  161. </xsl:apply-templates>
  162. <xsl:apply-templates select="pageOverallGroup/footerPages/*">
  163. <xsl:with-param name="posId">
  164. <xsl:choose>
  165. <xsl:when test="$countType &gt; 1">
  166. <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageOverallGroup/footerPages')"/>
  167. </xsl:when>
  168. <xsl:otherwise>./layouts/layout/reportPages/pageSet/pageOverallGroup/footerPages</xsl:otherwise>
  169. </xsl:choose>
  170. </xsl:with-param>
  171. <xsl:with-param name="conditional">false</xsl:with-param>
  172. </xsl:apply-templates>
  173. </xsl:template>
  174. <xsl:template match="pageGroup">
  175. <xsl:param name="posId"/>
  176. <xsl:param name="conditional"/>
  177. <xsl:param name="detailPages"/>
  178. <xsl:variable name="countType">
  179. <xsl:value-of select="count(../table)"/>
  180. </xsl:variable>
  181. <xsl:variable name="index">
  182. <xsl:value-of select="1 + count(preceding-sibling::pageGroup)"/>
  183. </xsl:variable>
  184. <pageGroup>
  185. <xsl:if test="@refDataItem">
  186. <rdsCM:id>
  187. <xsl:value-of select="@refDataItem"/>
  188. </rdsCM:id>
  189. </xsl:if>
  190. <xsl:apply-templates select="headerPages/*">
  191. <xsl:with-param name="posId">
  192. <xsl:choose>
  193. <xsl:when test="$countType &gt; 1">
  194. <xsl:value-of select="concat($posId,'/headerPages[',$index,']')"/>
  195. </xsl:when>
  196. <xsl:otherwise>
  197. <xsl:value-of select="concat($posId,'/headerPages')"/>
  198. </xsl:otherwise>
  199. </xsl:choose>
  200. </xsl:with-param>
  201. <xsl:with-param name="conditional">
  202. <xsl:value-of select="$conditional"/>
  203. </xsl:with-param>
  204. </xsl:apply-templates>
  205. <xsl:apply-templates select="$detailPages">
  206. <xsl:with-param name="posId">
  207. <xsl:choose>
  208. <xsl:when test="$countType &gt; 1">
  209. <xsl:value-of select="concat($posId,'/headerPages[',$index,']')"/>
  210. </xsl:when>
  211. <xsl:otherwise>
  212. <xsl:value-of select="concat($posId,'/headerPages')"/>
  213. </xsl:otherwise>
  214. </xsl:choose>
  215. </xsl:with-param>
  216. <xsl:with-param name="conditional">
  217. <xsl:value-of select="$conditional"/>
  218. </xsl:with-param>
  219. </xsl:apply-templates>
  220. <xsl:apply-templates select="footerPages/*">
  221. <xsl:with-param name="posId">
  222. <xsl:choose>
  223. <xsl:when test="$countType &gt; 1">
  224. <xsl:value-of select="concat($posId,'/footerPages[',$index,']')"/>
  225. </xsl:when>
  226. <xsl:otherwise>
  227. <xsl:value-of select="concat($posId,'/footerPages')"/>
  228. </xsl:otherwise>
  229. </xsl:choose>
  230. </xsl:with-param>
  231. <xsl:with-param name="conditional">
  232. <xsl:value-of select="$conditional"/>
  233. </xsl:with-param>
  234. </xsl:apply-templates>
  235. </pageGroup>
  236. </xsl:template>
  237. <xsl:template match="table">
  238. <xsl:param name="posId"/>
  239. <xsl:variable name="countType">
  240. <xsl:value-of select="count(../table)"/>
  241. </xsl:variable>
  242. <xsl:variable name="index">
  243. <xsl:value-of select="1 + count(preceding-sibling::table)"/>
  244. </xsl:variable>
  245. <item>
  246. <LTable>
  247. <xsl:apply-templates select="tableRows/tableRow">
  248. <xsl:with-param name="posId">
  249. <xsl:choose>
  250. <xsl:when test="$countType &gt; 1">
  251. <xsl:value-of select="concat($posId,'/table[',$index,']')"/>
  252. </xsl:when>
  253. <xsl:otherwise>
  254. <xsl:value-of select="concat($posId,'/table')"/>
  255. </xsl:otherwise>
  256. </xsl:choose>
  257. </xsl:with-param>
  258. </xsl:apply-templates>
  259. <xsl:if test="style/CSS">
  260. <CSSStyle>
  261. <xsl:value-of select="style/CSS/@value"/>
  262. </CSSStyle>
  263. </xsl:if>
  264. <xsl:apply-templates select="style/defaultStyles/*"/>
  265. </LTable>
  266. </item>
  267. </xsl:template>
  268. <xsl:template match="tableRow">
  269. <xsl:param name="posId"/>
  270. <xsl:variable name="countType">
  271. <xsl:value-of select="count(../tableRow)"/>
  272. </xsl:variable>
  273. <xsl:variable name="index">
  274. <xsl:value-of select="1 + count(preceding-sibling::tableRow)"/>
  275. </xsl:variable>
  276. <row>
  277. <xsl:apply-templates select="tableCells/tableCell">
  278. <xsl:with-param name="posId">
  279. <xsl:choose>
  280. <xsl:when test="$countType &gt; 1">
  281. <xsl:value-of select="concat($posId,'/tableRows/tableRow[',$index,']')"/>
  282. </xsl:when>
  283. <xsl:otherwise>
  284. <xsl:value-of select="concat($posId,'/tableRows/tableRow')"/>
  285. </xsl:otherwise>
  286. </xsl:choose>
  287. </xsl:with-param>
  288. </xsl:apply-templates>
  289. <xsl:if test="style/CSS">
  290. <CSSStyle>
  291. <xsl:value-of select="style/CSS/@value"/>
  292. </CSSStyle>
  293. </xsl:if>
  294. <xsl:apply-templates select="style/defaultStyles/*"/>
  295. </row>
  296. </xsl:template>
  297. <xsl:template match="tableCell">
  298. <xsl:param name="posId"/>
  299. <xsl:variable name="countType">
  300. <xsl:value-of select="count(../tableCell)"/>
  301. </xsl:variable>
  302. <xsl:variable name="index">
  303. <xsl:value-of select="1 + count(preceding-sibling::tableCell)"/>
  304. </xsl:variable>
  305. <cell>
  306. <xsl:if test="@colSpan">
  307. <colSpan>
  308. <xsl:value-of select="@colSpan"/>
  309. </colSpan>
  310. </xsl:if>
  311. <xsl:apply-templates select="contents/*">
  312. <xsl:with-param name="posId">
  313. <xsl:choose>
  314. <xsl:when test="$countType &gt; 1">
  315. <xsl:value-of select="concat($posId,'/tableCells/tableCell[',$index,']/contents')"/>
  316. </xsl:when>
  317. <xsl:otherwise>
  318. <xsl:value-of select="concat($posId,'/tableCells/tableCell/contents')"/>
  319. </xsl:otherwise>
  320. </xsl:choose>
  321. </xsl:with-param>
  322. </xsl:apply-templates>
  323. <xsl:if test="style/CSS">
  324. <CSSStyle>
  325. <xsl:value-of select="style/CSS/@value"/>
  326. </CSSStyle>
  327. </xsl:if>
  328. <xsl:apply-templates select="style/defaultStyles/*"/>
  329. </cell>
  330. </xsl:template>
  331. <xsl:template match="block">
  332. <xsl:param name="posId"/>
  333. <xsl:variable name="countType">
  334. <xsl:value-of select="count(../block)"/>
  335. </xsl:variable>
  336. <xsl:variable name="index">
  337. <xsl:value-of select="1 + count(preceding-sibling::block)"/>
  338. </xsl:variable>
  339. <item>
  340. <LContainer>
  341. <xsl:apply-templates select="contents/*">
  342. <xsl:with-param name="posId">
  343. <xsl:choose>
  344. <xsl:when test="$countType &gt; 1">
  345. <xsl:value-of select="concat($posId,'/block[',$index,']/contents')"/>
  346. </xsl:when>
  347. <xsl:otherwise>
  348. <xsl:value-of select="concat($posId,'/block/contents')"/>
  349. </xsl:otherwise>
  350. </xsl:choose>
  351. </xsl:with-param>
  352. </xsl:apply-templates>
  353. <xsl:if test="style/CSS">
  354. <CSSStyle>
  355. <xsl:value-of select="style/CSS/@value"/>
  356. </CSSStyle>
  357. </xsl:if>
  358. <xsl:apply-templates select="style/defaultStyles/*"/>
  359. </LContainer>
  360. </item>
  361. </xsl:template>
  362. <xsl:template match="list">
  363. <xsl:param name="posId"/>
  364. <xsl:variable name="countType">
  365. <xsl:value-of select="count(../list)"/>
  366. </xsl:variable>
  367. <xsl:variable name="index">
  368. <xsl:value-of select="1 + count(preceding-sibling::list)"/>
  369. </xsl:variable>
  370. <item>
  371. <LReference>
  372. <xsl:if test="@name">
  373. <rdsCM:id>
  374. <xsl:value-of select="@name"/>
  375. </rdsCM:id>
  376. </xsl:if>
  377. <posId>
  378. <xsl:choose>
  379. <xsl:when test="$countType &gt; 1">
  380. <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
  381. </xsl:when>
  382. <xsl:otherwise>
  383. <xsl:value-of select="concat($posId,'/list')"/>
  384. </xsl:otherwise>
  385. </xsl:choose>
  386. </posId>
  387. </LReference>
  388. </item>
  389. </xsl:template>
  390. <xsl:template match="TOC">
  391. <xsl:param name="posId"/>
  392. <xsl:variable name="countType">
  393. <xsl:value-of select="count(../TOC)"/>
  394. </xsl:variable>
  395. <xsl:variable name="index">
  396. <xsl:value-of select="1 + count(preceding-sibling::TOC)"/>
  397. </xsl:variable>
  398. <item>
  399. <LReference>
  400. <xsl:if test="@tocName">
  401. <rdsCM:id>
  402. <xsl:value-of select="@tocName"/>
  403. </rdsCM:id>
  404. </xsl:if>
  405. <posId>
  406. <xsl:choose>
  407. <xsl:when test="$countType &gt; 1">
  408. <xsl:value-of select="concat($posId,'/TOC[',$index,']')"/>
  409. </xsl:when>
  410. <xsl:otherwise>
  411. <xsl:value-of select="concat($posId,'/TOC')"/>
  412. </xsl:otherwise>
  413. </xsl:choose>
  414. </posId>
  415. </LReference>
  416. </item>
  417. </xsl:template>
  418. <xsl:template match="textItem">
  419. <xsl:param name="posId"/>
  420. <xsl:variable name="countType">
  421. <xsl:value-of select="count(../textItem)"/>
  422. </xsl:variable>
  423. <xsl:variable name="index">
  424. <xsl:value-of select="1 + count(preceding-sibling::textItem)"/>
  425. </xsl:variable>
  426. <item>
  427. <LReference>
  428. <xsl:if test="@name">
  429. <rdsCM:id>
  430. <xsl:value-of select="@name"/>
  431. </rdsCM:id>
  432. </xsl:if>
  433. <posId>
  434. <xsl:choose>
  435. <xsl:when test="$countType &gt; 1">
  436. <xsl:value-of select="concat($posId,'/textItem[',$index,']')"/>
  437. </xsl:when>
  438. <xsl:otherwise>
  439. <xsl:value-of select="concat($posId,'/textItem')"/>
  440. </xsl:otherwise>
  441. </xsl:choose>
  442. </posId>
  443. </LReference>
  444. </item>
  445. </xsl:template>
  446. <xsl:template match="image">
  447. <xsl:param name="posId"/>
  448. <xsl:variable name="countType">
  449. <xsl:value-of select="count(../image)"/>
  450. </xsl:variable>
  451. <xsl:variable name="index">
  452. <xsl:value-of select="1 + count(preceding-sibling::image)"/>
  453. </xsl:variable>
  454. <item>
  455. <LReference>
  456. <xsl:if test="@name">
  457. <rdsCM:id>
  458. <xsl:value-of select="@name"/>
  459. </rdsCM:id>
  460. </xsl:if>
  461. <posId>
  462. <xsl:choose>
  463. <xsl:when test="$countType &gt; 1">
  464. <xsl:value-of select="concat($posId,'/image[',$index,']')"/>
  465. </xsl:when>
  466. <xsl:otherwise>
  467. <xsl:value-of select="concat($posId,'/image')"/>
  468. </xsl:otherwise>
  469. </xsl:choose>
  470. </posId>
  471. </LReference>
  472. </item>
  473. </xsl:template>
  474. <xsl:template match="crosstab">
  475. <xsl:param name="posId"/>
  476. <xsl:variable name="countType">
  477. <xsl:value-of select="count(../crosstab)"/>
  478. </xsl:variable>
  479. <xsl:variable name="index">
  480. <xsl:value-of select="1 + count(preceding-sibling::crosstab)"/>
  481. </xsl:variable>
  482. <item>
  483. <LReference>
  484. <xsl:if test="@name">
  485. <rdsCM:id>
  486. <xsl:value-of select="@name"/>
  487. </rdsCM:id>
  488. </xsl:if>
  489. <posId>
  490. <xsl:choose>
  491. <xsl:when test="$countType &gt; 1">
  492. <xsl:value-of select="concat($posId,'/crosstab[',$index,']')"/>
  493. </xsl:when>
  494. <xsl:otherwise>
  495. <xsl:value-of select="concat($posId,'/crosstab')"/>
  496. </xsl:otherwise>
  497. </xsl:choose>
  498. </posId>
  499. </LReference>
  500. </item>
  501. </xsl:template>
  502. <xsl:template match="repeaterTable">
  503. <xsl:param name="posId"/>
  504. <xsl:variable name="countType">
  505. <xsl:value-of select="count(../repeaterTable)"/>
  506. </xsl:variable>
  507. <xsl:variable name="index">
  508. <xsl:value-of select="1 + count(preceding-sibling::repeaterTable)"/>
  509. </xsl:variable>
  510. <xsl:variable name="rptId">
  511. <xsl:choose>
  512. <xsl:when test="$countType &gt; 1">
  513. <xsl:value-of select="concat($posId,'/repeaterTable[',$index,']')"/>
  514. </xsl:when>
  515. <xsl:otherwise>
  516. <xsl:value-of select="concat($posId,'/repeaterTable')"/>
  517. </xsl:otherwise>
  518. </xsl:choose>
  519. </xsl:variable>
  520. <item>
  521. <LRepeater>
  522. <xsl:if test="@name">
  523. <rdsCM:id>
  524. <xsl:value-of select="@name"/>
  525. </rdsCM:id>
  526. </xsl:if>
  527. <posId>
  528. <xsl:value-of select="$rptId"/>
  529. </posId>
  530. <layout>
  531. <xsl:apply-templates select="repeaterTableCell/contents/*">
  532. <xsl:with-param name="posId">
  533. <xsl:choose>
  534. <xsl:when test="$countType &gt; 1">
  535. <xsl:value-of select="concat($rptId,'/repeaterTableCell/contents[',$index,']')"/>
  536. </xsl:when>
  537. <xsl:otherwise>
  538. <xsl:value-of select="concat($rptId,'/repeaterTableCell/contents')"/>
  539. </xsl:otherwise>
  540. </xsl:choose>
  541. </xsl:with-param>
  542. </xsl:apply-templates>
  543. <xsl:if test="style/CSS">
  544. <CSSStyle>
  545. <xsl:value-of select="style/CSS/@value"/>
  546. </CSSStyle>
  547. </xsl:if>
  548. <xsl:apply-templates select="style/defaultStyles/*"/>
  549. </layout>
  550. </LRepeater>
  551. </item>
  552. </xsl:template>
  553. <xsl:template match="repeater">
  554. <xsl:param name="posId"/>
  555. <xsl:variable name="countType">
  556. <xsl:value-of select="count(../repeater)"/>
  557. </xsl:variable>
  558. <xsl:variable name="index">
  559. <xsl:value-of select="1 + count(preceding-sibling::repeater)"/>
  560. </xsl:variable>
  561. <xsl:variable name="rptId">
  562. <xsl:choose>
  563. <xsl:when test="$countType &gt; 1">
  564. <xsl:value-of select="concat($posId,'/repeater[',$index,']')"/>
  565. </xsl:when>
  566. <xsl:otherwise>
  567. <xsl:value-of select="concat($posId,'/repeater')"/>
  568. </xsl:otherwise>
  569. </xsl:choose>
  570. </xsl:variable>
  571. <item>
  572. <LRepeater>
  573. <xsl:if test="@name">
  574. <rdsCM:id>
  575. <xsl:value-of select="@name"/>
  576. </rdsCM:id>
  577. </xsl:if>
  578. <posId>
  579. <xsl:value-of select="$rptId"/>
  580. </posId>
  581. <layout>
  582. <xsl:apply-templates select="contents/*">
  583. <xsl:with-param name="posId">
  584. <xsl:choose>
  585. <xsl:when test="$countType &gt; 1">
  586. <xsl:value-of select="concat($posId,'/repeater/contents[',$index,']')"/>
  587. </xsl:when>
  588. <xsl:otherwise>
  589. <xsl:value-of select="concat($posId,'/repeater/contents')"/>
  590. </xsl:otherwise>
  591. </xsl:choose>
  592. </xsl:with-param>
  593. </xsl:apply-templates>
  594. <xsl:if test="style/CSS">
  595. <CSSStyle>
  596. <xsl:value-of select="style/CSS/@value"/>
  597. </CSSStyle>
  598. </xsl:if>
  599. <xsl:apply-templates select="style/defaultStyles/*"/>
  600. </layout>
  601. </LRepeater>
  602. </item>
  603. </xsl:template>
  604. <xsl:template match="hyperlink">
  605. <xsl:param name="posId"/>
  606. <xsl:variable name="countType">
  607. <xsl:value-of select="count(../hyperlink)"/>
  608. </xsl:variable>
  609. <xsl:variable name="index">
  610. <xsl:value-of select="1 + count(preceding-sibling::hyperlink)"/>
  611. </xsl:variable>
  612. <item>
  613. <LReference>
  614. <xsl:if test="@name">
  615. <rdsCM:id>
  616. <xsl:value-of select="@name"/>
  617. </rdsCM:id>
  618. </xsl:if>
  619. <posId>
  620. <xsl:choose>
  621. <xsl:when test="$countType &gt; 1">
  622. <xsl:value-of select="concat($posId,'/hyperlink[',$index,']')"/>
  623. </xsl:when>
  624. <xsl:otherwise>
  625. <xsl:value-of select="concat($posId,'/hyperlink')"/>
  626. </xsl:otherwise>
  627. </xsl:choose>
  628. </posId>
  629. </LReference>
  630. </item>
  631. </xsl:template>
  632. <xsl:template match="button">
  633. <!--Not yet handled-->
  634. </xsl:template>
  635. <xsl:template match="promptButton">
  636. <!--Not yet handled-->
  637. </xsl:template>
  638. <xsl:template match="HTMLItem">
  639. <xsl:param name="posId"/>
  640. <xsl:variable name="countType">
  641. <xsl:value-of select="count(../HTMLItem)"/>
  642. </xsl:variable>
  643. <xsl:variable name="index">
  644. <xsl:value-of select="1 + count(preceding-sibling::HTMLItem)"/>
  645. </xsl:variable>
  646. <item>
  647. <LReference>
  648. <xsl:if test="@name">
  649. <rdsCM:id>
  650. <xsl:value-of select="@name"/>
  651. </rdsCM:id>
  652. </xsl:if>
  653. <posId>
  654. <xsl:choose>
  655. <xsl:when test="$countType &gt; 1">
  656. <xsl:value-of select="concat($posId,'/HTMLItem[',$index,']')"/>
  657. </xsl:when>
  658. <xsl:otherwise>
  659. <xsl:value-of select="concat($posId,'/HTMLItem')"/>
  660. </xsl:otherwise>
  661. </xsl:choose>
  662. </posId>
  663. </LReference>
  664. </item>
  665. </xsl:template>
  666. <xsl:template match="richTextItem">
  667. <xsl:param name="posId"/>
  668. <xsl:variable name="countType">
  669. <xsl:value-of select="count(../richTextItem)"/>
  670. </xsl:variable>
  671. <xsl:variable name="index">
  672. <xsl:value-of select="1 + count(preceding-sibling::richTextItem)"/>
  673. </xsl:variable>
  674. <item>
  675. <LReference>
  676. <xsl:if test="@name">
  677. <rdsCM:id>
  678. <xsl:value-of select="@name"/>
  679. </rdsCM:id>
  680. </xsl:if>
  681. <posId>
  682. <xsl:choose>
  683. <xsl:when test="$countType &gt; 1">
  684. <xsl:value-of select="concat($posId,'/richTextItem[',$index,']')"/>
  685. </xsl:when>
  686. <xsl:otherwise>
  687. <xsl:value-of select="concat($posId,'/richTextItem')"/>
  688. </xsl:otherwise>
  689. </xsl:choose>
  690. </posId>
  691. </LReference>
  692. </item>
  693. </xsl:template>
  694. <xsl:template match="bookmark">
  695. <xsl:param name="posId"/>
  696. <xsl:variable name="countType">
  697. <xsl:value-of select="count(../bookmark)"/>
  698. </xsl:variable>
  699. <xsl:variable name="index">
  700. <xsl:value-of select="1 + count(preceding-sibling::bookmark)"/>
  701. </xsl:variable>
  702. <item>
  703. <LReference>
  704. <xsl:if test="@name">
  705. <rdsCM:id>
  706. <xsl:value-of select="@name"/>
  707. </rdsCM:id>
  708. </xsl:if>
  709. <posId>
  710. <xsl:choose>
  711. <xsl:when test="$countType &gt; 1">
  712. <xsl:value-of select="concat($posId,'/bookmark[',$index,']')"/>
  713. </xsl:when>
  714. <xsl:otherwise>
  715. <xsl:value-of select="concat($posId,'/bookmark')"/>
  716. </xsl:otherwise>
  717. </xsl:choose>
  718. </posId>
  719. </LReference>
  720. </item>
  721. </xsl:template>
  722. <xsl:template match="TOCEntry">
  723. <xsl:param name="posId"/>
  724. <xsl:variable name="countType">
  725. <xsl:value-of select="count(../TOCEntry)"/>
  726. </xsl:variable>
  727. <xsl:variable name="index">
  728. <xsl:value-of select="1 + count(preceding-sibling::TOCEntry)"/>
  729. </xsl:variable>
  730. <item>
  731. <!-- TOCEntry items are also mapped to bookmark object -->
  732. <!-- Note: neither TOCEntry nor bookmark have name attrbitues, so id will be empty -->
  733. <LReference>
  734. <xsl:if test="@name">
  735. <rdsCM:id>
  736. <xsl:value-of select="@name"/>
  737. </rdsCM:id>
  738. </xsl:if>
  739. <posId>
  740. <xsl:choose>
  741. <xsl:when test="$countType &gt; 1">
  742. <xsl:value-of select="concat($posId,'/TOCEntry[',$index,']')"/>
  743. </xsl:when>
  744. <xsl:otherwise>
  745. <xsl:value-of select="concat($posId,'/TOCEntry')"/>
  746. </xsl:otherwise>
  747. </xsl:choose>
  748. </posId>
  749. </LReference>
  750. </item>
  751. </xsl:template>
  752. <xsl:template match="fieldSet">
  753. <xsl:param name="posId"/>
  754. <xsl:variable name="countType">
  755. <xsl:value-of select="count(../fieldset)"/>
  756. </xsl:variable>
  757. <xsl:variable name="index">
  758. <xsl:value-of select="1 + count(preceding-sibling::fieldset)"/>
  759. </xsl:variable>
  760. <xsl:apply-templates select="fieldSetCaption/contents/*">
  761. <xsl:with-param name="posId">
  762. <xsl:choose>
  763. <xsl:when test="$countType &gt; 1">
  764. <xsl:value-of select="concat($posId,'/fieldSet/fieldSetCaption[',$index,']/contents')"/>
  765. </xsl:when>
  766. <xsl:otherwise>
  767. <xsl:value-of select="concat($posId,'/fieldSet/fieldSetCaption/contents')"/>
  768. </xsl:otherwise>
  769. </xsl:choose>
  770. </xsl:with-param>
  771. </xsl:apply-templates>
  772. <xsl:apply-templates select="contents/*">
  773. <xsl:with-param name="posId">
  774. <xsl:choose>
  775. <xsl:when test="$countType &gt; 1">
  776. <xsl:value-of select="concat($posId,'/fieldSet[',$index,']/contents')"/>
  777. </xsl:when>
  778. <xsl:otherwise>
  779. <xsl:value-of select="concat($posId,'/fieldSet/contents')"/>
  780. </xsl:otherwise>
  781. </xsl:choose>
  782. </xsl:with-param>
  783. </xsl:apply-templates>
  784. </xsl:template>
  785. <xsl:template match="conditionalBlocks">
  786. <xsl:param name="posId"/>
  787. <xsl:variable name="countType">
  788. <xsl:value-of select="count(../conditionalBlocks)"/>
  789. </xsl:variable>
  790. <xsl:variable name="index">
  791. <xsl:value-of select="1 + count(preceding-sibling::conditionalBlocks)"/>
  792. </xsl:variable>
  793. <xsl:apply-templates select="./conditionalBlockDefault/contents/*">
  794. <xsl:with-param name="posId">
  795. <xsl:value-of select="concat($posId,'/conditionalBlockDefault/contents')"/>
  796. </xsl:with-param>
  797. </xsl:apply-templates>
  798. <xsl:for-each select="./conditionalBlockCases/conditionalBlock">
  799. <xsl:apply-templates select="./contents/*">
  800. <xsl:with-param name="posId">
  801. <xsl:choose>
  802. <xsl:when test="count(../conditionalBlock) &gt; 1">
  803. <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock[',1 + count(preceding-sibling::conditionalBlock),']/contents')"/>
  804. </xsl:when>
  805. <xsl:otherwise>
  806. <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock/contents')"/>
  807. </xsl:otherwise>
  808. </xsl:choose>
  809. </xsl:with-param>
  810. </xsl:apply-templates>
  811. </xsl:for-each>
  812. </xsl:template>
  813. <xsl:template match="layoutComponentRef">
  814. <xsl:param name="conditional"/>
  815. <xsl:param name="posId"/>
  816. <xsl:variable name="countType">
  817. <xsl:value-of select="count(../layoutComponentRef)"/>
  818. </xsl:variable>
  819. <xsl:variable name="index">
  820. <xsl:value-of select="1 + count(preceding-sibling::layoutComponentRef)"/>
  821. </xsl:variable>
  822. <!-- LCRs will be handled in a future release -->
  823. </xsl:template>
  824. <xsl:template match="CMMMap">
  825. <xsl:param name="posId"/>
  826. <xsl:variable name="countType">
  827. <xsl:value-of select="count(../CMMMap)"/>
  828. </xsl:variable>
  829. <xsl:variable name="index">
  830. <xsl:value-of select="1 + count(preceding-sibling::CMMMap)"/>
  831. </xsl:variable>
  832. <item>
  833. <LReference>
  834. <xsl:if test="@cmmID">
  835. <rdsCM:id>
  836. <xsl:value-of select="@cmmID"/>
  837. </rdsCM:id>
  838. </xsl:if>
  839. <posId>
  840. <xsl:choose>
  841. <xsl:when test="$countType &gt; 1">
  842. <xsl:value-of select="concat($posId,'/CMMMap[',$index,']')"/>
  843. </xsl:when>
  844. <xsl:otherwise>
  845. <xsl:value-of select="concat($posId,'/CMMMap')"/>
  846. </xsl:otherwise>
  847. </xsl:choose>
  848. </posId>
  849. </LReference>
  850. </item>
  851. </xsl:template>
  852. <xsl:template match="asOfTime">
  853. <!--Not yet handled-->
  854. </xsl:template>
  855. <xsl:template match="singleton">
  856. <xsl:param name="posId"/>
  857. <xsl:variable name="countType">
  858. <xsl:value-of select="count(../singleton)"/>
  859. </xsl:variable>
  860. <xsl:variable name="index">
  861. <xsl:value-of select="1 + count(preceding-sibling::singleton)"/>
  862. </xsl:variable>
  863. <xsl:apply-templates select="contents/*">
  864. <xsl:with-param name="posId">
  865. <xsl:choose>
  866. <xsl:when test="$countType &gt; 1">
  867. <xsl:value-of select="concat($posId,'/singleton[',$index,']/contents')"/>
  868. </xsl:when>
  869. <xsl:otherwise>
  870. <xsl:value-of select="concat($posId,'/singleton/contents')"/>
  871. </xsl:otherwise>
  872. </xsl:choose>
  873. </xsl:with-param>
  874. </xsl:apply-templates>
  875. </xsl:template>
  876. <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 ">
  877. <xsl:param name="posId"/>
  878. <item>
  879. <LReference>
  880. <xsl:if test="@name">
  881. <rdsCM:id>
  882. <xsl:value-of select="@name"/>
  883. </rdsCM:id>
  884. </xsl:if>
  885. <posId>
  886. <xsl:choose>
  887. <xsl:when test="name() = 'pieChart'">
  888. <xsl:choose>
  889. <xsl:when test="count(../pieChart) &gt; 1">
  890. <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::pieChart),']')"/>
  891. </xsl:when>
  892. <xsl:otherwise>
  893. <xsl:value-of select="concat($posId,'/pieChart')"/>
  894. </xsl:otherwise>
  895. </xsl:choose>
  896. </xsl:when>
  897. <xsl:when test="name() = 'paretoChart'">
  898. <xsl:choose>
  899. <xsl:when test="count(../paretoChart) &gt; 1">
  900. <xsl:value-of select="concat($posId,'/paretoChart[',1 + count(preceding-sibling::paretoChart),']')"/>
  901. </xsl:when>
  902. <xsl:otherwise>
  903. <xsl:value-of select="concat($posId,'/paretoChart')"/>
  904. </xsl:otherwise>
  905. </xsl:choose>
  906. </xsl:when>
  907. <xsl:when test="name() = 'scatterChart'">
  908. <xsl:choose>
  909. <xsl:when test="count(../scatterChart) &gt; 1">
  910. <xsl:value-of select="concat($posId,'/scatterChart[',1 + count(preceding-sibling::scatterChart),']')"/>
  911. </xsl:when>
  912. <xsl:otherwise>
  913. <xsl:value-of select="concat($posId,'/scatterChart')"/>
  914. </xsl:otherwise>
  915. </xsl:choose>
  916. </xsl:when>
  917. <xsl:when test="name() = 'polarChart'">
  918. <xsl:choose>
  919. <xsl:when test="count(../polarChart) &gt; 1">
  920. <xsl:value-of select="concat($posId,'/polarChart[',1 + count(preceding-sibling::polarChart),']')"/>
  921. </xsl:when>
  922. <xsl:otherwise>
  923. <xsl:value-of select="concat($posId,'/polarChart')"/>
  924. </xsl:otherwise>
  925. </xsl:choose>
  926. </xsl:when>
  927. <xsl:when test="name() = 'radarChart'">
  928. <xsl:choose>
  929. <xsl:when test="count(../radarChart) &gt; 1">
  930. <xsl:value-of select="concat($posId,'/radarChart[',1 + count(preceding-sibling::radarChart),']')"/>
  931. </xsl:when>
  932. <xsl:otherwise>
  933. <xsl:value-of select="concat($posId,'/radarChart')"/>
  934. </xsl:otherwise>
  935. </xsl:choose>
  936. </xsl:when>
  937. <xsl:when test="name() = 'progressiveChart'">
  938. <xsl:choose>
  939. <xsl:when test="count(../progressiveChart) &gt; 1">
  940. <xsl:value-of select="concat($posId,'/progressiveChart[',1 + count(preceding-sibling::progressiveChart),']')"/>
  941. </xsl:when>
  942. <xsl:otherwise>
  943. <xsl:value-of select="concat($posId,'/progressiveChart')"/>
  944. </xsl:otherwise>
  945. </xsl:choose>
  946. </xsl:when>
  947. <xsl:when test="name() = 'combinationChart'">
  948. <xsl:choose>
  949. <xsl:when test="count(../combinationChart) &gt; 1">
  950. <xsl:value-of select="concat($posId,'/combinationChart[',1 + count(preceding-sibling::combinationChart),']')"/>
  951. </xsl:when>
  952. <xsl:otherwise>
  953. <xsl:value-of select="concat($posId,'/combinationChart')"/>
  954. </xsl:otherwise>
  955. </xsl:choose>
  956. </xsl:when>
  957. <xsl:when test="name() = 'bubbleChart'">
  958. <xsl:choose>
  959. <xsl:when test="count(../bubbleChart) &gt; 1">
  960. <xsl:value-of select="concat($posId,'/bubbleChart[',1 + count(preceding-sibling::bubbleChart),']')"/>
  961. </xsl:when>
  962. <xsl:otherwise>
  963. <xsl:value-of select="concat($posId,'/bubbleChart')"/>
  964. </xsl:otherwise>
  965. </xsl:choose>
  966. </xsl:when>
  967. <xsl:when test="name() = 'threeDCombinationChart'">
  968. <xsl:choose>
  969. <xsl:when test="count(../threeDCombinationChart) &gt; 1">
  970. <xsl:value-of select="concat($posId,'/threeDCombinationChart[',1 + count(preceding-sibling::threeDCombinationChart),']')"/>
  971. </xsl:when>
  972. <xsl:otherwise>
  973. <xsl:value-of select="concat($posId,'/threeDCombinationChart')"/>
  974. </xsl:otherwise>
  975. </xsl:choose>
  976. </xsl:when>
  977. <xsl:when test="name() = 'threeDScatterChart'">
  978. <xsl:choose>
  979. <xsl:when test="count(../threeDScatterChart) &gt; 1">
  980. <xsl:value-of select="concat($posId,'/threeDScatterChart[',1 + count(preceding-sibling::threeDScatterChart),']')"/>
  981. </xsl:when>
  982. <xsl:otherwise>
  983. <xsl:value-of select="concat($posId,'/threeDScatterChart')"/>
  984. </xsl:otherwise>
  985. </xsl:choose>
  986. </xsl:when>
  987. <xsl:when test="name() = 'gaugeChart'">
  988. <xsl:choose>
  989. <xsl:when test="count(../gaugeChart) &gt; 1">
  990. <xsl:value-of select="concat($posId,'/gaugeChart[',1 + count(preceding-sibling::gaugeChart),']')"/>
  991. </xsl:when>
  992. <xsl:otherwise>
  993. <xsl:value-of select="concat($posId,'/gaugeChart')"/>
  994. </xsl:otherwise>
  995. </xsl:choose>
  996. </xsl:when>
  997. <xsl:when test="name() = 'mapChart'">
  998. <xsl:choose>
  999. <xsl:when test="count(../mapChart) &gt; 1">
  1000. <xsl:value-of select="concat($posId,'/mapChart[',1 + count(preceding-sibling::mapChart),']')"/>
  1001. </xsl:when>
  1002. <xsl:otherwise>
  1003. <xsl:value-of select="concat($posId,'/mapChart')"/>
  1004. </xsl:otherwise>
  1005. </xsl:choose>
  1006. </xsl:when>
  1007. <xsl:when test="name() = 'metricsChart'">
  1008. <xsl:choose>
  1009. <xsl:when test="count(../metricsChart) &gt; 1">
  1010. <xsl:value-of select="concat($posId,'/metricsChart[',1 + count(preceding-sibling::metricsChart),']')"/>
  1011. </xsl:when>
  1012. <xsl:otherwise>
  1013. <xsl:value-of select="concat($posId,'/metricsChart')"/>
  1014. </xsl:otherwise>
  1015. </xsl:choose>
  1016. </xsl:when>
  1017. <xsl:when test="name() = 'marimekkoChart'">
  1018. <xsl:choose>
  1019. <xsl:when test="count(../marimekkoChart) &gt; 1">
  1020. <xsl:value-of select="concat($posId,'/marimekkoChart[',1 + count(preceding-sibling::marimekkoChart),']')"/>
  1021. </xsl:when>
  1022. <xsl:otherwise>
  1023. <xsl:value-of select="concat($posId,'/marimekkoChart')"/>
  1024. </xsl:otherwise>
  1025. </xsl:choose>
  1026. </xsl:when>
  1027. <xsl:when test="name() = 'winLossChart'">
  1028. <xsl:choose>
  1029. <xsl:when test="count(../winLossChart) &gt; 1">
  1030. <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::winLossChart),']')"/>
  1031. </xsl:when>
  1032. <xsl:otherwise>
  1033. <xsl:value-of select="concat($posId,'/winLossChart')"/>
  1034. </xsl:otherwise>
  1035. </xsl:choose>
  1036. </xsl:when>
  1037. <xsl:when test="name() = 'v2_combinationChart'">
  1038. <xsl:choose>
  1039. <xsl:when test="count(../v2_combinationChart) &gt; 1">
  1040. <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::v2_combinationChart),']')"/>
  1041. </xsl:when>
  1042. <xsl:otherwise>
  1043. <xsl:value-of select="concat($posId,'/v2_combinationChart')"/>
  1044. </xsl:otherwise>
  1045. </xsl:choose>
  1046. </xsl:when>
  1047. <xsl:when test="name() = 'v2_scatterChart'">
  1048. <xsl:choose>
  1049. <xsl:when test="count(../v2_scatterChart) &gt; 1">
  1050. <xsl:value-of select="concat($posId,'/v2_scatterChart[',1 + count(preceding-sibling::v2_scatterChart),']')"/>
  1051. </xsl:when>
  1052. <xsl:otherwise>
  1053. <xsl:value-of select="concat($posId,'/v2_schatterChart')"/>
  1054. </xsl:otherwise>
  1055. </xsl:choose>
  1056. </xsl:when>
  1057. <xsl:when test="name() = 'v2_pieChart'">
  1058. <xsl:choose>
  1059. <xsl:when test="count(../v2_combinationChart) &gt; 1">
  1060. <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::v2_pieChart),']')"/>
  1061. </xsl:when>
  1062. <xsl:otherwise>
  1063. <xsl:value-of select="concat($posId,'/v2_pieChart')"/>
  1064. </xsl:otherwise>
  1065. </xsl:choose>
  1066. </xsl:when>
  1067. <xsl:when test="name() = 'v2_guageChart'">
  1068. <xsl:choose>
  1069. <xsl:when test="count(../v2_guageChart) &gt; 1">
  1070. <xsl:value-of select="concat($posId,'/v2_guageChart[',1 + count(preceding-sibling::v2_guageChart),']')"/>
  1071. </xsl:when>
  1072. <xsl:otherwise>
  1073. <xsl:value-of select="concat($posId,'/v2_guageChart')"/>
  1074. </xsl:otherwise>
  1075. </xsl:choose>
  1076. </xsl:when>
  1077. <xsl:when test="name() = 'v2_matrixChart'">
  1078. <xsl:choose>
  1079. <xsl:when test="count(../v2_matrixChart) &gt; 1">
  1080. <xsl:value-of select="concat($posId,'/v2_matrixChart[',1 + count(preceding-sibling::v2_matrixChart),']')"/>
  1081. </xsl:when>
  1082. <xsl:otherwise>
  1083. <xsl:value-of select="concat($posId,'/v2_matrixChart')"/>
  1084. </xsl:otherwise>
  1085. </xsl:choose>
  1086. </xsl:when>
  1087. <xsl:when test="name() = 'v2_progressiveChart'">
  1088. <xsl:choose>
  1089. <xsl:when test="count(../v2_progressiveChart) &gt; 1">
  1090. <xsl:value-of select="concat($posId,'/v2_progressiveChart[',1 + count(preceding-sibling::v2_progressiveChart),']')"/>
  1091. </xsl:when>
  1092. <xsl:otherwise>
  1093. <xsl:value-of select="concat($posId,'/v2_progressiveChart')"/>
  1094. </xsl:otherwise>
  1095. </xsl:choose>
  1096. </xsl:when>
  1097. <xsl:when test="name() = 'v2_paretoChart'">
  1098. <xsl:choose>
  1099. <xsl:when test="count(../v2_paretoChart) &gt; 1">
  1100. <xsl:value-of select="concat($posId,'/v2_paretoChart[',1 + count(preceding-sibling::v2_paretoChart),']')"/>
  1101. </xsl:when>
  1102. <xsl:otherwise>
  1103. <xsl:value-of select="concat($posId,'/v2_paretoChart')"/>
  1104. </xsl:otherwise>
  1105. </xsl:choose>
  1106. </xsl:when>
  1107. <xsl:when test="name() = 'v2_bubbleChart'">
  1108. <xsl:choose>
  1109. <xsl:when test="count(../v2_bubbleChart) &gt; 1">
  1110. <xsl:value-of select="concat($posId,'/v2_bubbleChart[',1 + count(preceding-sibling::v2_bubbleChart),']')"/>
  1111. </xsl:when>
  1112. <xsl:otherwise>
  1113. <xsl:value-of select="concat($posId,'/v2_bubbleChart')"/>
  1114. </xsl:otherwise>
  1115. </xsl:choose>
  1116. </xsl:when>
  1117. <xsl:when test="name() = 'v2_repeaterChart'">
  1118. <xsl:choose>
  1119. <xsl:when test="count(../v2_repeaterChart) &gt; 1">
  1120. <xsl:value-of select="concat($posId,'/v2_repeaterChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
  1121. </xsl:when>
  1122. <xsl:otherwise>
  1123. <xsl:value-of select="concat($posId,'/v2_repeaterChart')"/>
  1124. </xsl:otherwise>
  1125. </xsl:choose>
  1126. </xsl:when>
  1127. <xsl:when test="name() = 'v2_bulletChart'">
  1128. <xsl:choose>
  1129. <xsl:when test="count(../v2_bulletChart) &gt; 1">
  1130. <xsl:value-of select="concat($posId,'/v2_bulletChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
  1131. </xsl:when>
  1132. <xsl:otherwise>
  1133. <xsl:value-of select="concat($posId,'/v2_bulletChart')"/>
  1134. </xsl:otherwise>
  1135. </xsl:choose>
  1136. </xsl:when>
  1137. <xsl:otherwise>
  1138. <xsl:value-of select="concat($posId,'/unknownChartType')"/>
  1139. </xsl:otherwise>
  1140. </xsl:choose>
  1141. </posId>
  1142. </LReference>
  1143. </item>
  1144. </xsl:template>
  1145. <xsl:template match="defaultStyle">
  1146. <RefStyle>
  1147. <xsl:value-of select="@refStyle"/>
  1148. </RefStyle>
  1149. </xsl:template>
  1150. <xsl:template match="classStyle">
  1151. <ClassStyle>
  1152. <Name>
  1153. <xsl:value-of select="@name"/>
  1154. </Name>
  1155. <Value>
  1156. <xsl:value-of select="CSS/@value"/>
  1157. </Value>
  1158. </ClassStyle>
  1159. </xsl:template>
  1160. </xsl:stylesheet>