Skip to content

Commit 88637d4

Browse files
committed
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.
1 parent 6cdaa19 commit 88637d4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/devhelp/html.xsl

+14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
<xsl:when test="$ref">
1515
<a href="libxml2-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
1616
</xsl:when>
17+
<!-- TODO: This hack only works for tokens followed by a period. -->
18+
<xsl:when test="substring($token, string-length($token)) = '.'">
19+
<xsl:variable name="token2" select="substring($token, 1, string-length($token) - 1)"/>
20+
<xsl:variable name="ref2" select="key('symbols', $token2)"/>
21+
<xsl:choose>
22+
<xsl:when test="$ref2">
23+
<a href="libxml2-{$ref2/@file}.html#{$ref2/@name}"><xsl:value-of select="$token2"/></a>
24+
<xsl:text>.</xsl:text>
25+
</xsl:when>
26+
<xsl:otherwise>
27+
<xsl:value-of select="$token"/>
28+
</xsl:otherwise>
29+
</xsl:choose>
30+
</xsl:when>
1731
<xsl:otherwise>
1832
<xsl:value-of select="$token"/>
1933
</xsl:otherwise>

0 commit comments

Comments
 (0)