34 lines
943 B
XML
34 lines
943 B
XML
<?xml version='1.0'?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:csc="http://csclub.uwaterloo.ca/xsltproc">
|
|
|
|
<xsl:template match="menuitem">
|
|
<xsl:variable name="preabs">
|
|
<xsl:choose>
|
|
<xsl:when test="@absolute = 'true'" />
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="$g_pre" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<div class="menuitem">
|
|
<a href="{$preabs}{@href}"><img src="{$g_pre}buttons/{@icon}.png" width="40"
|
|
height="40" alt="{@title}" /><br /><xsl:value-of select="@title" /></a>
|
|
</div>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="menudefs">
|
|
<div class="menubar">
|
|
<xsl:apply-templates select="menuitem" />
|
|
</div>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="menu" name="menu">
|
|
<xsl:apply-templates select="document(concat($g_root, '/menu.xml'))/menudefs" />
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|