chunk-master.xsl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <!--
  3. $LastChangedBy$
  4. $Date$
  5. -->
  6. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  7. xmlns="http://www.w3.org/1999/xhtml"
  8. version="1.0">
  9. <!-- Top-level chunked code for normal processing.
  10. Import customized output templates.
  11. Include customized chunk templates.
  12. Replaces {docbook-xsl}/xhtml/chunk.xsl -->
  13. <!-- Our master non-chunking presentation templates -->
  14. <xsl:import href="chunk-slave.xsl"/>
  15. <!-- Upstream chunk code named templates -->
  16. <xsl:import href="docbook-xsl-1.78.1/xhtml/chunk-common.xsl"/>
  17. <!-- Upstream chunk code match templates -->
  18. <xsl:include href="docbook-xsl-1.78.1/xhtml/chunk-code.xsl"/>
  19. <!-- Customized chunk templates -->
  20. <xsl:include href="xhtml/lfs-index.xsl"/>
  21. <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
  22. <xsl:include href="xhtml/lfs-navigational.xsl"/>
  23. <!-- sect1:
  24. Prevent creation of dummy sect1 files used to emulate sub-chapters.
  25. The original template is in {docbook-xsl}/xhtml/chunk-code.xsl
  26. It also matches other sect* tags. The code for those tags are
  27. unchanged. -->
  28. <xsl:template match="sect1">
  29. <xsl:variable name="ischunk">
  30. <xsl:call-template name="chunk"/>
  31. </xsl:variable>
  32. <xsl:choose>
  33. <xsl:when test="@role = 'dummy'"/>
  34. <xsl:when test="not(parent::*)">
  35. <xsl:call-template name="process-chunk-element"/>
  36. </xsl:when>
  37. <xsl:when test="$ischunk = 0">
  38. <xsl:apply-imports/>
  39. </xsl:when>
  40. <xsl:otherwise>
  41. <xsl:call-template name="process-chunk-element"/>
  42. </xsl:otherwise>
  43. </xsl:choose>
  44. </xsl:template>
  45. </xsl:stylesheet>