chunk-master.xsl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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-snapshot/xhtml/chunk-common.xsl"/>
  17. <!-- Upstream chunk code match templates -->
  18. <xsl:include href="docbook-xsl-snapshot/xhtml/chunk-code.xsl"/>
  19. <!-- Including our customized chunks 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 match also others sect* tags. The code for that tags is unchanged. -->
  27. <xsl:template match="sect1">
  28. <xsl:variable name="ischunk">
  29. <xsl:call-template name="chunk"/>
  30. </xsl:variable>
  31. <xsl:choose>
  32. <xsl:when test="@role = 'dummy'"/>
  33. <xsl:when test="not(parent::*)">
  34. <xsl:call-template name="process-chunk-element"/>
  35. </xsl:when>
  36. <xsl:when test="$ischunk = 0">
  37. <xsl:apply-imports/>
  38. </xsl:when>
  39. <xsl:otherwise>
  40. <xsl:call-template name="process-chunk-element"/>
  41. </xsl:otherwise>
  42. </xsl:choose>
  43. </xsl:template>
  44. </xsl:stylesheet>