info2atom.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  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:info="http://developer.cognos.com/schemas/rds/types/1" xmlns:ccs="com.cognos.ccs.xslt.XSLTFunctions" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:d="@extensionnamespace@">
  9. <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
  10. <xsl:template match="/">
  11. <xsl:comment> Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  12. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated)</xsl:comment>
  13. <atom:feed>
  14. <atom:id>
  15. <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@')"/>
  16. </atom:id>
  17. <atom:title>@report_title@</atom:title>
  18. <atom:updated>@report_updated@</atom:updated>
  19. <atom:author>
  20. <atom:name>@report_author@</atom:name>@report_author_email@
  21. </atom:author>
  22. <atom:link rel="self" type="application/atom+xml" href="@report_gateway@/rds/atom/path/@report_id@?v=@requestversion@"/>
  23. <atom:link rel="alternate" type="text/xml" href="@report_gateway@/rds/content/path/@report_id@?v=@requestversion@"/>
  24. <d:owner>@report_author@</d:owner>
  25. <d:ownerEmail>@report_owner_email@</d:ownerEmail>
  26. <d:contact>@report_contact_name@</d:contact>
  27. <d:contactEmail>@report_contact_email@</d:contactEmail>
  28. <d:location>@report_location@</d:location>
  29. <d:description>@report_description_text@</d:description>
  30. <d:thumbnailURL>@report_gateway@/rds/thumbnail/report/@report_storeid@?v=@requestversion@</d:thumbnailURL>
  31. <xsl:apply-templates select="/info:document/*"/>
  32. </atom:feed>
  33. </xsl:template>
  34. <xsl:template match="info:pageSet">
  35. <xsl:apply-templates select="./pageOverallGroup/headerPages/*"/>
  36. <xsl:apply-templates select="./detailPages/*"/>
  37. <xsl:apply-templates select="./pageOverallGroup/footerPages/*"/>
  38. <xsl:for-each select="./pageGroups/pageGroup">
  39. <xsl:apply-templates select="headerPages/*"/>
  40. <xsl:apply-templates select="footerPages/*"/>
  41. </xsl:for-each>
  42. </xsl:template>
  43. <xsl:template match="info:page">
  44. <xsl:call-template name="atomPageEntry">
  45. <xsl:with-param name="entryID">
  46. <xsl:value-of select="./d:id"/>
  47. </xsl:with-param>
  48. <xsl:with-param name="entryType">page</xsl:with-param>
  49. <xsl:with-param name="entryIcon">folder</xsl:with-param>
  50. </xsl:call-template>
  51. <xsl:element name="subFeed">
  52. <xsl:attribute name="name"><xsl:value-of select="./d:id"/></xsl:attribute>
  53. <xsl:attribute name="type">page</xsl:attribute>
  54. <atom:feed>
  55. <atom:id>
  56. <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', ./d:id)"/>
  57. </atom:id>
  58. <atom:title>
  59. <xsl:value-of select="./d:id"/>
  60. </atom:title>
  61. <atom:updated>@report_updated@</atom:updated>
  62. <atom:author>
  63. <atom:name>Cognos</atom:name>
  64. </atom:author>
  65. <atom:link rel="self" type="application/atom+xml">
  66. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',./d:id,'&amp;eltype=page','&amp;v=@requestversion@')"/></xsl:attribute>
  67. </atom:link>
  68. <xsl:if test="info:header/info:item/*">
  69. <xsl:call-template name="atomVirtualEntry">
  70. <xsl:with-param name="entryID">
  71. <xsl:value-of select="./d:id"/>
  72. </xsl:with-param>
  73. <xsl:with-param name="entryType">header</xsl:with-param>
  74. <xsl:with-param name="entryIcon">folder</xsl:with-param>
  75. <xsl:with-param name="entryName">@header_title@</xsl:with-param>
  76. </xsl:call-template>
  77. </xsl:if>
  78. <xsl:if test="info:body/info:item/*/d:id">
  79. <xsl:call-template name="atomVirtualEntry">
  80. <xsl:with-param name="entryID">
  81. <xsl:value-of select="./d:id"/>
  82. </xsl:with-param>
  83. <xsl:with-param name="entryType">body</xsl:with-param>
  84. <xsl:with-param name="entryIcon">folder</xsl:with-param>
  85. <xsl:with-param name="entryName">@body_title@</xsl:with-param>
  86. </xsl:call-template>
  87. </xsl:if>
  88. <xsl:if test="info:footer/info:item/*/d:id">
  89. <xsl:call-template name="atomVirtualEntry">
  90. <xsl:with-param name="entryID">
  91. <xsl:value-of select="./d:id"/>
  92. </xsl:with-param>
  93. <xsl:with-param name="entryType">footer</xsl:with-param>
  94. <xsl:with-param name="entryIcon">folder</xsl:with-param>
  95. <xsl:with-param name="entryName">@footer_title@</xsl:with-param>
  96. </xsl:call-template>
  97. </xsl:if>
  98. </atom:feed>
  99. </xsl:element>
  100. <xsl:if test="info:header/info:item/*/d:id">
  101. <xsl:element name="subFeed">
  102. <xsl:attribute name="name"><xsl:value-of select="./d:id"/></xsl:attribute>
  103. <xsl:attribute name="type">header</xsl:attribute>
  104. <atom:feed>
  105. <atom:id>
  106. <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', ./d:id, ':header')"/>
  107. </atom:id>
  108. <atom:title>@header_title@</atom:title>
  109. <atom:updated>@report_updated@</atom:updated>
  110. <atom:author>
  111. <atom:name>Cognos</atom:name>
  112. </atom:author>
  113. <atom:link rel="self" type="application/atom+xml">
  114. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',./d:id,'&amp;eltype=header','&amp;v=@requestversion@')"/></xsl:attribute>
  115. </atom:link>
  116. <xsl:apply-templates select="info:header/info:item/*"/>
  117. </atom:feed>
  118. </xsl:element>
  119. </xsl:if>
  120. <xsl:if test="info:body/info:item/*/d:id">
  121. <xsl:element name="subFeed">
  122. <xsl:attribute name="name"><xsl:value-of select="./d:id"/></xsl:attribute>
  123. <xsl:attribute name="type">body</xsl:attribute>
  124. <atom:feed>
  125. <atom:id>
  126. <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', ./d:id, ':body')"/>
  127. </atom:id>
  128. <atom:title>@body_title@</atom:title>
  129. <atom:updated>@report_updated@</atom:updated>
  130. <atom:author>
  131. <atom:name>Cognos</atom:name>
  132. </atom:author>
  133. <atom:link rel="self" type="application/atom+xml">
  134. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',./d:id,'&amp;eltype=body','&amp;v=@requestversion@')"/></xsl:attribute>
  135. </atom:link>
  136. <xsl:apply-templates select="info:body/info:item/*"/>
  137. </atom:feed>
  138. </xsl:element>
  139. </xsl:if>
  140. <xsl:if test="info:footer/info:item/*/d:id">
  141. <xsl:element name="subFeed">
  142. <xsl:attribute name="name"><xsl:value-of select="./d:id"/></xsl:attribute>
  143. <xsl:attribute name="type">footer</xsl:attribute>
  144. <atom:feed>
  145. <atom:id>
  146. <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', ./d:id, ':footer')"/>
  147. </atom:id>
  148. <atom:title>@footer_title@</atom:title>
  149. <atom:updated>@report_updated@</atom:updated>
  150. <atom:author>
  151. <atom:name>Cognos</atom:name>
  152. </atom:author>
  153. <atom:link rel="self" type="application/atom+xml">
  154. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',./d:id,'&amp;eltype=footer','&amp;v=@requestversion@')"/></xsl:attribute>
  155. </atom:link>
  156. <xsl:apply-templates select="info:footer/info:item/*"/>
  157. </atom:feed>
  158. </xsl:element>
  159. </xsl:if>
  160. </xsl:template>
  161. <xsl:template match="info:table">
  162. <xsl:apply-templates select="tableRows/tableRow"/>
  163. </xsl:template>
  164. <xsl:template match="info:tableRow">
  165. <xsl:apply-templates select="tableCells/tableCell"/>
  166. </xsl:template>
  167. <xsl:template match="info:tableCell">
  168. <xsl:apply-templates select="contents/*"/>
  169. </xsl:template>
  170. <xsl:template match="info:block">
  171. <xsl:apply-templates select="contents/*"/>
  172. </xsl:template>
  173. <xsl:template match="info:MListFrame">
  174. <xsl:if test="./d:id">
  175. <xsl:call-template name="atomEntry">
  176. <xsl:with-param name="entryID">
  177. <xsl:value-of select="./d:id"/>
  178. </xsl:with-param>
  179. <xsl:with-param name="entryType">list</xsl:with-param>
  180. </xsl:call-template>
  181. </xsl:if>
  182. </xsl:template>
  183. <xsl:template match="info:TOC">
  184. <xsl:if test="@tocName">
  185. <xsl:call-template name="atomEntry">
  186. <xsl:with-param name="entryID">
  187. <xsl:value-of select="./d:id"/>
  188. </xsl:with-param>
  189. <xsl:with-param name="entryType">toc</xsl:with-param>
  190. </xsl:call-template>
  191. </xsl:if>
  192. </xsl:template>
  193. <xsl:template match="info:MTextFrame">
  194. <xsl:if test="./d:id">
  195. <xsl:call-template name="atomEntry">
  196. <xsl:with-param name="entryID">
  197. <xsl:value-of select="./d:id"/>
  198. </xsl:with-param>
  199. <xsl:with-param name="entryType">textframe</xsl:with-param>
  200. </xsl:call-template>
  201. </xsl:if>
  202. </xsl:template>
  203. <xsl:template match="info:MImage">
  204. <xsl:if test="./d:id">
  205. <xsl:call-template name="atomEntry">
  206. <xsl:with-param name="entryID">
  207. <xsl:value-of select="./d:id"/>
  208. </xsl:with-param>
  209. <xsl:with-param name="entryType">image</xsl:with-param>
  210. </xsl:call-template>
  211. </xsl:if>
  212. </xsl:template>
  213. <xsl:template match="info:MCrosstab">
  214. <xsl:if test="./d:id">
  215. <xsl:call-template name="atomEntry">
  216. <xsl:with-param name="entryID">
  217. <xsl:value-of select="./d:id"/>
  218. </xsl:with-param>
  219. <xsl:with-param name="entryType">crosstab</xsl:with-param>
  220. </xsl:call-template>
  221. </xsl:if>
  222. </xsl:template>
  223. <xsl:template match="info:MRepeaterTable">
  224. <xsl:if test="./d:id">
  225. <xsl:call-template name="atomEntry">
  226. <xsl:with-param name="entryID">
  227. <xsl:value-of select="./d:id"/>
  228. </xsl:with-param>
  229. <xsl:with-param name="entryType">repeater_table</xsl:with-param>
  230. </xsl:call-template>
  231. </xsl:if>
  232. </xsl:template>
  233. <xsl:template match="info:MRepeater">
  234. <xsl:if test="./d:id">
  235. <xsl:call-template name="atomEntry">
  236. <xsl:with-param name="entryID">
  237. <xsl:value-of select="./d:id"/>
  238. </xsl:with-param>
  239. <xsl:with-param name="entryType">repeater</xsl:with-param>
  240. </xsl:call-template>
  241. </xsl:if>
  242. </xsl:template>
  243. <xsl:template match="info:MHyperlink">
  244. <xsl:if test="./d:id">
  245. <xsl:call-template name="atomEntry">
  246. <xsl:with-param name="entryID">
  247. <xsl:value-of select="./d:id"/>
  248. </xsl:with-param>
  249. <xsl:with-param name="entryType">hyperlink</xsl:with-param>
  250. </xsl:call-template>
  251. </xsl:if>
  252. </xsl:template>
  253. <xsl:template match="info:MHTMLItem">
  254. <xsl:if test="./d:id">
  255. <xsl:call-template name="atomEntry">
  256. <xsl:with-param name="entryID">
  257. <xsl:value-of select="./d:id"/>
  258. </xsl:with-param>
  259. <xsl:with-param name="entryType">html</xsl:with-param>
  260. </xsl:call-template>
  261. </xsl:if>
  262. </xsl:template>
  263. <xsl:template match="info:MRichTextItem">
  264. <xsl:if test="./d:id">
  265. <xsl:call-template name="atomEntry">
  266. <xsl:with-param name="entryID">
  267. <xsl:value-of select="./d:id"/>
  268. </xsl:with-param>
  269. <xsl:with-param name="entryType">richtext</xsl:with-param>
  270. </xsl:call-template>
  271. </xsl:if>
  272. </xsl:template>
  273. <xsl:template match="info:MBookmark">
  274. <xsl:if test="./d:id">
  275. <xsl:call-template name="atomEntry">
  276. <xsl:with-param name="entryID">
  277. <xsl:value-of select="./d:id"/>
  278. </xsl:with-param>
  279. <xsl:with-param name="entryType">bookmark</xsl:with-param>
  280. </xsl:call-template>
  281. </xsl:if>
  282. </xsl:template>
  283. <xsl:template match="info:MTOCEntry">
  284. <xsl:if test="./d:id">
  285. <xsl:call-template name="atomEntry">
  286. <xsl:with-param name="entryID">
  287. <xsl:value-of select="./d:id"/>
  288. </xsl:with-param>
  289. <xsl:with-param name="entryType">bookmark</xsl:with-param>
  290. </xsl:call-template>
  291. </xsl:if>
  292. </xsl:template>
  293. <xsl:template match="fieldset">
  294. <xsl:apply-templates select="contents/*"/>
  295. </xsl:template>
  296. <xsl:template match="conditionalBlocks">
  297. <xsl:apply-templates select="./conditionalBlockDefault/contents/*"/>
  298. <xsl:for-each select="./conditionalBlockCases/conditionalBlock">
  299. <xsl:apply-templates select="./contents/*"/>
  300. </xsl:for-each>
  301. </xsl:template>
  302. <xsl:template match="layoutComponentRef">
  303. <xsl:if test="./d:id">
  304. <xsl:call-template name="atomEntry">
  305. <xsl:with-param name="entryID">
  306. <xsl:value-of select="concat(./d:id, '_REF')"/>
  307. </xsl:with-param>
  308. <xsl:with-param name="entryType">layout_component_ref</xsl:with-param>
  309. </xsl:call-template>
  310. </xsl:if>
  311. </xsl:template>
  312. <xsl:template match="CMMMap">
  313. <xsl:if test="./d:id">
  314. <xsl:call-template name="atomEntry">
  315. <xsl:with-param name="entryID">
  316. <xsl:value-of select="./d:id"/>
  317. </xsl:with-param>
  318. <xsl:with-param name="entryType">image</xsl:with-param>
  319. </xsl:call-template>
  320. </xsl:if>
  321. </xsl:template>
  322. <xsl:template match="info:MChart">
  323. <xsl:if test="./d:id">
  324. <xsl:call-template name="atomEntry">
  325. <xsl:with-param name="entryID">
  326. <xsl:value-of select="./d:id"/>
  327. </xsl:with-param>
  328. <xsl:with-param name="entryType">chart</xsl:with-param>
  329. </xsl:call-template>
  330. </xsl:if>
  331. </xsl:template>
  332. <xsl:template match="info:MWidget">
  333. <xsl:if test="./d:id">
  334. <xsl:call-template name="atomWidgetEntry">
  335. <xsl:with-param name="entryID">
  336. <xsl:value-of select="./d:id"/>
  337. </xsl:with-param>
  338. <xsl:with-param name="entryType">widget</xsl:with-param>
  339. <xsl:with-param name="storeID">
  340. <xsl:value-of select="./info:storeID"/>
  341. </xsl:with-param>
  342. </xsl:call-template>
  343. </xsl:if>
  344. </xsl:template>
  345. <xsl:template match="*">
  346. <!--Unknown element. Ignore-->
  347. </xsl:template>
  348. <xsl:template name="atomEntry">
  349. <xsl:param name="entryID"/>
  350. <xsl:param name="entryIcon"/>
  351. <xsl:param name="entryType"/>
  352. <atom:entry>
  353. <atom:id>
  354. <xsl:choose>
  355. <xsl:when test="function-available('ccs:encodeID')">
  356. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',ccs:encodeID($entryID))"/>
  357. </xsl:when>
  358. <xsl:otherwise>
  359. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID)"/>
  360. </xsl:otherwise>
  361. </xsl:choose>
  362. </atom:id>
  363. <atom:title>
  364. <xsl:value-of select="$entryID"/>
  365. </atom:title>
  366. <atom:updated>@report_updated@</atom:updated>
  367. <atom:link>
  368. <xsl:attribute name="rel">icon</xsl:attribute>
  369. <xsl:attribute name="type">image/gif</xsl:attribute>
  370. <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/ccs/images/', $entryType,'_icon.gif')"/></xsl:attribute>
  371. </atom:link>
  372. <atom:link>
  373. <xsl:attribute name="rel">thumbnail</xsl:attribute>
  374. <xsl:attribute name="type">image/gif</xsl:attribute>
  375. <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/@report_storeid@?selection=',ccs:encodeID($entryID),'&amp;v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/thumbnail/reportpart/@report_storeid@?selection=',$entryID,'&amp;v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  376. </atom:link>
  377. <atom:link>
  378. <xsl:attribute name="rel">alternate</xsl:attribute>
  379. <xsl:attribute name="type">application/x-ldx+xml</xsl:attribute>
  380. <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/content/path/@report_id@?selection=',ccs:encodeID($entryID),'&amp;v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/content/path/@report_id@?selection=',$entryID,'&amp;v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  381. </atom:link>
  382. <cm:objectClass>reportpart</cm:objectClass>
  383. <d:type>
  384. <xsl:value-of select="$entryType"/>
  385. </d:type>
  386. </atom:entry>
  387. </xsl:template>
  388. <xsl:template name="atomVirtualEntry">
  389. <xsl:param name="entryID"/>
  390. <xsl:param name="entryIcon"/>
  391. <xsl:param name="entryType"/>
  392. <xsl:param name="entryName"/>
  393. <atom:entry>
  394. <atom:id>
  395. <xsl:choose>
  396. <xsl:when test="function-available('ccs:encodeID')">
  397. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',ccs:encodeID($entryID), ':', $entryType)"/>
  398. </xsl:when>
  399. <xsl:otherwise>
  400. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID, ':', $entryType)"/>
  401. </xsl:otherwise>
  402. </xsl:choose>
  403. </atom:id>
  404. <atom:title>
  405. <xsl:value-of select="$entryName"/>
  406. </atom:title>
  407. <atom:updated>@report_updated@</atom:updated>
  408. <atom:link>
  409. <xsl:attribute name="rel">icon</xsl:attribute>
  410. <xsl:attribute name="type">image/gif</xsl:attribute>
  411. <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/ccs/images/', $entryIcon,'_icon.gif')"/></xsl:attribute>
  412. </atom:link>
  413. <atom:link>
  414. <xsl:attribute name="rel">alternate</xsl:attribute>
  415. <xsl:attribute name="type">application/atom+xml</xsl:attribute>
  416. <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',ccs:encodeID($entryID),'&amp;eltype=',$entryType,'&amp;v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',$entryID,'&amp;eltype=',$entryType,'&amp;v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  417. </atom:link>
  418. <d:type>
  419. <xsl:value-of select="$entryType"/>
  420. </d:type>
  421. </atom:entry>
  422. </xsl:template>
  423. <xsl:template name="atomPageEntry">
  424. <xsl:param name="entryID"/>
  425. <xsl:param name="entryIcon"/>
  426. <atom:entry>
  427. <atom:id>
  428. <xsl:choose>
  429. <xsl:when test="function-available('ccs:encodeID')">
  430. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',ccs:encodeID($entryID))"/>
  431. </xsl:when>
  432. <xsl:otherwise>
  433. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID)"/>
  434. </xsl:otherwise>
  435. </xsl:choose>
  436. </atom:id>
  437. <atom:title>
  438. <xsl:value-of select="$entryID"/>
  439. </atom:title>
  440. <atom:updated>@report_updated@</atom:updated>
  441. <atom:link>
  442. <xsl:attribute name="rel">icon</xsl:attribute>
  443. <xsl:attribute name="type">image/gif</xsl:attribute>
  444. <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/ccs/images/', $entryIcon,'_icon.gif')"/></xsl:attribute>
  445. </atom:link>
  446. <atom:link>
  447. <xsl:attribute name="rel">alternate</xsl:attribute>
  448. <xsl:attribute name="type">application/atom+xml</xsl:attribute>
  449. <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',ccs:encodeID($entryID),'&amp;eltype=page','&amp;v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/atom/path/@report_id@?selection=',$entryID,'&amp;type=page','&amp;v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  450. </atom:link>
  451. <atom:link>
  452. <xsl:attribute name="rel">alternate</xsl:attribute>
  453. <xsl:attribute name="type">application/x-ldx+xml</xsl:attribute>
  454. <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/content/path/@report_id@?selection=',ccs:encodeID($entryID),'&amp;eltype=page','&amp;v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/content/path/@report_id@?selection=',$entryID,'&amp;v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
  455. </atom:link>
  456. <d:type>page</d:type>
  457. </atom:entry>
  458. </xsl:template>
  459. <xsl:template name="atomWidgetEntry">
  460. <xsl:param name="entryID"/>
  461. <xsl:param name="entryType"/>
  462. <xsl:param name="storeID"/>
  463. <atom:entry>
  464. <atom:id>
  465. <xsl:choose>
  466. <xsl:when test="function-available('ccs:encodeID')">
  467. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',ccs:encodeID($entryID))"/>
  468. </xsl:when>
  469. <xsl:otherwise>
  470. <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID)"/>
  471. </xsl:otherwise>
  472. </xsl:choose>
  473. </atom:id>
  474. <atom:title>
  475. <xsl:value-of select="$entryID"/>
  476. </atom:title>
  477. <atom:updated>@report_updated@</atom:updated>
  478. <atom:link>
  479. <xsl:attribute name="rel">icon</xsl:attribute>
  480. <xsl:attribute name="type">image/gif</xsl:attribute>
  481. <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/ccs/images/', $entryType,'_icon.gif')"/></xsl:attribute>
  482. </atom:link>
  483. <atom:link>
  484. <xsl:attribute name="rel">thumbnail</xsl:attribute>
  485. <xsl:attribute name="type">image/gif</xsl:attribute>
  486. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/', $storeID,'?v=@requestversion@')"/></xsl:attribute>
  487. </atom:link>
  488. <atom:link>
  489. <xsl:attribute name="rel">alternate</xsl:attribute>
  490. <xsl:attribute name="type">application/atom+xml</xsl:attribute>
  491. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom/report/', $storeID,'?v=@requestversion@')"/></xsl:attribute>
  492. </atom:link>
  493. <atom:link>
  494. <xsl:attribute name="rel">alternate</xsl:attribute>
  495. <xsl:attribute name="type">application/x-ldx+xml</xsl:attribute>
  496. <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/content/report/', $storeID,'?v=@requestversion@')"/></xsl:attribute>
  497. </atom:link>
  498. <cm:objectClass>reportpart</cm:objectClass>
  499. <d:type>
  500. <xsl:value-of select="$entryType"/>
  501. </d:type>
  502. </atom:entry>
  503. </xsl:template>
  504. </xsl:stylesheet>