Skip to content

Commit 49df45a

Browse files
committed
doc: Convert ids to upper case at build time
This makes the produced HTML anchors upper case, making it backward compatible with the previous (9.6) build system. Reported-by: Thomas Kellerer <spam_eater@gmx.net>
1 parent a9fce66 commit 49df45a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

doc/src/sgml/stylesheet-html-common.xsl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,29 @@ set toc,title
263263
</xsl:if>
264264
</xsl:template>
265265

266+
267+
<!-- upper case HTML anchors for backward compatibility -->
268+
269+
<xsl:template name="object.id">
270+
<xsl:param name="object" select="."/>
271+
<xsl:choose>
272+
<xsl:when test="$object/@id">
273+
<xsl:value-of select="translate($object/@id, &lowercase;, &uppercase;)"/>
274+
</xsl:when>
275+
<xsl:when test="$object/@xml:id">
276+
<xsl:value-of select="$object/@xml:id"/>
277+
</xsl:when>
278+
<xsl:when test="$generate.consistent.ids != 0">
279+
<!-- Make $object the current node -->
280+
<xsl:for-each select="$object">
281+
<xsl:text>id-</xsl:text>
282+
<xsl:number level="multiple" count="*"/>
283+
</xsl:for-each>
284+
</xsl:when>
285+
<xsl:otherwise>
286+
<xsl:value-of select="generate-id($object)"/>
287+
</xsl:otherwise>
288+
</xsl:choose>
289+
</xsl:template>
290+
266291
</xsl:stylesheet>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy