You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

glossary.xsl 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  5. version="1.0">
  6. <xsl:template match="glossary">
  7. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  8. <fo:layout-master-set>
  9. <fo:simple-page-master master-name="all"
  10. page-height="11.5in" page-width="8.5in"
  11. margin-top="1in" margin-bottom="1in"
  12. margin-left="0.75in" margin-right="0.75in">
  13. <fo:region-body margin-top="1in" margin-bottom="0.75in"/>
  14. <fo:region-before extent="0.75in"/>
  15. <fo:region-after extent="0.5in"/>
  16. </fo:simple-page-master>
  17. </fo:layout-master-set>
  18. <fo:page-sequence master-name="all" format="i">
  19. <!-- header with running glossary entries -->
  20. <fo:static-content flow-name="xsl-region-before">
  21. <fo:block text-align="start"
  22. font-size="10pt" font-family="serif" line-height="1em + 2pt">
  23. <fo:retrieve-marker retrieve-class-name="term"
  24. retrieve-boundary="page"
  25. retrieve-position="first-starting-within-page"/>
  26. <fo:leader leader-alignment="reference-area" leader-pattern="dots"
  27. leader-length="4in"/>
  28. <fo:retrieve-marker retrieve-class-name="term"
  29. retrieve-boundary="page"
  30. retrieve-position="last-ending-within-page"/>
  31. </fo:block>
  32. </fo:static-content>
  33. <fo:static-content flow-name="xsl-region-after">
  34. <fo:block text-align="start"
  35. font-size="10pt" font-family="serif" line-height="1em + 2pt">
  36. Page (<fo:page-number/>)
  37. </fo:block>
  38. </fo:static-content>
  39. <fo:flow flow-name="xsl-region-body">
  40. <xsl:apply-templates select="term-entry"/>
  41. </fo:flow>
  42. </fo:page-sequence>
  43. </fo:root>
  44. </xsl:template>
  45. <xsl:template match="term-entry">
  46. <fo:block text-align="start" font-size="12pt" font-family="sans-serif">
  47. <xsl:apply-templates select="term"/>
  48. <xsl:apply-templates select="definition"/>
  49. </fo:block>
  50. </xsl:template>
  51. <xsl:template match="term">
  52. <fo:block color="blue" space-before.optimum="3pt"><fo:marker
  53. marker-class-name="term"><xsl:value-of select="."/></fo:marker>
  54. <xsl:value-of select="."/>
  55. </fo:block>
  56. </xsl:template>
  57. <xsl:template match="definition">
  58. <fo:block text-align="start" start-indent="2em">
  59. <xsl:value-of select="."/>
  60. </fo:block>
  61. </xsl:template>
  62. </xsl:stylesheet>