mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-23 01:32:22 -05:00
xep.xsl: Linkify RFCs and XEP references
This commit is contained in:
parent
3f5fd31323
commit
00ea099c7a
16
xep.xsl
16
xep.xsl
@ -643,7 +643,21 @@ content: "XEP-<xsl:value-of select='/xep/header/number'/>";
|
||||
<xsl:template match='spec'>
|
||||
<xsl:param name='speccount' select='""'/>
|
||||
<xsl:variable name='specpos' select='position()'/>
|
||||
<xsl:value-of select='.'/>
|
||||
<xsl:variable name='spec' select='translate(string(.), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'/>
|
||||
<xsl:choose>
|
||||
<xsl:when test='starts-with($spec, "xep-")'><a>
|
||||
<xsl:attribute name="href"><xsl:value-of select="$spec"/>.html</xsl:attribute>
|
||||
<xsl:value-of select='.'/>
|
||||
</a></xsl:when>
|
||||
<xsl:when test='starts-with($spec, "rfc ")'>
|
||||
<xsl:variable name='rfcno' select='substring-after($spec, "rfc ")'/>
|
||||
<a>
|
||||
<xsl:attribute name="href">https://datatracker.ietf.org/doc/html/rfc<xsl:value-of select="$rfcno"/></xsl:attribute>
|
||||
<xsl:value-of select='.'/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select='.'/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test='$specpos < $speccount'>
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
|
Loading…
Reference in New Issue
Block a user