4 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:import href="utils.xsl"/>
8 <xsl:output method="html" encoding="iso-8859-1"/>
10 <!-- uri must end with '/' -->
11 <xsl:param name="uri" select="''"/>
12 <xsl:param name="keys" select="''"/>
13 <xsl:param name="getterURL" select="''"/>
14 <xsl:param name="interfaceURL" select="''"/>
15 <xsl:param name="target" select="''"/>
17 <xsl:template name="chop">
18 <xsl:param name="uri" select="''"/>
19 <xsl:param name="prefix" select="''"/>
20 <xsl:variable name="newprefix" select="substring-before($uri,'/')"/>
22 <xsl:when test="$newprefix = ''"><xsl:value-of select="$prefix"/></xsl:when>
24 <xsl:call-template name="chop">
25 <xsl:with-param name="uri" select="substring-after($uri,'/')"/>
26 <xsl:with-param name="prefix" select="concat($prefix,$newprefix,'/')"/>
32 <xsl:variable name="uridotdot">
33 <xsl:call-template name="chop">
34 <xsl:with-param name="uri" select="substring($uri,1,string-length($uri)-1)"/>
38 <xsl:template name="makeDir">
39 <xsl:param name="uri" select="''"/>
40 <xsl:param name="basename" select="''"/>
41 <xsl:param name="icon" select="''"/>
42 <xsl:param name="alt" select="''"/>
45 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{$alt}]"/>
48 <xsl:variable name="quoteduri">
49 <xsl:call-template name="jsquote">
50 <xsl:with-param name="s" select="$uri"/>
55 "top.{$target}uri='{$quoteduri}';
56 refresh{$target}Header('{$interfaceURL}/html/library/header.html');
57 var search='?keys={$keys}' +
58 '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$quoteduri}')+
59 '&param.uri={$quoteduri}' +
60 '&param.keys={$keys}' +
61 '&param.getterURL={$getterURL}' +
62 '&param.target={$target}' +
63 '&param.interfaceURL={$interfaceURL}';
64 var pathname = this.pathname;
65 if (pathname.charAt(0) != '/')
66 pathname = '/' + pathname;
68 this.protocol + '//' + this.host + pathname + search + this.hash;"
69 onMouseOver="window.status='{$quoteduri}'; return true"
71 ><xsl:value-of select="$basename"/></a>
76 <xsl:template match="/">
79 <title>Index of <xsl:value-of select="$uri"/></title>
80 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/control.js_xml'))" />
81 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/utils.js_xml'))" />
83 <body bgcolor="#ffffff" text="#000000">
85 <xsl:if test="$uridotdot != ''">
86 <xsl:call-template name="makeDir">
87 <xsl:with-param name="uri" select="$uridotdot"/>
88 <xsl:with-param name="basename" select="'Parent Directory'"/>
89 <xsl:with-param name="icon" select="'back.gif'"/>
90 <xsl:with-param name="alt" select="'Parent Directory'"/>
93 <xsl:apply-templates select="*"/>
95 <hr noshade="yes" align="left" width="80%"/>
100 <xsl:template match="section">
101 <xsl:variable name="diruri">
102 <xsl:value-of select="."/>
104 <xsl:call-template name="makeDir">
105 <xsl:with-param name="uri" select="concat($uri,$diruri,'/')"/>
106 <xsl:with-param name="basename" select="$diruri"/>
107 <xsl:with-param name="icon" select="'folder.gif'"/>
108 <xsl:with-param name="alt" select="$uri"/>
112 <xsl:template match="object">
113 <xsl:variable name="name" select="@name"/>
114 <xsl:variable name="ann" select="ann/@value"/>
115 <xsl:variable name="types" select="types/@value"/>
116 <xsl:variable name="body" select="body/@value"/>
117 <xsl:variable name="proof_tree" select="proof_tree/@value"/>
118 <xsl:variable name="icon">
120 <xsl:when test="$ann = 'YES'">text.gif</xsl:when>
121 <xsl:otherwise>generic.red.gif</xsl:otherwise>
126 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{@name}]"/>
129 <xsl:variable name="quoteduri">
130 <xsl:call-template name="jsquote">
131 <xsl:with-param name="s" select="$uri"/>
134 <xsl:variable name="quotedname">
135 <xsl:call-template name="jsquote">
136 <xsl:with-param name="s" select="$name"/>
139 <xsl:variable name="quotedbodyname">
140 <xsl:call-template name="jsquote">
141 <xsl:with-param name="s" select="concat($name,'.body')"/>
144 <xsl:variable name="quotedprooftreename">
145 <xsl:call-template name="jsquote">
146 <xsl:with-param name="s" select="concat($name,'.proof_tree')"/>
149 <xsl:value-of select="$name"/>
150 <xsl:text> </xsl:text>
151 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}'));"
152 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
155 <xsl:when test="not($body='NO')">Statement</xsl:when>
156 <xsl:otherwise>Definition</xsl:otherwise>
159 <xsl:if test="not($body='NO')">
160 <xsl:text> </xsl:text>
161 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}'))"
162 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
165 <xsl:if test="not($proof_tree='NO')">
166 <xsl:text> </xsl:text>
167 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedprooftreename)}','{$ann}','{$types}'))"
168 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"