lfs-chunked1.xsl 1.6 KB

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