-<?xml version="1.0"?>
-
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:import href="utils.xsl"/>
-
-<xsl:output method="html" encoding="iso-8859-1"/>
-
-<!-- uri must end with '/' -->
-<xsl:param name="uri" select="''"/>
-<xsl:param name="keys" select="''"/>
-<xsl:param name="getterURL" select="''"/>
-<xsl:param name="interfaceURL" select="''"/>
-<xsl:param name="target" select="''"/>
-
-<xsl:template name="chop">
- <xsl:param name="uri" select="''"/>
- <xsl:param name="prefix" select="''"/>
- <xsl:variable name="newprefix" select="substring-before($uri,'/')"/>
- <xsl:choose>
- <xsl:when test="$newprefix = ''"><xsl:value-of select="$prefix"/></xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="chop">
- <xsl:with-param name="uri" select="substring-after($uri,'/')"/>
- <xsl:with-param name="prefix" select="concat($prefix,$newprefix,'/')"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:variable name="uridotdot">
- <xsl:call-template name="chop">
- <xsl:with-param name="uri" select="substring($uri,1,string-length($uri)-1)"/>
- </xsl:call-template>
-</xsl:variable>
-
-<xsl:template name="makeDir">
- <xsl:param name="uri" select="''"/>
- <xsl:param name="basename" select="''"/>
- <xsl:param name="icon" select="''"/>
- <xsl:param name="alt" select="''"/>
- <tr>
- <td>
- <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{$alt}]"/>
- </td>
- <td>
- <xsl:variable name="quoteduri">
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="$uri"/>
- </xsl:call-template>
- </xsl:variable>
- <a
- onClick=
- "top.{$target}uri='{$quoteduri}';
- refresh{$target}Header('{$interfaceURL}/html/library/header.html');
- var search='?keys={$keys}' +
- '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$quoteduri}')+
- '&param.uri={$quoteduri}' +
- '&param.keys={$keys}' +
- '&param.getterURL={$getterURL}' +
- '&param.target={$target}' +
- '&param.interfaceURL={$interfaceURL}';
- var pathname = this.pathname;
- if (pathname.charAt(0) != '/')
- pathname = '/' + pathname;
- this.href=
- this.protocol + '//' + this.host + pathname + search + this.hash;"
- onMouseOver="window.status='{$quoteduri}'; return true"
- href="apply"
- ><xsl:value-of select="$basename"/></a>
- </td>
- </tr>
-</xsl:template>
-
-<xsl:template match="/">
- <html>
- <head>
- <title>Index of <xsl:value-of select="$uri"/></title>
- <xsl:copy-of select="document(concat($interfaceURL,'/javascript/control.js_xml'))" />
- <xsl:copy-of select="document(concat($interfaceURL,'/javascript/utils.js_xml'))" />
- </head>
- <body bgcolor="#ffffff" text="#000000">
- <table>
- <xsl:if test="$uridotdot != ''">
- <xsl:call-template name="makeDir">
- <xsl:with-param name="uri" select="$uridotdot"/>
- <xsl:with-param name="basename" select="'Parent Directory'"/>
- <xsl:with-param name="icon" select="'back.gif'"/>
- <xsl:with-param name="alt" select="'Parent Directory'"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:apply-templates select="*"/>
- </table>
- <hr noshade="yes" align="left" width="80%"/>
- </body>
- </html>
-</xsl:template>
-
-<xsl:template match="section">
- <xsl:variable name="diruri">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:call-template name="makeDir">
- <xsl:with-param name="uri" select="concat($uri,$diruri,'/')"/>
- <xsl:with-param name="basename" select="$diruri"/>
- <xsl:with-param name="icon" select="'folder.gif'"/>
- <xsl:with-param name="alt" select="$uri"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="object">
- <xsl:variable name="name" select="@name"/>
- <xsl:variable name="ann" select="ann/@value"/>
- <xsl:variable name="types" select="types/@value"/>
- <xsl:variable name="body" select="body/@value"/>
- <xsl:variable name="icon">
- <xsl:choose>
- <xsl:when test="$ann = 'YES'">text.gif</xsl:when>
- <xsl:otherwise>generic.red.gif</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <tr>
- <td>
- <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{@name}]"/>
- </td>
- <td>
- <xsl:variable name="quoteduri">
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="$uri"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="quotedname">
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="quotedbodyname">
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="concat($name,'.body')"/>
- </xsl:call-template>
- </xsl:variable>
- <a href="" target="{$target}"
- onClick="this.href=makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}')"
- onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
- ><xsl:value-of select="$name"/></a>
- <xsl:if test="not($body='NO')">
- <xsl:text> </xsl:text>
- <a href="" target="{$target}"
- onClick="this.href=makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}')"
- onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
- >Body</a>
- </xsl:if>
- </td>
- </tr>
-</xsl:template>
-
-</xsl:stylesheet>