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="processorURL" select="''"/>
14 <xsl:param name="getterURL" select="''"/>
15 <xsl:param name="interfaceURL" select="''"/>
16 <xsl:param name="target" select="''"/>
17 <xsl:param name="profile" select="''"/>
19 <xsl:template name="chop">
20 <xsl:param name="uri" select="''"/>
21 <xsl:param name="prefix" select="''"/>
22 <xsl:variable name="newprefix" select="substring-before($uri,'/')"/>
24 <xsl:when test="$newprefix = ''"><xsl:value-of select="$prefix"/></xsl:when>
26 <xsl:call-template name="chop">
27 <xsl:with-param name="uri" select="substring-after($uri,'/')"/>
28 <xsl:with-param name="prefix" select="concat($prefix,$newprefix,'/')"/>
34 <xsl:variable name="uridotdot">
35 <xsl:call-template name="chop">
36 <xsl:with-param name="uri" select="substring($uri,1,string-length($uri)-1)"/>
40 <xsl:template name="makeDir">
41 <xsl:param name="uri" select="''"/>
42 <xsl:param name="basename" select="''"/>
43 <xsl:param name="icon" select="''"/>
44 <xsl:param name="alt" select="''"/>
47 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{$alt}]"/>
50 <xsl:variable name="quoteduri">
51 <xsl:call-template name="jsquote">
52 <xsl:with-param name="s" select="$uri"/>
57 "top.{$target}uri='{$quoteduri}';
58 refresh{$target}Header('{$interfaceURL}/html/library/header.html');
59 var search='?keys={$keys}' +
60 '&profile={$profile}' +
61 '&param.profile={$profile}' +
62 '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$quoteduri}')+
63 '&param.uri={$quoteduri}' +
64 '&param.keys={$keys}' +
65 '&param.target={$target}';
66 var pathname = this.pathname;
67 if (pathname.charAt(0) != '/')
68 pathname = '/' + pathname;
70 this.protocol + '//' + this.host + pathname + search + this.hash;"
71 onMouseOver="window.status='{$quoteduri}'; return true"
73 ><xsl:value-of select="$basename"/></a>
78 <xsl:template match="/">
81 <title>Index of <xsl:value-of select="$uri"/></title>
82 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/control.js_xml'))" />
83 <xsl:copy-of select="document(concat($interfaceURL,'/javascript/utils.js_xml'))" />
85 <body bgcolor="#ffffff" text="#000000">
87 <xsl:if test="$uridotdot != ''">
88 <xsl:call-template name="makeDir">
89 <xsl:with-param name="uri" select="$uridotdot"/>
90 <xsl:with-param name="basename" select="'Parent Directory'"/>
91 <xsl:with-param name="icon" select="'back.gif'"/>
92 <xsl:with-param name="alt" select="'Parent Directory'"/>
95 <xsl:apply-templates select="*"/>
97 <hr noshade="yes" align="left" width="80%"/>
102 <xsl:template match="section">
103 <xsl:variable name="diruri">
104 <xsl:value-of select="."/>
106 <xsl:call-template name="makeDir">
107 <xsl:with-param name="uri" select="concat($uri,$diruri,'/')"/>
108 <xsl:with-param name="basename" select="$diruri"/>
109 <xsl:with-param name="icon" select="'folder.gif'"/>
110 <xsl:with-param name="alt" select="$uri"/>
114 <xsl:template match="object">
115 <xsl:variable name="name" select="@name"/>
116 <xsl:variable name="ann" select="ann/@value"/>
117 <xsl:variable name="types" select="types/@value"/>
118 <xsl:variable name="body" select="body/@value"/>
119 <xsl:variable name="proof_tree" select="proof_tree/@value"/>
120 <xsl:variable name="icon">
122 <xsl:when test="$ann = 'YES'">text.gif</xsl:when>
123 <xsl:otherwise>generic.red.gif</xsl:otherwise>
128 <img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{@name}]"/>
131 <xsl:variable name="quoteduri">
132 <xsl:call-template name="jsquote">
133 <xsl:with-param name="s" select="$uri"/>
136 <xsl:variable name="quotedname">
137 <xsl:call-template name="jsquote">
138 <xsl:with-param name="s" select="$name"/>
141 <xsl:variable name="quotedbodyname">
142 <xsl:call-template name="jsquote">
143 <xsl:with-param name="s" select="concat($name,'.body')"/>
146 <xsl:variable name="quotedprooftreename">
147 <xsl:call-template name="jsquote">
148 <xsl:with-param name="s" select="concat($name,'.proof_tree')"/>
151 <xsl:value-of select="$name"/>
152 <xsl:text> </xsl:text>
153 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'));"
154 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
157 <xsl:when test="not($body='NO')">Statement</xsl:when>
158 <xsl:otherwise>Definition</xsl:otherwise>
161 <xsl:if test="not($body='NO')">
162 <xsl:text> </xsl:text>
163 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'))"
164 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
167 <xsl:if test="not($proof_tree='NO')">
168 <xsl:text> </xsl:text>
169 <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedprooftreename)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'))"
170 onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"