Fix webkit bug 3

Add a new stylesheet for the glossary (copying from docbook-xsl)
keep only the glossary template, simplify it, and output title
before container
This commit is contained in:
Pierre Labastie 2024-01-21 22:41:13 +01:00
parent a9d1a9330d
commit 99ab416b95
2 changed files with 47 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<xsl:include href="xhtml/lfs-index.xsl"/>
<xsl:include href="xhtml/lfs-legalnotice.xsl"/>
<xsl:include href="xhtml/lfs-navigational.xsl"/>
<xsl:include href="xhtml/lfs-glossary.xsl"/>
<!-- sect1:
Prevent creation of dummy sect1 files used to emulate sub-chapters. -->

View File

@ -0,0 +1,46 @@
<?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">
<!-- glossary:
Output title before the containing <div>, so that it can be at a fixed
position
Simplify due to the fact that we have only one glossdiv children, and
no other glossxxx child -->
<!-- the original template is in {docbook-xsl}/xhtml/glossary.xsl -->
<xsl:template match="glossary">
<xsl:variable name="language">
<xsl:call-template name="l10n.language"/>
</xsl:variable>
<xsl:variable name="lowercase">
<xsl:call-template name="gentext">
<xsl:with-param name="key">normalize.sort.input</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="uppercase">
<xsl:call-template name="gentext">
<xsl:with-param name="key">normalize.sort.output</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="id.warning"/>
<xsl:call-template name="glossary.titlepage"/>
<xsl:element name="div" namespace="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="." mode="common.html.attributes"/>
<xsl:call-template name="id.attribute">
<xsl:with-param name="conditional" select="0"/>
</xsl:call-template>
<xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
<xsl:apply-templates select="glossdiv"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>