Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49df45a

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

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:templatename="object.id">
270+
<xsl:paramname="object"select="."/>
271+
<xsl:choose>
272+
<xsl:whentest="$object/@id">
273+
<xsl:value-ofselect="translate($object/@id,&lowercase;,&uppercase;)"/>
274+
</xsl:when>
275+
<xsl:whentest="$object/@xml:id">
276+
<xsl:value-ofselect="$object/@xml:id"/>
277+
</xsl:when>
278+
<xsl:whentest="$generate.consistent.ids != 0">
279+
<!-- Make $object the current node-->
280+
<xsl:for-eachselect="$object">
281+
<xsl:text>id-</xsl:text>
282+
<xsl:numberlevel="multiple"count="*"/>
283+
</xsl:for-each>
284+
</xsl:when>
285+
<xsl:otherwise>
286+
<xsl:value-ofselect="generate-id($object)"/>
287+
</xsl:otherwise>
288+
</xsl:choose>
289+
</xsl:template>
290+
266291
</xsl:stylesheet>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp