db2pdf.xsl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <!-- ************** HTML ************** -->
  4. <xsl:import href="http://www.boost.org/tools/boostbook/xsl/html.xsl"/>
  5. <!-- remove "Chapter 1" from first page -->
  6. <xsl:param name="chapter.autolabel" select="0"/>
  7. <!-- leave the html files in the directory ../html -->
  8. <xsl:param name="base.dir" select="'../html/'"/>
  9. <!-- ******* Table of Contents ******** -->
  10. <!-- How far down sections get TOC's -->
  11. <xsl:param name = "toc.section.depth" select="2" />
  12. <!-- Max depth in each TOC: -->
  13. <xsl:param name = "toc.max.depth" select="2" />
  14. <!-- How far down we go with TOC's -->
  15. <xsl:param name="generate.section.toc.level" select="2" />
  16. <!-- ************ Chunking ************ -->
  17. <!--
  18. BoostBook takes a section node id like safe_numeric.safe_cast
  19. and renders it as safe_numeric/safe_cast. Presumably they do this
  20. so they can make a huge "book" with all the libraries in subdirectories.
  21. But we want something different. To my mind, this should have been
  22. done using the library "directory" attribute. But of course that
  23. doesn't matter now. We'll just re-hack the path to eliminate
  24. the "safe_numeric/" from the above example.
  25. -->
  26. <xsl:template match="*" mode="recursive-chunk-filename">
  27. <xsl:variable name="their">
  28. <xsl:apply-imports mode="recursive-chunk-filename" select="."/>
  29. </xsl:variable>
  30. <xsl:choose>
  31. <xsl:when test="contains($their, '/')">
  32. <xsl:value-of select="substring-after($their, '/')" />
  33. </xsl:when>
  34. <xsl:otherwise>
  35. <xsl:value-of select="$their"/>
  36. </xsl:otherwise>
  37. </xsl:choose>
  38. </xsl:template>
  39. <!-- don't make first sections special - leave TOC in different file -->
  40. <xsl:param name="chunk.first.sections" select="3" />
  41. <!-- How far down we chunk nested sections -->
  42. <!--
  43. Note: each chunk have to start with a section with an id
  44. Otherwise the chunk (i.e. file) will be lost. There is no
  45. checking of this
  46. -->
  47. <xsl:param name="chunk.section.depth" select="2" />
  48. </xsl:stylesheet>