lfs-ru/stylesheets/lfs-xsl/chunk-master.xsl

50 lines
1.6 KiB
XML
Raw Normal View History

2023-05-23 15:11:01 +03:00
<?xml version='1.0' encoding='UTF-8'?>
2022-06-01 23:43:00 +03:00
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
<!-- Top-level chunked code for normal processing.
Import customized output templates.
Include customized chunk templates.
Replaces {docbook-xsl}/xhtml/chunk.xsl -->
<!-- Our master non-chunking presentation templates -->
<xsl:import href="chunk-slave.xsl"/>
<!-- Upstream chunk code named templates -->
2023-05-24 22:29:27 +03:00
<xsl:import href="docbook-xsl-1.79.1/xhtml/chunk-common.xsl"/>
2022-06-01 23:43:00 +03:00
<!-- Upstream chunk code match templates -->
2023-05-24 22:29:27 +03:00
<xsl:include href="docbook-xsl-1.79.1/xhtml/chunk-code.xsl"/>
2022-06-01 23:43:00 +03:00
<!-- Customized chunk templates -->
<xsl:include href="xhtml/lfs-index.xsl"/>
<xsl:include href="xhtml/lfs-legalnotice.xsl"/>
<xsl:include href="xhtml/lfs-navigational.xsl"/>
<!-- sect1:
Prevent creation of dummy sect1 files used to emulate sub-chapters.
The original template is in {docbook-xsl}/xhtml/chunk-code.xsl
It also matches other sect* tags. The code for those tags are
unchanged. -->
<xsl:template match="sect1">
<xsl:variable name="ischunk">
<xsl:call-template name="chunk"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="@role = 'dummy'"/>
<xsl:when test="not(parent::*)">
<xsl:call-template name="process-chunk-element"/>
</xsl:when>
<xsl:when test="$ischunk = 0">
<xsl:apply-imports/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="process-chunk-element"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>