[libxml2] Improve cross-references in API docs
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Improve cross-references in API docs
- Date: Wed, 24 Aug 2022 13:25:38 +0000 (UTC)
commit 88637d428d768aa8ae530fe7de7023a00fc2b6e0
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Wed Aug 24 15:09:46 2022 +0200
Improve cross-references in API docs
Also cross-reference keywords followed by a period. This is still a hack
but catches quite a few more keywords.
doc/devhelp/html.xsl | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/doc/devhelp/html.xsl b/doc/devhelp/html.xsl
index b658f678..3fce938c 100644
--- a/doc/devhelp/html.xsl
+++ b/doc/devhelp/html.xsl
@@ -14,6 +14,20 @@
<xsl:when test="$ref">
<a href="libxml2-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
</xsl:when>
+ <!-- TODO: This hack only works for tokens followed by a period. -->
+ <xsl:when test="substring($token, string-length($token)) = '.'">
+ <xsl:variable name="token2" select="substring($token, 1, string-length($token) - 1)"/>
+ <xsl:variable name="ref2" select="key('symbols', $token2)"/>
+ <xsl:choose>
+ <xsl:when test="$ref2">
+ <a href="libxml2-{$ref2/@file}.html#{$ref2/@name}"><xsl:value-of select="$token2"/></a>
+ <xsl:text>.</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$token"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
<xsl:otherwise>
<xsl:value-of select="$token"/>
</xsl:otherwise>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]