mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
There was two problems: - the sect1 template did not process the footnote - footnote processing needed to use a template matching footnote/para[1], but we had a template matching para at a higher precendence level. So: - call process.footnotes at the end of the sect1 template - Add a templates matching footnote/para[1] at the same import level as the template matching para (this just call the original template) We also add a priority 1 to the sect1 template in chunk-code.xsl, although it is not strictly necessary. This is what upstream recommends...
54 lines
2.0 KiB
XML
54 lines
2.0 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
|
|
<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 -->
|
|
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-common.xsl"/>
|
|
|
|
<!-- Upstream chunk code match templates -->
|
|
<xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk-code.xsl"/>
|
|
|
|
<!-- 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. Note that the priority attribute is not strictly
|
|
required, because the original template is less restrictive in
|
|
matching, so has less precedence. But in case the docbook dev
|
|
add a match="sect1" template in their chunk-code.xsl, then it will
|
|
be necessary!-->
|
|
<xsl:template match="sect1" priority="1">
|
|
<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>
|