summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-07-05 14:35:55 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-07-05 14:36:50 +0200
commit0777ce33e444065ed8168bdbaaa7073f3e673681 (patch)
tree620c3eac3c59e6d93ed757a4d27711388834b05e
parent4fec63ca6f0fdddfd8600087c00247f90ce6ddea (diff)
downloadmutti-web-0777ce33e444065ed8168bdbaaa7073f3e673681.tar.gz
mutti-web-0777ce33e444065ed8168bdbaaa7073f3e673681.tar.bz2
mutti-web-0777ce33e444065ed8168bdbaaa7073f3e673681.zip
navi.xsl: Inline accesskey assignment
No need to store <xsl:number/> in a variable, just use xpaths position().
-rw-r--r--xsl/navi.xsl8
1 files changed, 1 insertions, 7 deletions
diff --git a/xsl/navi.xsl b/xsl/navi.xsl
index 1130def..37c73b7 100644
--- a/xsl/navi.xsl
+++ b/xsl/navi.xsl
@@ -9,20 +9,14 @@
<xsl:for-each select="document('../main.xml')/s:site/s:page">
<xsl:variable name="url" select="concat(substring-before(@filename, '.xml'), $suffix)"/>
- <xsl:variable name="i">
- <xsl:number />
- </xsl:variable>
<xsl:if test="not(@visibility='hidden')">
<li>
- <a href="{concat($url, @anchor)}">
+ <a href="{concat($url, @anchor)}" accesskey="{position()}">
<xsl:if test="$url = $file">
<xsl:attribute name="class">
<xsl:value-of select="'active'" />
</xsl:attribute>
</xsl:if>
- <xsl:attribute name="accesskey">
- <xsl:value-of select="$i" />
- </xsl:attribute>
<xsl:value-of select="@title" />
</a>
</li>