glossary.xsl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  4. xmlns:ot-placeholder="http://suite-sol.com/namespaces/ot-placeholder"
  5. extension-element-prefixes="ot-placeholder"
  6. version="2.0">
  7. <xsl:template match="ot-placeholder:glossarylist" name="createGlossary">
  8. <fo:page-sequence master-reference="glossary-sequence" xsl:use-attribute-sets="page-sequence.glossary">
  9. <xsl:call-template name="insertGlossaryStaticContents"/>
  10. <fo:flow flow-name="xsl-region-body">
  11. <fo:marker marker-class-name="current-header">
  12. <xsl:call-template name="getVariable">
  13. <xsl:with-param name="id" select="'Glossary'"/>
  14. </xsl:call-template>
  15. </fo:marker>
  16. <fo:block xsl:use-attribute-sets="__glossary__label" id="{$id.glossary}">
  17. <xsl:call-template name="getVariable">
  18. <xsl:with-param name="id" select="'Glossary'"/>
  19. </xsl:call-template>
  20. </fo:block>
  21. <xsl:apply-templates/>
  22. </fo:flow>
  23. </fo:page-sequence>
  24. </xsl:template>
  25. <xsl:template match="ot-placeholder:glossarylist//*[contains(@class, ' glossentry/glossentry ')]">
  26. <fo:block>
  27. <xsl:call-template name="commonattributes"/>
  28. <fo:block>
  29. <xsl:attribute name="id">
  30. <xsl:call-template name="generate-toc-id"/>
  31. </xsl:attribute>
  32. <fo:block xsl:use-attribute-sets="__glossary__term">
  33. <xsl:apply-templates select="*[contains(@class, ' glossentry/glossterm ')]/node()"/>
  34. </fo:block>
  35. <fo:block xsl:use-attribute-sets="__glossary__def">
  36. <xsl:apply-templates select="*[contains(@class, ' glossentry/glossdef ')]/node()"/>
  37. </fo:block>
  38. </fo:block>
  39. </fo:block>
  40. </xsl:template>
  41. </xsl:stylesheet>