mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
stylesheets: fix generation of footnotes
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...
This commit is contained in:
parent
a2bf74a9b5
commit
e2789b4c66
@ -27,8 +27,12 @@
|
||||
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">
|
||||
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>
|
||||
|
@ -43,6 +43,16 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- footnote/para[1]: this template is in {docbook-xsl}/xhtml/footnote.xsl
|
||||
which is imported. This means that template has less precedence
|
||||
than the above one. To have higher precedence, it must be at
|
||||
the same import level (then, since it is more restrictive, it is
|
||||
applied preferably to the above).-->
|
||||
<xsl:template match="footnote/para[1]">
|
||||
<!-- just use the original template -->
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- screen:
|
||||
Changed class attribute asignament to fit our look needs.
|
||||
Removed unused line numbering support. -->
|
||||
|
@ -166,7 +166,7 @@
|
||||
</xsl:choose>
|
||||
<xsl:call-template name="language.attribute"/>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:apply-templates select="sect1info" mode="svn-keys"/>
|
||||
<xsl:call-template name="process.footnotes"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user