summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2012-03-16 09:52:44 -0400
committerShaun McCance <shaunm@gnome.org>2012-03-16 09:52:44 -0400
commit8f46d17a2636b2a650c70e02f5c8a55b096cc010 (patch)
treec58509df614ca507bd680c0df295a48924e74d22
parenta44669f651bf8df1f31c150c344165496a2c85cb (diff)
downloadyelp-xsl-8f46d17a2636b2a650c70e02f5c8a55b096cc010.tar.gz
mal2html-api: Sort according to api:name first
-rw-r--r--xslt/mallard/html/mal2html-api.xsl20
1 files changed, 19 insertions, 1 deletions
diff --git a/xslt/mallard/html/mal2html-api.xsl b/xslt/mallard/html/mal2html-api.xsl
index d160296c..8be7762f 100644
--- a/xslt/mallard/html/mal2html-api.xsl
+++ b/xslt/mallard/html/mal2html-api.xsl
@@ -53,8 +53,26 @@ elements. It should be called by an appropriate template that handles the
<xsl:template name="mal2html.api.links">
<xsl:param name="node"/>
<xsl:param name="links"/>
- <xsl:variable name="out_">
+ <xsl:variable name="apilinks_">
<xsl:for-each select="$links">
+ <xsl:variable name="link" select="."/>
+ <xsl:for-each select="$mal.cache">
+ <xsl:variable name="target" select="key('mal.cache.key', $link/@xref)"/>
+ <xsl:variable name="apiname" select="$target/mal:info/api:*/api:name[1]"/>
+ <xsl:for-each select="$link">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:copy-of select="*"/>
+ <xsl:copy-of select="$apiname"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="apilinks" select="exsl:node-set($apilinks_)/*"/>
+ <xsl:variable name="out_">
+ <xsl:for-each select="$apilinks">
+ <xsl:sort select="api:name"/>
<xsl:sort data-type="number" select="@groupsort"/>
<xsl:sort select="mal:title[@type = 'sort']"/>
<xsl:variable name="link" select="."/>