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}]"/>
46 <!-- Substituted with next lines to avoid Mozilla 0.8 bug setting this.search
49 "top.{$target}uri='{$uri}';
50 refresh{$target}Header('{$interfaceURL}/html/library/header.html');
51 this.search='?keys={$keys}' +
52 '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$uri}')+
53 '&param.uri={$uri}' +
54 '&param.keys={$keys}' +
55 '&param.getterURL={$getterURL}' +
56 '&param.target={$target}' +
57 '&param.interfaceURL={$interfaceURL}';"
58 onMouseOver="window.status='{$uri}'; return true"
60 ><xsl:value-of select="$basename"/></a>
64 "top.{$target}uri='{$uri}';
65 refresh{$target}Header('{$interfaceURL}/html/library/header.html');
66 var search='?keys={$keys}' +
67 '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$uri}')+
68 '&param.uri={$uri}' +
69 '&param.keys={$keys}' +
70 '&param.getterURL={$getterURL}' +
71 '&param.target={$target}' +
72 '&param.interfaceURL={$interfaceURL}';
73 var pathname = this.pathname;
74 if (pathname.charAt(0) != '/')
75 pathname = '/' + pathname;
77 this.protocol + '//' + this.host + pathname + search + this.hash;"
78 onMouseOver="window.status='{$uri}'; return true"
80 ><xsl:value-of select="$basename"/></a>
85 <xsl:template match="/">
88 <title>Index of <xsl:value-of select="$uri"/></title>
89 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/control.js_xml'))" />
90 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/utils.js_xml'))" />
92 <body bgcolor="#ffffff" text="#000000">
94 <xsl:if test="$uridotdot != ''">
95 <xsl:call-template name="makeDir">
96 <xsl:with-param name="uri" select="$uridotdot"/>
97 <xsl:with-param name="basename" select="'Parent Directory'"/>
98 <xsl:with-param name="icon" select="'back.gif'"/>
99 <xsl:with-param name="alt" select="'Parent Directory'"/>
102 <xsl:apply-templates select="*"/>
104 <hr noshade="yes" align="left" width="80%"/>
109 <xsl:template match="section">
110 <xsl:variable name="diruri">
111 <xsl:value-of select="."/>
113 <xsl:call-template name="makeDir">
114 <xsl:with-param name="uri" select="concat($uri,$diruri,'/')"/>
115 <xsl:with-param name="basename" select="$diruri"/>
116 <xsl:with-param name="icon" select="'folder.gif'"/>
117 <xsl:with-param name="alt" select="$uri"/>
121 <xsl:template match="object">
122 <xsl:variable name="name" select="@name"/>
123 <xsl:variable name="ann" select="ann/@value"/>
124 <xsl:variable name="types" select="types/@value"/>
125 <xsl:variable name="icon">
127 <xsl:when test="$ann = 'YES'">text.gif</xsl:when>
128 <xsl:otherwise>generic.red.gif</xsl:otherwise>
133 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{@name}]"/>
136 <a href="" target="{$target}"
137 onClick="this.href=makeURL('{$target}','{concat($uri,$name)}','{$ann}','{$types}')"
138 onMouseOver="window.status='{concat($uri,$name)}'; return true"
139 ><xsl:value-of select="$name"/></a>