RSUpgradeLayoutComponentRef.xsl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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:layoutComponentRef">
  13. <layoutComponentRef>
  14. <xsl:attribute name="refLayoutElement"><!-- NOTE: The leading '#' character must be trimmed off. --><xsl:variable name="v_after">#</xsl:variable><xsl:variable name="v_href" select="@href"/><xsl:value-of select="substring-after($v_href,$v_after)"/></xsl:attribute>
  15. <xsl:call-template name="addStyle"/>
  16. <xsl:if test="count(@id) = 1">
  17. <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
  18. </xsl:if>
  19. <xsl:if test="count(baltic:layoutComponentOverride) &gt; 0">
  20. <layoutComponentOverrides>
  21. <xsl:apply-templates select="baltic:layoutComponentOverride"/>
  22. </layoutComponentOverrides>
  23. </xsl:if>
  24. </layoutComponentRef>
  25. </xsl:template>
  26. <xsl:template match="baltic:layoutComponentOverride">
  27. <layoutComponentOverride>
  28. <xsl:attribute name="refLayoutElement"><xsl:value-of select="@idContainer"/></xsl:attribute>
  29. <xsl:call-template name="layoutContainerGroupNoContentsTemplate"/>
  30. <xsl:call-template name="simpleLayoutGroupTemplate"/>
  31. </layoutComponentOverride>
  32. </xsl:template>
  33. </xsl:stylesheet>