V5html_sdk.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: rsvp
  5. (C) Copyright IBM Corp. 2005, 2019
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rsext="xalan://com.cognos.reportserver.ext.RSExt" version="1.0" extension-element-prefixes="rsext">
  10. <xsl:include href="V5environment_sdk.xsl"/>
  11. <xsl:include href="V5ReportEngine.xsl"/>
  12. <xsl:include href="V5drillthru.xsl"/>
  13. <xsl:include href="../../ps/prompting/p_include_V5ParamSafe.xsl"/>
  14. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  15. <xsl:variable name="promptLocale" select="$contentLocale"/>
  16. <xsl:variable name="promptFormName" select="'formWarpRequest'"/>
  17. <xsl:variable name="sGenerateContextData">
  18. <xsl:choose>
  19. <!-- <xsl:when test="//META-DATA[@contextItemFormat='InitializerFormat'] and $strict='false'">true</xsl:when> -->
  20. <xsl:when test="$generateContextData = 'true' and $strict='false'">true</xsl:when>
  21. <xsl:otherwise>false</xsl:otherwise>
  22. </xsl:choose>
  23. </xsl:variable>
  24. <!--
  25. template : /Document
  26. -->
  27. <xsl:template match="/Document">
  28. <xsl:choose>
  29. <xsl:when test="$htmlFragment='true'">
  30. <xsl:if test="$firstPage='true'">
  31. <xsl:text disable-output-escaping="yes">&lt;!--
  32. Licensed Materials - Property of IBM
  33. IBM Cognos Products: rsvp
  34. (C) Copyright IBM Corp. 2005, 2013
  35. US Government Users Restricted Rights - Use, duplication or disclosure
  36. restricted by GSA ADP Schedule Contract with IBM Corp.
  37. --&gt;
  38. </xsl:text>
  39. <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
  40. <xsl:apply-templates select="/Document/styleOptions"/>
  41. <xsl:text disable-output-escaping="yes"> --&gt;
  42. </xsl:text>
  43. <xsl:call-template name="chartConfig"/>
  44. <xsl:call-template name="preProcess"/>
  45. </xsl:if>
  46. <xsl:apply-templates select="DATA"/>
  47. </xsl:when>
  48. <xsl:otherwise>
  49. <xsl:if test="$firstPage='true'">
  50. <xsl:choose>
  51. <xsl:when test="$Xhtml='true'">
  52. <xsl:choose>
  53. <xsl:when test="$strict='true'">
  54. <xsl:if test="$appSupport='false'">
  55. <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "</xsl:text>
  56. <xsl:value-of select="$basePath"/>
  57. <xsl:text disable-output-escaping="yes">../dtds/xhtml1-strict.dtd"&gt;
  58. </xsl:text>
  59. </xsl:if>
  60. <xsl:text disable-output-escaping="yes">&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="</xsl:text><xsl:value-of select="$contentLocale"/><xsl:text disable-output-escaping="yes">" xml:lang="</xsl:text><xsl:value-of select="$contentLocale"/><xsl:text disable-output-escaping="yes">"
  61. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  62. xsi:schemaLocation="http://www.w3.org/1999/xhtml </xsl:text>
  63. <xsl:text disable-output-escaping="yes">../dtds/xhtml1-strict.xsd"&gt;
  64. </xsl:text>
  65. </xsl:when>
  66. <xsl:otherwise>
  67. <xsl:if test="$appSupport='false'">
  68. <xsl:choose>
  69. <xsl:when test="$quirks='false'">
  70. <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
  71. </xsl:when>
  72. <xsl:otherwise>
  73. <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "</xsl:text>
  74. <xsl:value-of select="$basePath"/>
  75. <xsl:text disable-output-escaping="yes">../dtds/xhtml1-transitional.dtd"&gt;
  76. </xsl:text>
  77. </xsl:otherwise>
  78. </xsl:choose>
  79. </xsl:if>
  80. <xsl:text disable-output-escaping="yes">
  81. &lt;html lang="</xsl:text><xsl:value-of select="$contentLocale"/><xsl:text disable-output-escaping="yes">"&gt;
  82. </xsl:text>
  83. </xsl:otherwise>
  84. </xsl:choose>
  85. <xsl:text disable-output-escaping="yes">&lt;head&gt;</xsl:text>
  86. <xsl:if test="$appSupport='false'">
  87. <xsl:choose>
  88. <xsl:when test="$quirks='false'">
  89. <xsl:text disable-output-escaping="yes">
  90. &lt;meta http-equiv="Content-Type" content="text/html; charset=</xsl:text><xsl:value-of select="$encoding" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;
  91. &lt;meta name="Copyright" content="Licensed Materials - Property of IBM; IBM Cognos Products: rsvp; (C) Copyright IBM Corp. 2005, 2013; US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp."/&gt;
  92. &lt;meta name="GeneratorID" content="</xsl:text><xsl:value-of select="$generatorID" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;
  93. </xsl:text>
  94. </xsl:when>
  95. <xsl:otherwise>
  96. <xsl:text disable-output-escaping="yes">
  97. &lt;meta http-equiv="Content-Type" content="text/html; charset=</xsl:text><xsl:value-of select="$encoding" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;&lt;meta http-equiv="MSThemeCompatible" content="no"</xsl:text><xsl:text disable-output-escaping="yes">/&gt;
  98. &lt;meta http-equiv="X-UA-Compatible" content="IE=5"/&gt;
  99. &lt;meta name="Copyright" content="Licensed Materials - Property of IBM; IBM Cognos Products: rsvp; (C) Copyright IBM Corp. 2005, 2013; US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp."/&gt;
  100. &lt;meta name="GeneratorID" content="</xsl:text><xsl:value-of select="$generatorID" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;
  101. </xsl:text>
  102. </xsl:otherwise>
  103. </xsl:choose>
  104. </xsl:if>
  105. </xsl:when>
  106. <xsl:otherwise>
  107. <xsl:if test="$appSupport='false'">
  108. <!-- The system identifier (URI) is optional when the external identifier indicates the language is public -->
  109. <xsl:choose>
  110. <xsl:when test="$quirks='false'">
  111. <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;
  112. </xsl:text>
  113. </xsl:when>
  114. <xsl:otherwise>
  115. <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  116. </xsl:text>
  117. </xsl:otherwise>
  118. </xsl:choose>
  119. </xsl:if>
  120. <xsl:text disable-output-escaping="yes">&lt;html lang="</xsl:text><xsl:value-of select="$contentLocale"/><xsl:text disable-output-escaping="yes">"&gt;
  121. &lt;head&gt;</xsl:text>
  122. <xsl:if test="$appSupport='false'">
  123. <xsl:choose>
  124. <xsl:when test="$quirks='false'">
  125. <xsl:text disable-output-escaping="yes">
  126. &lt;meta http-equiv="Content-Type" content="text/html; charset=</xsl:text><xsl:value-of select="$encoding" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"&gt;</xsl:text><xsl:text disable-output-escaping="yes">
  127. &lt;meta name="Copyright" content="Licensed Materials - Property of IBM; IBM Cognos Products: rsvp; (C) Copyright IBM Corp. 2005, 2013; US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp."&gt;
  128. &lt;meta name="GeneratorID" content="</xsl:text><xsl:value-of select="$generatorID" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;
  129. </xsl:text>
  130. </xsl:when>
  131. <xsl:otherwise>
  132. <xsl:text disable-output-escaping="yes">
  133. &lt;meta http-equiv="Content-Type" content="text/html; charset=</xsl:text><xsl:value-of select="$encoding" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"&gt;&lt;meta http-equiv="MSThemeCompatible" content="no"</xsl:text><xsl:text disable-output-escaping="yes">/&gt;
  134. &lt;meta http-equiv="X-UA-Compatible" content="IE=5"&gt;
  135. &lt;meta name="Copyright" content="Licensed Materials - Property of IBM; IBM Cognos Products: rsvp; (C) Copyright IBM Corp. 2005, 2013; US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp."&gt;
  136. &lt;meta name="GeneratorID" content="</xsl:text><xsl:value-of select="$generatorID" disable-output-escaping="yes"/><xsl:text disable-output-escaping="yes">"/&gt;
  137. </xsl:text>
  138. </xsl:otherwise>
  139. </xsl:choose>
  140. </xsl:if>
  141. </xsl:otherwise>
  142. </xsl:choose>
  143. <!-- If generating HTML and XHTML, include the QS Viewer selection UI styles link (not applicable for fragments) -->
  144. <xsl:if test="$sGenerateContextData='true' and $appSupport='false'">
  145. <link rel="stylesheet" type="text/css" href="../skins/corporate/viewer/QSRVSelection.css"/>
  146. </xsl:if>
  147. <xsl:apply-templates select="/Document/styleOptions"/>
  148. <!-- Can't leave a empty title tag, XSLT will optimise it to <title/> and IE6.0 won't recognise it as a end tag, so all the rest of the document becomes the title and you get a blank page... -->
  149. <xsl:text disable-output-escaping="yes">
  150. &lt;title&gt;</xsl:text>
  151. <xsl:value-of select="$reportTitle" disable-output-escaping="yes"/>
  152. <xsl:text disable-output-escaping="yes">&lt;/title&gt;
  153. </xsl:text>
  154. <xsl:if test="$promptSupport='true'">
  155. <!-- Add prompt control javascript and style sheets -->
  156. <xsl:call-template name="getPromptHeadIncludes">
  157. <xsl:with-param name="promptLocale" select="$productLocale"/>
  158. <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
  159. </xsl:call-template>
  160. </xsl:if>
  161. <xsl:if test="$drillSupport!='no'">
  162. <xsl:call-template name="getDrillThruHead"/>
  163. </xsl:if>
  164. <xsl:call-template name="chartConfig"/>
  165. <xsl:call-template name="parentViewerScript"/>
  166. <xsl:call-template name="preProcess"/>
  167. <xsl:apply-templates select="/Document/ReportPageSet"/>
  168. <xsl:text disable-output-escaping="yes">
  169. &lt;/head&gt;
  170. &lt;body</xsl:text>
  171. <xsl:if test="$accessible='true'">
  172. <xsl:choose>
  173. <xsl:when test="$appSupport='false'">
  174. <xsl:text disable-output-escaping="yes"> role="main"</xsl:text>
  175. </xsl:when>
  176. <xsl:otherwise>
  177. <xsl:text disable-output-escaping="yes"> role="application"</xsl:text>
  178. </xsl:otherwise>
  179. </xsl:choose>
  180. </xsl:if>
  181. <!-- render the body tag and attributes -->
  182. <xsl:if test="$appSupport='false'">
  183. <xsl:choose>
  184. <xsl:when test="$strict='true'">
  185. <xsl:text disable-output-escaping="yes">
  186. onclick="if(parent &amp;amp;&amp;amp; typeof parent.oCV_THIS_ == 'object') parent.oCV_THIS_.rvMainWnd.pageClicked(event);"</xsl:text>
  187. </xsl:when>
  188. <xsl:otherwise>
  189. <xsl:text disable-output-escaping="yes">
  190. onclick="onClickEvent(event);"</xsl:text>
  191. </xsl:otherwise>
  192. </xsl:choose>
  193. <xsl:if test="$sGenerateContextData='true' or $accessible='true'">
  194. <xsl:text disable-output-escaping="yes"> onkeydown="onKeyDownEvent(event);"</xsl:text>
  195. <!-- generate the options on the body (which include interactive events when initializer format context is present) -->
  196. <xsl:if test="$sGenerateContextData='true'">
  197. <xsl:text disable-output-escaping="yes"> onload="onLoadEvent(event);" onmousemove="onMouseMoveEvent(event);" ondblclick="onDoubleClickEvent(event);" oncontextmenu="onContextMenuEvent(event);"</xsl:text>
  198. </xsl:if>
  199. </xsl:if>
  200. </xsl:if>
  201. <xsl:choose>
  202. <xsl:when test="$strict='true'">
  203. <xsl:text disable-output-escaping="yes"> style="margin-top:0px;margin-left:0px;background-color: #FFFFFF;"&gt;
  204. </xsl:text>
  205. </xsl:when>
  206. <xsl:otherwise>
  207. <xsl:text disable-output-escaping="yes"> topmargin="0" leftmargin="0" style="background-color: #FFFFFF;"&gt;
  208. </xsl:text>
  209. </xsl:otherwise>
  210. </xsl:choose>
  211. </xsl:if>
  212. <xsl:choose>
  213. <xsl:when test="$promptSupport='false'">
  214. <xsl:apply-templates select="DATA"/>
  215. </xsl:when>
  216. <xsl:otherwise>
  217. <xsl:if test="$firstPage='true'">
  218. <xsl:choose>
  219. <xsl:when test="$strict = 'true'">
  220. <xsl:text disable-output-escaping="yes">&lt;form name="formWarpRequest" id="formWarpRequest" method="post" style="margin:0px" onsubmit="if((typeof promptButtonOK).match(/^function$/i)){promptButtonOK();return false;} else if((typeof execute).match(/^function$/i)){execute();return false;}"&gt;
  221. </xsl:text>
  222. </xsl:when>
  223. <xsl:otherwise>
  224. <xsl:text disable-output-escaping="yes">&lt;FORM NAME="formWarpRequest" ID="formWarpRequest" METHOD="POST" style="margin:0px" onsubmit="if((typeof promptButtonOK).match(/^function$/i)){promptButtonOK();return false;} else if((typeof execute).match(/^function$/i)){execute();return false;}"&gt;
  225. </xsl:text>
  226. </xsl:otherwise>
  227. </xsl:choose>
  228. <xsl:if test="not(optionList/userData/@name='b_action')">
  229. <xsl:text disable-output-escaping="yes">&lt;input type="hidden" name="b_action" value="xts.run"/&gt;
  230. </xsl:text>
  231. </xsl:if>
  232. <xsl:if test="not(optionList/userData/@name='m')">
  233. <xsl:text disable-output-escaping="yes">&lt;input type="hidden" name="m" value="async/conv.xts"/&gt;
  234. </xsl:text>
  235. </xsl:if>
  236. <xsl:if test="not(optionList/userData/@name='ui.action')">
  237. <xsl:text disable-output-escaping="yes">&lt;input type="hidden" name="ui.action" value="forward"/&gt;
  238. </xsl:text>
  239. </xsl:if>
  240. <xsl:apply-templates select="optionList/userData[./@name!='ui.spec' or ./@name!='ui.conversation' or ./@name!='ui.object']"/>
  241. <xsl:text disable-output-escaping="yes">&lt;input type="hidden" name="ui.object" value=""/&gt;
  242. &lt;input type="hidden" name="ui.spec" value=""/&gt;
  243. &lt;input type="hidden" name="ui.conversation" value=""/&gt;
  244. &lt;input type="hidden" name="run.prompt" value=""/&gt;
  245. </xsl:text>
  246. </xsl:if>
  247. <xsl:apply-templates select="DATA"/>
  248. <xsl:if test="$lastPage='true'">
  249. <xsl:text disable-output-escaping="yes">
  250. &lt;/FORM&gt;
  251. </xsl:text>
  252. </xsl:if>
  253. </xsl:otherwise>
  254. </xsl:choose>
  255. <xsl:if test="$lastPage='true'">
  256. <xsl:call-template name="getDrillThruBody"/>
  257. <xsl:call-template name="postProcess"/>
  258. <xsl:text disable-output-escaping="yes">
  259. &lt;/body&gt;
  260. &lt;/html&gt;
  261. </xsl:text>
  262. </xsl:if>
  263. </xsl:otherwise>
  264. </xsl:choose>
  265. </xsl:template>
  266. <!-- userData nodes that are prefixed with either an _ or a p_ (prompt values) will not be round-tripped -->
  267. <!-- <xsl:template match="userData">
  268. <xsl:if test="substring(@name,1,1)!='_'">
  269. <xsl:if test="substring(@name,1,2)!='p_'">
  270. <xsl:text disable-output-escaping="yes">
  271. &lt;INPUT TYPE="HIDDEN" NAME="</xsl:text>
  272. {@name}<xsl:text disable-output-escaping="yes">" VALUE="</xsl:text>
  273. {@value}<xsl:text disable-output-escaping="yes">"/&gt;
  274. </xsl:text>
  275. </xsl:if>
  276. </xsl:if>
  277. </xsl:template>-->
  278. <!--
  279. The following templates are only required by Query Studio but since they are called from generic XSL code,
  280. they are defined here as empty templates.
  281. -->
  282. <xsl:template name="parentViewerScript">
  283. <xsl:if test="$appSupport='false'">
  284. <script type="text/javascript">
  285. var gCognosViewerId = "_THIS_";
  286. var sLocation = document.location.search;
  287. if (sLocation.match(/cv\.id=([^&amp;?]*)/))
  288. {
  289. gCognosViewerId = RegExp.$1;
  290. }
  291. function getCognosViewer()
  292. {
  293. var cognosViewer = null;
  294. try
  295. {
  296. cognosViewer = eval("parent.oCV" + gCognosViewerId);
  297. }
  298. catch(e)
  299. {
  300. cognosViewer = null;
  301. }
  302. return cognosViewer;
  303. }
  304. <xsl:if test="$sGenerateContextData='true'">
  305. function getSelectionController()
  306. {
  307. var selectionController = null;
  308. var cognosViewer = getCognosViewer();
  309. if(cognosViewer != null)
  310. {
  311. selectionController = cognosViewer.getSelectionController();
  312. }
  313. return selectionController;
  314. };
  315. function onLoadEvent(evt)
  316. {
  317. <xsl:variable name="metaData">
  318. <xsl:value-of select="string(/Document/META-DATA/Block)" disable-output-escaping="yes"/>
  319. </xsl:variable>
  320. <xsl:variable name="contextData">
  321. <xsl:value-of select="string(/Document/CONTEXT-DATA/*[local-name()=$contextBlock])" disable-output-escaping="yes"/>
  322. </xsl:variable>
  323. var selectionController = getSelectionController();
  324. if(selectionController != null)
  325. {
  326. selectionController.addMetaData(<xsl:value-of select="$metaData"/>);
  327. selectionController.addContextData(<xsl:value-of select="$contextData"/>);
  328. selectionController.setSelectionBasedFeaturesEnabled(true);<xsl:text/>
  329. <xsl:if test="/Document/META-DATA/@modelBasedDrillThru='true'">
  330. selectionController.setModelDrillThroughEnabled(true);<xsl:text/>
  331. </xsl:if>
  332. }
  333. else {
  334. setTimeout(onLoadEvent, 100);
  335. }
  336. };
  337. function onMouseMoveEvent(evt)
  338. {
  339. var selectionController = getSelectionController();
  340. if(selectionController != null)
  341. {
  342. selectionController.pageHover(evt);
  343. }
  344. };
  345. function onKeyDownEvent(evt)
  346. {
  347. var cognosViewer = getCognosViewer();
  348. if(cognosViewer != null)
  349. {
  350. cognosViewer.onKeyDown(evt);
  351. }
  352. };
  353. function onDoubleClickEvent(evt)
  354. {
  355. var selectionController = getSelectionController();
  356. if(selectionController != null)
  357. {
  358. selectionController.pageDoubleClicked(evt);
  359. }
  360. };
  361. function onContextMenuEvent(evt)
  362. {
  363. var cognosViewer = getCognosViewer();
  364. if(cognosViewer != null)
  365. {
  366. cognosViewer.dcm(evt,true);
  367. }
  368. };
  369. function preSelectNode(evt)
  370. {
  371. if (document.all)
  372. {
  373. var cognosViewer = getCognosViewer();
  374. if(cognosViewer != null)
  375. {
  376. cognosViewer.pcc(evt);
  377. }
  378. }
  379. }
  380. </xsl:if>
  381. function onClickEvent(evt)
  382. {
  383. var cognosViewer = getCognosViewer();
  384. if(cognosViewer &amp;&amp; cognosViewer.rvMainWnd)
  385. {
  386. cognosViewer.rvMainWnd.pageClicked(evt);
  387. }
  388. };
  389. </script>
  390. </xsl:if>
  391. </xsl:template>
  392. <xsl:template name="startPage"/>
  393. <!-- used in selection -->
  394. <xsl:template name="GenEventHandlers">
  395. <xsl:if test="$sGenerateContextData='true' and (@layoutClass='listColumnBody' or @layoutClass='listColumnTitle' or @layoutClass='rowCell' or @layoutClass='crosstabFactCell' or @layoutClass='crosstabNodeMember' or @layoutClass='crosstabCorner' or @layoutClass='repeaterTableCell' or name()='OCHART')">
  396. <xsl:if test="$appSupport='false'">
  397. <xsl:copy-of select="@cid"/>
  398. <xsl:if test="@uid != ''">
  399. <xsl:copy-of select="@uid"/>
  400. <xsl:attribute name="name">c_THIS_<xsl:value-of select="@uid"/></xsl:attribute>
  401. </xsl:if>
  402. </xsl:if>
  403. <xsl:copy-of select="@ctx"/>
  404. <xsl:if test="$appSupport='false'">
  405. <xsl:copy-of select="@type"/>
  406. </xsl:if>
  407. <xsl:if test="@class">
  408. <xsl:attribute name="class">
  409. <xsl:if test="$appSupport='false'">c_THIS_<xsl:value-of select="@uid"/><xsl:text> </xsl:text></xsl:if>
  410. <xsl:value-of select="@class"/>
  411. <xsl:if test="@styleId and $vUseStyleId='true'">
  412. <xsl:text> </xsl:text><xsl:value-of select="@styleId"/>
  413. </xsl:if>
  414. </xsl:attribute>
  415. </xsl:if>
  416. </xsl:if>
  417. <xsl:if test="name() = 'OCHART'">
  418. <xsl:if test="$sGenerateContextData='true' and $appSupport='false'">
  419. <xsl:attribute name="rsvpChart">true</xsl:attribute>
  420. </xsl:if>
  421. </xsl:if>
  422. </xsl:template>
  423. <!-- used to add events to the main page for selection -->
  424. <xsl:template match="*[@layoutClass='textItem']" priority="1">
  425. <span>
  426. <xsl:call-template name="GenTabIndexAttribute"/>
  427. <xsl:call-template name="AddAccessibleTagsForSpan"/>
  428. <xsl:if test="$sGenerateContextData='true'">
  429. <xsl:copy-of select="@ctx"/>
  430. </xsl:if>
  431. <xsl:call-template name="GenCommonAttributes"/>
  432. <xsl:value-of select="rsext:htmlencode(string(.))" disable-output-escaping="yes"/>
  433. </span>
  434. </xsl:template>
  435. <xsl:template match="OAREA" priority="2">
  436. <xsl:if test="MEMBER or drillTargets or MEASURE">
  437. <xsl:if test="MEMBER or MEASURE">
  438. <xsl:copy-of select="@ctx"/>
  439. </xsl:if>
  440. <xsl:choose>
  441. <xsl:when test="@type='legendTitle'">
  442. <xsl:attribute name="isChartTitle">true</xsl:attribute>
  443. </xsl:when>
  444. </xsl:choose>
  445. <xsl:choose>
  446. <xsl:when test="@type='ordinalAxisTitle'">
  447. <xsl:attribute name="isChartTitle">true</xsl:attribute>
  448. </xsl:when>
  449. </xsl:choose>
  450. <xsl:if test="$appSupport='false'">
  451. <xsl:attribute name="onmouseup"><xsl:text>preSelectNode(event);</xsl:text></xsl:attribute>
  452. </xsl:if>
  453. <xsl:if test="drillTargets">
  454. <xsl:choose>
  455. <xsl:when test="$appSupport='true'">
  456. <xsl:attribute name="drillCtx"><xsl:value-of select="./drillTargets/@drillCtx"/></xsl:attribute>
  457. </xsl:when>
  458. <xsl:when test="count(./drillTargets/drillTarget) = 1 and ./drillTargets/drillTarget/@bookmarkRef != '' and $drillSupport='no'">
  459. <!-- We only get in this template if there is drill information to be rendered
  460. but if drillSupport=no, then we are dealing with a simple bookmark -->
  461. <xsl:attribute name="href">
  462. <xsl:text disable-output-escaping="yes">#</xsl:text>
  463. <xsl:value-of select="rsext:replace (rsext:urlencode(string(./drillTargets/drillTarget/@bookmarkRef)), '+', '-')"/>
  464. </xsl:attribute>
  465. </xsl:when>
  466. <xsl:otherwise>
  467. <xsl:attribute name="style"><xsl:text>cursor:pointer;cursor:hand;</xsl:text></xsl:attribute>
  468. <xsl:call-template name="generateDrillThroughEventHandler">
  469. <xsl:with-param name="node" select="./drillTargets"/>
  470. </xsl:call-template>
  471. </xsl:otherwise>
  472. </xsl:choose>
  473. </xsl:if>
  474. </xsl:if>
  475. </xsl:template>
  476. <!--
  477. This template is used to generate tabset information
  478. -->
  479. <xsl:template match="ReportPageSet">
  480. <script language="javascript" type="text/javascript">
  481. <xsl:if test="$Xhtml='true'">
  482. <xsl:text disable-output-escaping="yes">
  483. //&lt;![CDATA[
  484. </xsl:text>
  485. </xsl:if>
  486. var cognosViewer = getCognosViewer();
  487. if (cognosViewer) {
  488. var gJSONTabs = <xsl:call-template name="createJsonTabset">
  489. <xsl:with-param name="node" select="."/>
  490. </xsl:call-template>;
  491. cognosViewer.setTabInfo(gJSONTabs);
  492. }
  493. <xsl:if test="$Xhtml='true'">
  494. <xsl:text disable-output-escaping="yes">
  495. //]]&gt;
  496. </xsl:text>
  497. </xsl:if>
  498. </script>
  499. </xsl:template>
  500. </xsl:stylesheet>