old-website/xsl/menu.xsl

37 lines
1.0 KiB
XML

<?xml version='1.0'?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:csc="http://www.csclub.uwaterloo.ca/cow"
extension-element-prefixes="csc">
<xsl:template match="menuitem">
<xsl:variable name="pre2">
<xsl:choose>
<xsl:when test="@absolute = 'true'" />
<xsl:otherwise>
<xsl:value-of select="$pre" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td class="menuitem">
<a href="{$pre2}{@href}"><img src="{$pre}buttons/{@icon}.png" width="40"
height="40" alt="{@title}" /><br /><xsl:value-of select="@title" /></a>
</td>
</xsl:template>
<xsl:template match="menudefs">
<div class="menuspace">
<table cellspacing="0" cellpadding="0" border="0" class="menubar">
<tr>
<xsl:apply-templates select="menuitem" />
</tr>
</table>
</div>
</xsl:template>
<xsl:template match="menu" name="menu">
<xsl:apply-templates select="document('../menu.xml')/menudefs" />
</xsl:template>
</xsl:stylesheet>