This repository has been archived on 2026-07-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
moreWiki/More Wiki in a jar/public/skins/default/common/sub-menu.xsl
T
2012-01-08 15:18:29 +01:00

50 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="sub-menu">
<div id="sub-menu">
<xsl:apply-templates select="edit-menu" />
<xsl:apply-templates select="sub-menu-entry" />
</div>
</xsl:template>
<xsl:template match="edit-menu">
<span>
<a accesskey="e" title="Edit [Alt-e]">
<xsl:attribute name="href">
/wiki/edit/
<xsl:value-of select="/page/article/id" />
</xsl:attribute>
<xsl:value-of select="." />
</a>
</span>
</xsl:template>
<xsl:template match="sub-menu-entry">
<xsl:choose>
<xsl:when test="@selected = 'yes'">
<span id="selected-sub-menu">
<xsl:value-of select="@value" />
</span>
</xsl:when>
<xsl:otherwise>
<span>
<a>
<xsl:attribute name="href">
<xsl:value-of select="@link" />
</xsl:attribute>
<xsl:attribute name="accesskey">
<xsl:value-of select="@accesskey" />
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="@title" />
</xsl:attribute>
<xsl:value-of select="@value" />
</a>
</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>