rds_formatted.xsl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:ccs="http://developer.cognos.com/rds/1">
  9. <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
  10. <xsl:param name="dataFmt">formattedData</xsl:param>
  11. <xsl:template match="/">
  12. <ccs:reportData>
  13. <!-- The root object may or may not exist-->
  14. <xsl:for-each select="root/Document/DATA/PAGE">
  15. <xsl:apply-templates select="."/>
  16. </xsl:for-each>
  17. <xsl:for-each select="Document/DATA/PAGE">
  18. <xsl:apply-templates select="."/>
  19. </xsl:for-each>
  20. </ccs:reportData>
  21. </xsl:template>
  22. <xsl:template match="LIST">
  23. <xsl:param name="locid"/>
  24. <xsl:param name="reloc"/>
  25. <xsl:if test="@layoutClass = 'list' ">
  26. <xsl:element name="{$reloc}">
  27. <ccs:id>
  28. <xsl:choose>
  29. <xsl:when test="@name">
  30. <xsl:value-of select="@name"/>
  31. </xsl:when>
  32. <xsl:otherwise>
  33. <xsl:value-of select="$locid"/>
  34. </xsl:otherwise>
  35. </xsl:choose>
  36. </ccs:id>
  37. <ccs:locid>
  38. <xsl:value-of select="$locid"/>
  39. </ccs:locid>
  40. <ccs:style/>
  41. <ccs:name>
  42. <xsl:value-of select="@name"/>
  43. </ccs:name>
  44. <ccs:type>Table</ccs:type>
  45. <ccs:content>
  46. <ccs:table>
  47. <xsl:apply-templates select="DR"/>
  48. </ccs:table>
  49. </ccs:content>
  50. </xsl:element>
  51. </xsl:if>
  52. <xsl:if test="@layoutClass = 'crosstab' ">
  53. <xsl:element name="{$reloc}">
  54. <ccs:id>
  55. <xsl:choose>
  56. <xsl:when test="@name">
  57. <xsl:value-of select="@name"/>
  58. </xsl:when>
  59. <xsl:otherwise>
  60. <xsl:value-of select="$locid"/>
  61. </xsl:otherwise>
  62. </xsl:choose>
  63. </ccs:id>
  64. <ccs:locid>
  65. <xsl:value-of select="$locid"/>
  66. </ccs:locid>
  67. <ccs:style/>
  68. <ccs:name>
  69. <xsl:value-of select="@name"/>
  70. </ccs:name>
  71. <ccs:type>Table</ccs:type>
  72. <ccs:content>
  73. <ccs:table>
  74. <xsl:apply-templates select="DR"/>
  75. </ccs:table>
  76. </ccs:content>
  77. </xsl:element>
  78. </xsl:if>
  79. <xsl:if test="@layoutClass = 'table' ">
  80. <xsl:for-each select="DR/DRI/*[local-name() != 'OMAP']">
  81. <xsl:apply-templates select=".">
  82. <xsl:with-param name="locid">
  83. <xsl:value-of select="concat($locid,'T',position())"/>
  84. </xsl:with-param>
  85. <xsl:with-param name="reloc">
  86. <xsl:value-of select="$reloc"/>
  87. </xsl:with-param>
  88. </xsl:apply-templates>
  89. </xsl:for-each>
  90. <xsl:for-each select="OTR/DRI/*[local-name() != 'OMAP']">
  91. <xsl:apply-templates select=".">
  92. <xsl:with-param name="locid">
  93. <xsl:value-of select="concat($locid,'T',position())"/>
  94. </xsl:with-param>
  95. <xsl:with-param name="reloc">
  96. <xsl:value-of select="$reloc"/>
  97. </xsl:with-param>
  98. </xsl:apply-templates>
  99. </xsl:for-each>
  100. </xsl:if>
  101. <xsl:if test="@layoutClass = 'repeaterTable'">
  102. <xsl:for-each select="UNKNOWN/DRI">
  103. <xsl:call-template name="repeaterRow">
  104. <xsl:with-param name="locid">
  105. <xsl:value-of select="$locid"/>
  106. </xsl:with-param>
  107. <xsl:with-param name="reloc">
  108. <xsl:value-of select="$reloc"/>
  109. </xsl:with-param>
  110. </xsl:call-template>
  111. </xsl:for-each>
  112. <!--
  113. <xsl:for-each select="UNKNOWN/DRI/*[local-name() != 'OMAP']">
  114. <xsl:apply-templates select=".">
  115. <xsl:with-param name="locid">
  116. <xsl:value-of select="concat($locid,'RT',position())"/>
  117. </xsl:with-param>
  118. <xsl:with-param name="reloc">
  119. <xsl:value-of select="$reloc"/>
  120. </xsl:with-param>
  121. </xsl:apply-templates>
  122. </xsl:for-each>
  123. -->
  124. </xsl:if>
  125. </xsl:template>
  126. <xsl:template name="repeaterRow">
  127. <xsl:param name="locid"/>
  128. <xsl:param name="reloc"/>
  129. <xsl:for-each select="./*[local-name() != 'OMAP']">
  130. <xsl:apply-templates select=".">
  131. <xsl:with-param name="locid">
  132. <xsl:value-of select="concat($locid,'RT',position())"/>
  133. </xsl:with-param>
  134. <xsl:with-param name="reloc">
  135. <xsl:value-of select="$reloc"/>
  136. </xsl:with-param>
  137. </xsl:apply-templates>
  138. </xsl:for-each>
  139. </xsl:template>
  140. <!-- Just in case the UNKNOWN element reappears again.
  141. <xsl:template match="UNKNOWN[@layoutClass='table']">
  142. <xsl:param name="locid"/>
  143. <xsl:param name="reloc"/>
  144. <xsl:for-each select="OTR/DRI/*">
  145. <xsl:apply-templates select=".">
  146. <xsl:with-param name="locid">
  147. <xsl:value-of select="concat($locid,'T',position())"/>
  148. </xsl:with-param>
  149. <xsl:with-param name="reloc">
  150. <xsl:value-of select="$reloc"/>
  151. </xsl:with-param>
  152. </xsl:apply-templates>
  153. </xsl:for-each>
  154. </xsl:template>
  155. -->
  156. <xsl:template match="OFLDSET">
  157. <xsl:param name="locid"/>
  158. <xsl:param name="reloc"/>
  159. <xsl:for-each select="*[local-name() != 'OCAPTION']">
  160. <xsl:apply-templates select=".">
  161. <xsl:with-param name="locid">
  162. <xsl:value-of select="concat($locid,'P',position())"/>
  163. </xsl:with-param>
  164. <xsl:with-param name="reloc">
  165. <xsl:value-of select="$reloc"/>
  166. </xsl:with-param>
  167. </xsl:apply-templates>
  168. </xsl:for-each>
  169. </xsl:template>
  170. <xsl:template match="FORM|OTD">
  171. <xsl:param name="locid"/>
  172. <xsl:param name="reloc"/>
  173. <xsl:if test="@layoutClass = 'block' ">
  174. <xsl:for-each select="./*[local-name() != 'OMAP']">
  175. <xsl:apply-templates select=".">
  176. <xsl:with-param name="locid">
  177. <xsl:value-of select="concat($locid,'P',position())"/>
  178. </xsl:with-param>
  179. <xsl:with-param name="reloc">
  180. <xsl:value-of select="$reloc"/>
  181. </xsl:with-param>
  182. </xsl:apply-templates>
  183. </xsl:for-each>
  184. </xsl:if>
  185. <xsl:if test="@layoutClass = 'pageHeader' ">
  186. <xsl:for-each select="LIST[@layoutClass='table']/DR/DRI/*[local-name() != 'OMAP'] | LIST[@layoutClass='list'] | LIST[@layoutClass='repeaterTable'] | LIST[@layoutClass='crosstab'] | OTI | OIMG | FORM |LIST[@layoutClass='table']/OTR/DRI/*[local-name() != 'OMAP']|OCHART|OFLDSET">
  187. <xsl:apply-templates select=".">
  188. <xsl:with-param name="locid">
  189. <xsl:value-of select="concat($locid,':H',position())"/>
  190. </xsl:with-param>
  191. <xsl:with-param name="reloc">ccs:headerElements</xsl:with-param>
  192. </xsl:apply-templates>
  193. </xsl:for-each>
  194. </xsl:if>
  195. <xsl:if test="@layoutClass = 'pageBody'">
  196. <xsl:for-each select="LIST[@layoutClass='table']/DR/DRI/*[local-name() != 'OMAP'] | LIST[@layoutClass='list'] | LIST[@layoutClass='crosstab'] | LIST[@layoutClass='repeaterTable'] | OTI | OIMG | FORM |LIST[@layoutClass='table']/OTR/DRI/*[local-name() != 'OMAP']|OCHART|OFLDSET">
  197. <xsl:apply-templates select=".">
  198. <xsl:with-param name="locid">
  199. <xsl:value-of select="concat($locid,':B',position())"/>
  200. </xsl:with-param>
  201. <xsl:with-param name="reloc">ccs:bodyElements</xsl:with-param>
  202. </xsl:apply-templates>
  203. </xsl:for-each>
  204. </xsl:if>
  205. <xsl:if test="@layoutClass = 'pageFooter'">
  206. <xsl:for-each select="LIST[@layoutClass='table']/DR/DRI/*[local-name() != 'OMAP'] | LIST[@layoutClass='list'] | LIST[@layoutClass='repeaterTable'] | LIST[@layoutClass='crosstab'] | OTI | OIMG | FORM |LIST[@layoutClass='table']/OTR/DRI/*[local-name() != 'OMAP']|OCHART|OFLDSET">
  207. <xsl:apply-templates select=".">
  208. <xsl:with-param name="locid">
  209. <xsl:value-of select="concat($locid,':F',position())"/>
  210. </xsl:with-param>
  211. <xsl:with-param name="reloc">ccs:footerElements</xsl:with-param>
  212. </xsl:apply-templates>
  213. </xsl:for-each>
  214. </xsl:if>
  215. </xsl:template>
  216. <xsl:template match="PAGE">
  217. <xsl:variable name="locid">
  218. <xsl:choose>
  219. <xsl:when test="@name">
  220. <xsl:value-of select="@name"/>
  221. </xsl:when>
  222. <xsl:otherwise>
  223. <xsl:value-of select="concat('page_',position())"/>
  224. </xsl:otherwise>
  225. </xsl:choose>
  226. </xsl:variable>
  227. <ccs:pages>
  228. <ccs:id>
  229. <xsl:value-of select="$locid"/>
  230. </ccs:id>
  231. <ccs:name>
  232. <xsl:if test="@name">
  233. <xsl:value-of select="$locid"/>
  234. </xsl:if>
  235. </ccs:name>
  236. <ccs:type>Page</ccs:type>
  237. <ccs:content>
  238. <ccs:page>
  239. <xsl:apply-templates>
  240. <xsl:with-param name="locid">
  241. <xsl:value-of select="$locid"/>
  242. </xsl:with-param>
  243. </xsl:apply-templates>
  244. </ccs:page>
  245. </ccs:content>
  246. <xsl:if test="../../styleOptions/cssUrl">
  247. <ccs:unprocessedStyle>
  248. <xsl:value-of select="../../styleOptions/cssUrl"/>
  249. </ccs:unprocessedStyle>
  250. </xsl:if>
  251. </ccs:pages>
  252. </xsl:template>
  253. <xsl:template match="DR">
  254. <ccs:row>
  255. <xsl:variable name="isCrosstabHeader">
  256. <xsl:choose>
  257. <xsl:when test="@layoutClass = 'crosstabColumns'">1</xsl:when>
  258. <xsl:otherwise>0</xsl:otherwise>
  259. </xsl:choose>
  260. </xsl:variable>
  261. <ccs:type>
  262. <xsl:variable name="rowtype">
  263. <xsl:value-of select="@type"/>
  264. </xsl:variable>
  265. <xsl:choose>
  266. <xsl:when test="$isCrosstabHeader = '1'">Header</xsl:when>
  267. <xsl:when test="$rowtype = 'header'">Header</xsl:when>
  268. <xsl:when test="$rowtype = 'footer'">Footer</xsl:when>
  269. <xsl:otherwise>Detail</xsl:otherwise>
  270. </xsl:choose>
  271. </ccs:type>
  272. <xsl:for-each select="DRI">
  273. <ccs:cells>
  274. <!-- for an empty crosstab corner, create a textframe, with the spans and styles of the corner -->
  275. <xsl:if test="@layoutClass = 'crosstabCorner' and count(*) = 0">
  276. <ccs:parts>
  277. <ccs:id/>
  278. <xsl:if test="@rowspan">
  279. <ccs:rowspan>
  280. <xsl:value-of select="@rowspan"/>
  281. </ccs:rowspan>
  282. </xsl:if>
  283. <xsl:if test="@colspan">
  284. <ccs:colspan>
  285. <xsl:value-of select="@colspan"/>
  286. </ccs:colspan>
  287. </xsl:if>
  288. <ccs:type>TextFrame</ccs:type>
  289. <ccs:content>
  290. <ccs:textFrame>
  291. <ccs:value/>
  292. <ccs:dataFormat/>
  293. <ccs:valueType>text</ccs:valueType>
  294. </ccs:textFrame>
  295. </ccs:content>
  296. <xsl:call-template name="styles"/>
  297. </ccs:parts>
  298. </xsl:if>
  299. <xsl:for-each select="*">
  300. <xsl:apply-templates select=".">
  301. <xsl:with-param name="reloc">ccs:parts</xsl:with-param>
  302. </xsl:apply-templates>
  303. </xsl:for-each>
  304. </ccs:cells>
  305. </xsl:for-each>
  306. </ccs:row>
  307. </xsl:template>
  308. <xsl:template match="OIMG ">
  309. <xsl:param name="locid"/>
  310. <xsl:param name="reloc"/>
  311. <!-- temp fix for handling QS sort indicator images in COC -->
  312. <xsl:if test="$reloc != 'parts' or count(../*) &lt; 2">
  313. <xsl:element name="{$reloc}">
  314. <ccs:id>
  315. <xsl:choose>
  316. <xsl:when test="@name">
  317. <xsl:value-of select="@name"/>
  318. </xsl:when>
  319. <xsl:otherwise>
  320. <xsl:value-of select="$locid"/>
  321. </xsl:otherwise>
  322. </xsl:choose>
  323. </ccs:id>
  324. <ccs:locid>
  325. <xsl:value-of select="$locid"/>
  326. </ccs:locid>
  327. <ccs:type>Image</ccs:type>
  328. <ccs:content>
  329. <ccs:image>
  330. <ccs:url>
  331. <xsl:choose>
  332. <xsl:when test="starts-with(@src,'http')">
  333. <xsl:value-of select="@src"/>
  334. </xsl:when>
  335. <xsl:otherwise>
  336. <ccs:unprocessedGateway>
  337. <xsl:choose>
  338. <xsl:when test="starts-with(@src,'?')">
  339. <xsl:value-of select="@src"/>
  340. </xsl:when>
  341. <xsl:otherwise>
  342. <xsl:value-of select="concat('/../', @src)"/>
  343. </xsl:otherwise>
  344. </xsl:choose>
  345. </ccs:unprocessedGateway>
  346. </xsl:otherwise>
  347. </xsl:choose>
  348. </ccs:url>
  349. </ccs:image>
  350. <ccs:style/>
  351. </ccs:content>
  352. </xsl:element>
  353. </xsl:if>
  354. </xsl:template>
  355. <xsl:template match="OCHART">
  356. <xsl:param name="locid"/>
  357. <xsl:param name="reloc"/>
  358. <xsl:element name="{$reloc}">
  359. <ccs:id>
  360. <xsl:choose>
  361. <xsl:when test="@name">
  362. <xsl:value-of select="@name"/>
  363. </xsl:when>
  364. <xsl:otherwise>
  365. <xsl:value-of select="$locid"/>
  366. </xsl:otherwise>
  367. </xsl:choose>
  368. </ccs:id>
  369. <ccs:locid>
  370. <xsl:value-of select="$locid"/>
  371. </ccs:locid>
  372. <ccs:type>Chart</ccs:type>
  373. <ccs:content>
  374. <ccs:chart>
  375. <ccs:imageUrl>
  376. <xsl:choose>
  377. <xsl:when test="starts-with(@src,'http')">
  378. <xsl:value-of select="@src"/>
  379. </xsl:when>
  380. <xsl:otherwise>
  381. <ccs:unprocessedGateway>
  382. <xsl:choose>
  383. <xsl:when test="starts-with(@src,'?')">
  384. <xsl:value-of select="@src"/>
  385. </xsl:when>
  386. <xsl:otherwise>
  387. <xsl:value-of select="concat('/../', @src)"/>
  388. </xsl:otherwise>
  389. </xsl:choose>
  390. </ccs:unprocessedGateway>
  391. </xsl:otherwise>
  392. </xsl:choose>
  393. </ccs:imageUrl>
  394. </ccs:chart>
  395. <ccs:style/>
  396. </ccs:content>
  397. </xsl:element>
  398. </xsl:template>
  399. <xsl:template match="OTR">
  400. <xsl:param name="locid"/>
  401. <xsl:param name="reloc"/>
  402. <xsl:for-each select="*">
  403. <xsl:apply-templates select=".">
  404. <xsl:with-param name="locid">
  405. <xsl:value-of select="$locid"/>
  406. </xsl:with-param>
  407. <xsl:with-param name="reloc">
  408. <xsl:value-of select="$reloc"/>
  409. </xsl:with-param>
  410. </xsl:apply-templates>
  411. </xsl:for-each>
  412. </xsl:template>
  413. <xsl:template match="drillTargets">
  414. <xsl:param name="locid"/>
  415. <xsl:param name="reloc"/>
  416. <xsl:for-each select="OTI">
  417. <xsl:apply-templates select=".">
  418. <xsl:with-param name="reloc">
  419. <xsl:value-of select="$reloc"/>
  420. </xsl:with-param>
  421. <xsl:with-param name="isDrillTarget">true</xsl:with-param>
  422. </xsl:apply-templates>
  423. </xsl:for-each>
  424. </xsl:template>
  425. <xsl:template match="OCAPTION">
  426. <!-- Do nothing with fieldset captions-->
  427. </xsl:template>
  428. <xsl:template match="OTI">
  429. <xsl:param name="locid"/>
  430. <xsl:param name="reloc"/>
  431. <xsl:param name="isDrillTarget">false</xsl:param>
  432. <xsl:if test="not(@style = 'visibility:hidden')">
  433. <xsl:element name="{$reloc}">
  434. <ccs:id>
  435. <xsl:choose>
  436. <xsl:when test="@name">
  437. <xsl:value-of select="@name"/>
  438. </xsl:when>
  439. <xsl:otherwise>
  440. <xsl:value-of select="$locid"/>
  441. </xsl:otherwise>
  442. </xsl:choose>
  443. </ccs:id>
  444. <ccs:locid>
  445. <xsl:value-of select="$locid"/>
  446. </ccs:locid>
  447. <xsl:choose>
  448. <xsl:when test="$isDrillTarget = 'true'">
  449. <xsl:if test="../../@rowspan">
  450. <ccs:rowspan>
  451. <xsl:value-of select="../../@rowspan"/>
  452. </ccs:rowspan>
  453. </xsl:if>
  454. </xsl:when>
  455. <xsl:when test="../../../../@rowspan and ../../../@layoutClass='table'">
  456. <ccs:rowspan>
  457. <xsl:value-of select="../../../../@rowspan"/>
  458. </ccs:rowspan>
  459. </xsl:when>
  460. <xsl:when test="../@rowspan">
  461. <ccs:rowspan>
  462. <xsl:value-of select="../@rowspan"/>
  463. </ccs:rowspan>
  464. </xsl:when>
  465. </xsl:choose>
  466. <xsl:choose>
  467. <xsl:when test="$isDrillTarget = 'true'">
  468. <xsl:choose>
  469. <xsl:when test="../../@colspan">
  470. <ccs:colspan>
  471. <xsl:value-of select="../../@colspan"/>
  472. </ccs:colspan>
  473. </xsl:when>
  474. <xsl:when test="../../@colSpan">
  475. <ccs:colspan>
  476. <xsl:value-of select="../../@colSpan"/>
  477. </ccs:colspan>
  478. </xsl:when>
  479. </xsl:choose>
  480. </xsl:when>
  481. <xsl:when test="../../../../@colspan and ../../../@layoutClass='table'">
  482. <ccs:colspan>
  483. <xsl:value-of select="../../../../@colspan"/>
  484. </ccs:colspan>
  485. </xsl:when>
  486. <xsl:when test="../@colspan">
  487. <ccs:colspan>
  488. <xsl:value-of select="../@colspan"/>
  489. </ccs:colspan>
  490. </xsl:when>
  491. <xsl:when test="../@colSpan">
  492. <colspan>
  493. <xsl:value-of select="../@colSpan"/>
  494. </colspan>
  495. </xsl:when>
  496. </xsl:choose>
  497. <ccs:type>TextFrame</ccs:type>
  498. <ccs:content>
  499. <ccs:textFrame>
  500. <ccs:value>
  501. <xsl:choose>
  502. <xsl:when test="($dataFmt='formattedData') or (string-length(@RawXML) = 0 )">
  503. <xsl:value-of select="."/>
  504. </xsl:when>
  505. <xsl:otherwise>
  506. <xsl:choose>
  507. <xsl:when test="@valueType = 'number' ">
  508. <xsl:value-of select="translate(@RawXML, ',', '.')"/>
  509. </xsl:when>
  510. <xsl:when test="@valueType = 'currency' ">
  511. <xsl:value-of select="translate(@RawXML, ',', '.')"/>
  512. </xsl:when>
  513. <xsl:when test="@valueType = 'percent' ">
  514. <xsl:value-of select="translate(@RawXML, ',', '.')"/>
  515. </xsl:when>
  516. <xsl:otherwise>
  517. <xsl:value-of select="@RawXML"/>
  518. </xsl:otherwise>
  519. </xsl:choose>
  520. </xsl:otherwise>
  521. </xsl:choose>
  522. </ccs:value>
  523. <ccs:dataFormat>
  524. <xsl:value-of select="@formatPatternExcel"/>
  525. </ccs:dataFormat>
  526. <ccs:valueType>
  527. <xsl:value-of select="@valueType"/>
  528. </ccs:valueType>
  529. </ccs:textFrame>
  530. </ccs:content>
  531. <xsl:call-template name="styles"/>
  532. </xsl:element>
  533. </xsl:if>
  534. </xsl:template>
  535. <xsl:template name="styles">
  536. <xsl:if test="string-length(../../../@class) &gt; 0">
  537. <ccs:preProcessedStyle>
  538. <xsl:value-of select="../../../@class"/>
  539. </ccs:preProcessedStyle>
  540. </xsl:if>
  541. <xsl:if test="string-length(../../../@style) &gt; 0">
  542. <ccs:unprocessedStyle>
  543. <xsl:value-of select="../../../@style"/>
  544. </ccs:unprocessedStyle>
  545. </xsl:if>
  546. <xsl:if test="string-length(../../@class) &gt; 0">
  547. <ccs:preProcessedStyle>
  548. <xsl:value-of select="../../@class"/>
  549. </ccs:preProcessedStyle>
  550. </xsl:if>
  551. <xsl:if test="string-length(../../@style) &gt; 0">
  552. <ccs:unprocessedStyle>
  553. <xsl:value-of select="../../@style"/>
  554. </ccs:unprocessedStyle>
  555. </xsl:if>
  556. <xsl:if test="string-length(../@class) &gt; 0">
  557. <ccs:preProcessedStyle>
  558. <xsl:value-of select="../@class"/>
  559. </ccs:preProcessedStyle>
  560. </xsl:if>
  561. <xsl:if test="string-length(../@style) &gt; 0">
  562. <ccs:unprocessedStyle>
  563. <xsl:value-of select="../@style"/>
  564. </ccs:unprocessedStyle>
  565. </xsl:if>
  566. <xsl:if test="string-length(@class) &gt; 0">
  567. <ccs:preProcessedStyle>
  568. <xsl:value-of select="@class"/>
  569. </ccs:preProcessedStyle>
  570. </xsl:if>
  571. <xsl:if test="string-length(@style) &gt; 0">
  572. <ccs:unprocessedStyle>
  573. <xsl:value-of select="@style"/>
  574. </ccs:unprocessedStyle>
  575. </xsl:if>
  576. </xsl:template>
  577. </xsl:stylesheet>