Automatic merge of trunk into multilib

This commit is contained in:
Thomas Trepl 2024-01-18 10:47:51 +01:00
commit 4a9c50a4e7
2 changed files with 24 additions and 5 deletions

View File

@ -48,9 +48,6 @@ ifneq ($(ARCH), default)
endif
endif
# https://github.com/docbook/xslt10-stylesheets/issues/239
SED_XMLNS_XLINK = sed -i 's/xmlns:xlink.*xlink"//'
book: validate profile-html
@echo "Generating chunked XHTML files at $(BASEDIR)/ ..."
$(Q)xsltproc --nonet \
@ -64,7 +61,6 @@ book: validate profile-html
$(Q)mkdir -p $(BASEDIR)/stylesheets
$(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
$(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html
$(Q)$(SED_XMLNS_XLINK) $(BASEDIR)/longindex.html
$(Q)mkdir -p $(BASEDIR)/images
$(Q)cp images/*.png $(BASEDIR)/images
@ -117,7 +113,6 @@ nochunks: validate profile-html
$(RENDERTMP)/lfs-html.xml
# $(RENDERTMP)/lfs-html2.xml
$(Q)$(SED_XMLNS_XLINK) $(BASEDIR)/$(NOCHUNKS_OUTPUT)
@echo "Running Tidy..."
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true

View File

@ -24,6 +24,30 @@
<xsl:text>longindex.html</xsl:text>
</xsl:template>
<!-- The original template in {docbook-xsl}/xhtml/autoidx.xsl has
a bug (https://github.com/docbook/xslt10-stylesheets/issues/239)
that generates a <div> with a wrong xmlns:xlink attribute. So copy it
here where the bug does not occur, (and simplify it a lot).-->
<xsl:template name="generate-basic-index">
<xsl:param name="scope" select="NOTANODE"/>
<xsl:variable name="terms" select="//indexterm
[count(.|key('letter',
translate(substring(&primary;, 1, 1),
&lowercase;,
&uppercase;
)
) [&scope;][1]) = 1]"/>
<div class="index">
<xsl:apply-templates select="$terms" mode="index-div-basic">
<xsl:with-param name="position" select="position()"/>
<xsl:with-param name="scope" select="$scope"/>
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
</xsl:apply-templates>
</div>
</xsl:template>
<!-- Divisions:
Override the default division titles, translating them from the default
'A', 'B', etc. to 'Packages', 'Programs', etc.