Skip to content
Snippets Groups Projects
Commit 5159626a authored by Peter Eisentraut's avatar Peter Eisentraut
Browse files

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: default avatarThomas Kellerer <spam_eater@gmx.net>
parent a14b52c6
No related branches found
No related tags found
No related merge requests found
...@@ -263,4 +263,29 @@ set toc,title ...@@ -263,4 +263,29 @@ set toc,title
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<!-- upper case HTML anchors for backward compatibility -->
<xsl:template name="object.id">
<xsl:param name="object" select="."/>
<xsl:choose>
<xsl:when test="$object/@id">
<xsl:value-of select="translate($object/@id, &lowercase;, &uppercase;)"/>
</xsl:when>
<xsl:when test="$object/@xml:id">
<xsl:value-of select="$object/@xml:id"/>
</xsl:when>
<xsl:when test="$generate.consistent.ids != 0">
<!-- Make $object the current node -->
<xsl:for-each select="$object">
<xsl:text>id-</xsl:text>
<xsl:number level="multiple" count="*"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="generate-id($object)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment