RSUpgradePage.xsl 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: rspecupgrade
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <!-- COPYRIGHT_DATA { 'YEAR':[2005, 2009], 'RELEASE':['colorado_wave1'], 'VISIBLE':'YES', 'COMPONENT':'rspecupgrade' }-->
  10. <!--All lines above the COPYRIGHT_DATA line will be replaced when copyright notices are generated. -->
  11. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:baltic="http://developer.cognos.com/schemas/report/1/" xmlns="http://developer.cognos.com/schemas/report/2.0/" xmlns:date="http://exslt.org/dates-and-times" xmlns:exsl="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" xmlns:java="http://xml.apache.org/xalan/java" extension-element-prefixes="xalan date exsl" exclude-result-prefixes="xalan java baltic date exsl">
  12. <xsl:template match="baltic:page">
  13. <xsl:param name="p_resetPageNumber"/>
  14. <!--Value may be passed down from the pageSet. -->
  15. <xsl:param name="p_resetPageCount"/>
  16. <!--Value may be passed down from the pageSet. -->
  17. <page>
  18. <xsl:if test="count(@refQuery)">
  19. <xsl:attribute name="refQuery"><xsl:call-template name="getQueryTemplate"><xsl:with-param name="refQuery" select="@refQuery"/></xsl:call-template></xsl:attribute>
  20. <xsl:attribute name="originalRefQuery"><xsl:call-template name="getQueryTemplate"><xsl:with-param name="refQuery" select="@refQuery"/></xsl:call-template></xsl:attribute>
  21. </xsl:if>
  22. <xsl:variable name="v_for">
  23. <xsl:choose>
  24. <xsl:when test="parent::baltic:promptPageList">promptPage</xsl:when>
  25. <xsl:otherwise>page</xsl:otherwise>
  26. </xsl:choose>
  27. </xsl:variable>
  28. <xsl:call-template name="addStyle">
  29. <xsl:with-param name="for" select="$v_for"/>
  30. </xsl:call-template>
  31. <xsl:if test="count(@name) = 1">
  32. <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
  33. </xsl:if>
  34. <xsl:choose>
  35. <xsl:when test="count(@resetPageNumber) = 1">
  36. <xsl:call-template name="resetPageTemplate">
  37. <xsl:with-param name="attribute" select="@resetPageNumber"/>
  38. <xsl:with-param name="targetName" select="'resetPageNumber'"/>
  39. </xsl:call-template>
  40. </xsl:when>
  41. <xsl:when test="$p_resetPageNumber != ''">
  42. <xsl:call-template name="resetPageTemplate">
  43. <xsl:with-param name="attribute" select="$p_resetPageNumber"/>
  44. <xsl:with-param name="targetName" select="'resetPageNumber'"/>
  45. </xsl:call-template>
  46. </xsl:when>
  47. </xsl:choose>
  48. <xsl:choose>
  49. <xsl:when test="count(@resetPageCount) = 1">
  50. <xsl:call-template name="resetPageTemplate">
  51. <xsl:with-param name="attribute" select="@resetPageCount"/>
  52. <xsl:with-param name="targetName" select="'resetPageCount'"/>
  53. </xsl:call-template>
  54. </xsl:when>
  55. <xsl:when test="$p_resetPageCount != ''">
  56. <xsl:call-template name="resetPageTemplate">
  57. <xsl:with-param name="attribute" select="$p_resetPageCount"/>
  58. <xsl:with-param name="targetName" select="'resetPageCount'"/>
  59. </xsl:call-template>
  60. </xsl:when>
  61. </xsl:choose>
  62. <xsl:call-template name="generateMasterDetailLinks2">
  63. <xsl:with-param name="p_frame" select="."/>
  64. </xsl:call-template>
  65. <xsl:apply-templates select="baltic:pageBody"/>
  66. <xsl:apply-templates select="baltic:pageHeader"/>
  67. <xsl:choose>
  68. <xsl:when test="parent::baltic:promptPageList">
  69. <xsl:call-template name="promptPageFooter">
  70. <xsl:with-param name="p_page" select="."/>
  71. </xsl:call-template>
  72. </xsl:when>
  73. <xsl:otherwise>
  74. <xsl:apply-templates select="baltic:pageFooter"/>
  75. </xsl:otherwise>
  76. </xsl:choose>
  77. <xsl:call-template name="simpleLayoutGroupTemplate"/>
  78. <xsl:variable name="v_cube">
  79. <xsl:call-template name="getCube">
  80. <xsl:with-param name="p_queryName" select="@refQuery"/>
  81. </xsl:call-template>
  82. </xsl:variable>
  83. <xsl:if test="count(@refQuery)">
  84. <xsl:element name="propertyList"/>
  85. </xsl:if>
  86. </page>
  87. </xsl:template>
  88. <xsl:template name="resetPageTemplate">
  89. <xsl:param name="attribute"/>
  90. <xsl:param name="targetName"/>
  91. <xsl:choose>
  92. <xsl:when test="$attribute = 'true'">
  93. <xsl:attribute name="{$targetName}">1</xsl:attribute>
  94. </xsl:when>
  95. <xsl:when test="$attribute = 'false'"/>
  96. <xsl:when test="$attribute = 'never'"/>
  97. <xsl:otherwise>
  98. <xsl:attribute name="{$targetName}"><xsl:value-of select="$attribute"/></xsl:attribute>
  99. </xsl:otherwise>
  100. </xsl:choose>
  101. </xsl:template>
  102. <xsl:template match="baltic:pageHeader">
  103. <pageHeader>
  104. <xsl:call-template name="addStyle">
  105. <xsl:with-param name="for" select="'pageHeader'"/>
  106. </xsl:call-template>
  107. <xsl:call-template name="layoutContainerGroupTemplate"/>
  108. <xsl:call-template name="simpleLayoutGroupTemplate"/>
  109. </pageHeader>
  110. </xsl:template>
  111. <xsl:template match="baltic:pageBody">
  112. <pageBody>
  113. <xsl:call-template name="addStyle">
  114. <xsl:with-param name="for" select="'pageBody'"/>
  115. </xsl:call-template>
  116. <xsl:call-template name="layoutContainerGroupTemplate"/>
  117. <xsl:call-template name="simpleLayoutGroupTemplate"/>
  118. </pageBody>
  119. </xsl:template>
  120. <xsl:template match="baltic:pageFooter">
  121. <pageFooter>
  122. <xsl:call-template name="pageFooterBody"/>
  123. </pageFooter>
  124. </xsl:template>
  125. <xsl:template name="pageFooterBody">
  126. <xsl:call-template name="addStyle">
  127. <xsl:with-param name="for" select="'pageFooter'"/>
  128. </xsl:call-template>
  129. <xsl:call-template name="layoutContainerGroupTemplate"/>
  130. <xsl:call-template name="simpleLayoutGroupTemplate"/>
  131. </xsl:template>
  132. </xsl:stylesheet>