4 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:output method="html" encoding="iso-8859-1"/>
8 <!-- uri must end with '/' -->
9 <xsl:param name="uri" select="''"/>
10 <xsl:param name="keys" select="''"/>
11 <xsl:param name="getterURL" select="''"/>
12 <xsl:param name="interfaceURL" select="''"/>
13 <xsl:param name="target" select="''"/>
15 <xsl:template name="chop">
16 <xsl:param name="uri" select="''"/>
17 <xsl:param name="prefix" select="''"/>
18 <xsl:variable name="newprefix" select="substring-before($uri,'/')"/>
20 <xsl:when test="$newprefix = ''"><xsl:value-of select="$prefix"/></xsl:when>
22 <xsl:call-template name="chop">
23 <xsl:with-param name="uri" select="substring-after($uri,'/')"/>
24 <xsl:with-param name="prefix" select="concat($prefix,$newprefix,'/')"/>
30 <xsl:variable name="uridotdot">
31 <xsl:call-template name="chop">
32 <xsl:with-param name="uri" select="substring($uri,1,string-length($uri)-1)"/>
36 <xsl:template name="makeDir">
37 <xsl:param name="uri" select="''"/>
38 <xsl:param name="basename" select="''"/>
39 <xsl:param name="icon" select="''"/>
40 <xsl:param name="alt" select="''"/>
43 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{$alt}]"/>
48 "top.{$target}uri='{$uri}';
49 refresh{$target}Header('{$interfaceURL}/html/library/header.html');
50 this.search='?keys={$keys}' +
51 '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$uri}')+
52 '&param.uri={$uri}' +
53 '&param.keys={$keys}' +
54 '&param.getterURL={$getterURL}' +
55 '&param.target={$target}' +
56 '&param.interfaceURL={$interfaceURL}';"
57 onMouseOver="window.status='{$uri}'; return true"
59 ><xsl:value-of select="$basename"/></a>
64 <xsl:template match="/">
67 <title>Index of <xsl:value-of select="$uri"/></title>
68 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/control.js_xml'))" />
70 <body bgcolor="#ffffff" text="#000000">
72 <xsl:if test="$uridotdot != ''">
73 <xsl:call-template name="makeDir">
74 <xsl:with-param name="uri" select="$uridotdot"/>
75 <xsl:with-param name="basename" select="'Parent Directory'"/>
76 <xsl:with-param name="icon" select="'back.gif'"/>
77 <xsl:with-param name="alt" select="'Parent Directory'"/>
80 <xsl:apply-templates select="*"/>
82 <hr noshade="yes" align="left" width="80%"/>
87 <xsl:template match="section">
88 <xsl:variable name="diruri">
89 <xsl:value-of select="."/>
91 <xsl:call-template name="makeDir">
92 <xsl:with-param name="uri" select="concat($uri,$diruri,'/')"/>
93 <xsl:with-param name="basename" select="$diruri"/>
94 <xsl:with-param name="icon" select="'folder.gif'"/>
95 <xsl:with-param name="alt" select="$uri"/>
99 <xsl:template match="object">
100 <xsl:variable name="name" select="@name"/>
101 <xsl:variable name="ann" select="ann/@value"/>
102 <xsl:variable name="types" select="types/@value"/>
103 <xsl:variable name="icon">
105 <xsl:when test="$ann = 'YES'">text.gif</xsl:when>
106 <xsl:otherwise>generic.red.gif</xsl:otherwise>
111 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{@name}]"/>
114 <a href="" target="{$target}"
115 onClick="this.href=makeURL('{$target}','{concat($uri,$name)}','{$ann}','{$types}')"
116 onMouseOver="window.status='{concat($uri,$name)}'; return true"
117 ><xsl:value-of select="$name"/></a>