CSC Web Site
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
www/xsl/directory.xsl

32 lines
924 B

<?xml version='1.0'?>
<xsl:stylesheet version="2.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://csclub.uwaterloo.ca/xslt">
<xsl:template match="directory">
<xsl:variable name="href">
<xsl:choose>
<xsl:when test="@href != ''"><xsl:value-of select="@href"/></xsl:when>
<xsl:otherwise>index.html</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="@title">
<a class="diritem homedir" href="{$pre}">Home</a>
<a class="diritem" href="{$href}">
<xsl:value-of select="@title" />
</a>
</xsl:if>
<xsl:apply-templates select="diritem" />
</xsl:template>
<xsl:template match="diritem">
<a class="diritem" href="{@href}">
<xsl:value-of select="@title" />
</a>
</xsl:template>
</xsl:stylesheet>