Advertisement
Guest User

ProcessTopicTitle

a guest
Feb 25th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. <xsl:template match="*" mode="processTopicTitle">
  2. <xsl:variable name="level" select="count(ancestor::*[contains(@class,' topic/topic ')])"/>
  3. <xsl:variable name="attrSet1">
  4. <xsl:call-template name="createTopicAttrsName">
  5. <xsl:with-param name="theCounter" select="$level"/>
  6. </xsl:call-template>
  7. </xsl:variable>
  8. <xsl:variable name="attrSet2" select="concat($attrSet1, '__content')"/>
  9. <fo:block>
  10. <xsl:call-template name="commonattributes"/>
  11. <xsl:call-template name="processAttrSetReflection">
  12. <xsl:with-param name="attrSet" select="$attrSet1"/>
  13. <xsl:with-param name="path" select="'../../cfg/fo/attrs/commons-attr.xsl'"/>
  14. </xsl:call-template>
  15. <fo:block>
  16. <xsl:call-template name="processAttrSetReflection">
  17. <xsl:with-param name="attrSet" select="$attrSet2"/>
  18. <xsl:with-param name="path" select="'../../cfg/fo/attrs/commons-attr.xsl'"/>
  19. </xsl:call-template>
  20. <xsl:if test="$level = 1">
  21. <fo:marker marker-class-name="current-header">
  22. <xsl:call-template name="getTitle"/>
  23. </fo:marker>
  24. </xsl:if>
  25. <xsl:if test="$level = 2">
  26. <fo:marker marker-class-name="current-h2">
  27. <xsl:call-template name="getTitle"/>
  28. </fo:marker>
  29. </xsl:if>
  30. <fo:inline id="{parent::node()/@id}"/>
  31. <fo:inline>
  32. <xsl:attribute name="id">
  33. <xsl:call-template name="generate-toc-id">
  34. <xsl:with-param name="element" select=".."/>
  35. </xsl:call-template>
  36. </xsl:attribute>
  37. </fo:inline>
  38. <!-- added by William on 2009-07-02 for indexterm bug:2815485 start-->
  39. <xsl:call-template name="pullPrologIndexTerms"/>
  40. <!-- added by William on 2009-07-02 for indexterm bug:2815485 end-->
  41. <xsl:call-template name="getTitle"/>
  42. </fo:block>
  43. </fo:block>
  44. </xsl:template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement