3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:helm="http://www.cs.unibo.it/helm"
5 xmlns:subst="http://www.cs.unibo.it/helm/subst">
7 <xsl:import href="links_library.xsl"/>
8 <xsl:import href="params.xsl"/>
13 media-type="text/html" />
15 <xsl:param name="proofcheckerURL" select="''"/>
16 <xsl:param name="interfaceURL" select="''"/>
17 <xsl:param name="processorURL" select="''"/>
18 <xsl:param name="getterURL" select="''"/>
19 <xsl:param name="draw_graphURL" select="''"/>
20 <xsl:param name="profile" select="''"/>
21 <xsl:param name="url" select="''"/>
22 <xsl:param name="CICURI" select="''"/>
23 <xsl:param name="annotations" select="''"/>
25 <xsl:template match="subst:script">
26 <xsl:copy-of select="document(concat($interfaceURL,@src,'_xml'))" />
29 <xsl:template match="subst:proofcheckerURL">
30 <xsl:value-of select="$proofcheckerURL"/>
33 <xsl:template match="subst:interfaceURL">
34 <xsl:value-of select="$interfaceURL"/>
37 <xsl:template match="subst:processorURL">
38 <xsl:value-of select="$processorURL"/>
41 <xsl:template match="subst:getterURL">
42 <xsl:value-of select="$getterURL"/>
45 <xsl:template match="subst:draw_graphURL">
46 <xsl:value-of select="$draw_graphURL"/>
49 <xsl:template match="subst:profile">
50 <xsl:value-of select="$profile"/>
53 <xsl:template match="subst:url">
54 <xsl:value-of select="$url"/>
57 <xsl:template match="subst:CICURL">
58 <xsl:call-template name="makeCICURL">
59 <xsl:with-param name="uri" select="$CICURI"/>
63 <xsl:template match="subst:HTMLURL">
64 <xsl:call-template name="makeHTMLURL">
65 <xsl:with-param name="uri" select="$CICURI"/>
69 <xsl:template match="subst:MathMLPresentationURL">
70 <xsl:call-template name="makeMathMLPresentationURL">
71 <xsl:with-param name="uri" select="$CICURI"/>
75 <xsl:template match="subst:MathMLContentURL">
76 <xsl:call-template name="makeMathMLContentURL">
77 <xsl:with-param name="uri" select="$CICURI"/>
81 <xsl:template match="subst:DirectRDFURL">
82 <xsl:call-template name="makeDirectRDFURL">
83 <xsl:with-param name="uri" select="$CICURI"/>
87 <xsl:template match="subst:InverseRDFURL">
88 <xsl:call-template name="makeInverseRDFURL">
89 <xsl:with-param name="uri" select="$CICURI"/>
93 <xsl:template match="subst:DCRDFURL">
94 <xsl:call-template name="makeDCRDFURL">
95 <xsl:with-param name="uri" select="$CICURI"/>
99 <xsl:template match="subst:CICURI">
100 <xsl:value-of select="$CICURI"/>
103 <xsl:template match="subst:cleanCICURI">
104 <xsl:variable name="uri" select="$CICURI"/>
105 <xsl:variable name="uri_before_body" select="substring-before($uri,'.body')"/>
107 <xsl:when test="$uri_before_body = ''">
108 <xsl:variable name="uri_before_sharp" select="substring-before($uri,'#')"/>
110 <xsl:when test="$uri_before_sharp = ''">
111 <xsl:value-of select="$uri"/>
114 <xsl:value-of select="$uri_before_sharp"/>
119 <xsl:value-of select="$uri_before_body"/>
124 <xsl:template match="subst:base_CICURI">
125 <xsl:variable name="len" select="string-length($CICURI)" />
126 <xsl:variable name="extension">
128 <xsl:when test="substring($CICURI,$len)='/'">#</xsl:when>
129 <xsl:when test="substring($CICURI,$len - 6)='.theory'">.theory</xsl:when>
130 <xsl:when test="substring($CICURI,$len - 3)='.con'">.con</xsl:when>
131 <xsl:when test="substring($CICURI,$len - 3)='.ind'">.ind</xsl:when>
132 <xsl:when test="substring($CICURI,$len - 3)='.var'">.var</xsl:when>
133 <xsl:when test="substring($CICURI,$len - 8)='.con.body'">.con.body</xsl:when>
136 <xsl:message terminate="no">
137 resolve_topurl.xsl: assertion failed
143 <xsl:call-template name="name_of_uri">
144 <xsl:with-param name="uri">
146 <xsl:when test="substring($CICURI,$len)='/'">
147 <xsl:value-of select="concat(substring($CICURI,1,$len - 1),'#')" />
150 <xsl:value-of select="$CICURI" />
154 <xsl:with-param name="extension" select="$extension" />
158 <xsl:template match="subst:annotations">
159 <xsl:value-of select="$annotations"/>
162 <xsl:template match="subst:makeURL">
163 <xsl:call-template name="makeURL">
164 <xsl:with-param name="uri" select="$CICURI"/>
165 <xsl:with-param name="createframeset" select="false()"/>
169 <xsl:template match="subst:makeProofTreeURL">
170 <xsl:call-template name="makeProofTreeURL">
171 <xsl:with-param name="uri" select="$CICURI"/>
172 <xsl:with-param name="createframeset" select="false()"/>
176 <xsl:template match="subst:makeHTMLURLwithProfile">
177 <xsl:call-template name="makeHTMLURLwithProfile">
178 <xsl:with-param name="uri" select="$CICURI"/>
179 <xsl:with-param name="profile" select="@profile"/>
183 <xsl:template match="subst:makeTheoryURL">
184 <xsl:call-template name="makeTheoryURL">
185 <xsl:with-param name="uri" select="$CICURI"/>
186 <xsl:with-param name="createframeset" select="false()"/>
190 <xsl:template match="subst:makeTheoryURLwithProfile">
191 <xsl:call-template name="makeTheoryURLwithProfile">
192 <xsl:with-param name="uri" select="$CICURI"/>
193 <xsl:with-param name="createframeset" select="true()"/>
194 <xsl:with-param name="profile" select="@profile"/>
198 <xsl:template match="subst:makeDirectDependencyURL">
199 <xsl:call-template name="makeDirectDependenciesURL">
200 <xsl:with-param name="uri" select="$CICURI"/>
204 <xsl:template match="subst:makeRecDependencyURL">
205 <xsl:call-template name="makeGraphURL">
206 <xsl:with-param name="uri" select="$CICURI"/>
207 <xsl:with-param name="keys" select="'MDG'"/>
208 <xsl:with-param name="uri_set_size" select="$uri_set_size"/>
212 <xsl:template match="subst:makeInverseDirectDependencyURL">
213 <xsl:call-template name="makeInverseDirectDependenciesURL">
214 <xsl:with-param name="uri" select="$CICURI"/>
218 <xsl:template match="subst:makeInverseRecDependencyURL">
219 <xsl:call-template name="makeGraphURL">
220 <xsl:with-param name="uri" select="$CICURI"/>
221 <xsl:with-param name="keys" select="'MMG'"/>
222 <xsl:with-param name="uri_set_size" select="$uri_set_size"/>
226 <!-- used by moogle -->
228 <xsl:template match="helm:uwobo_form">
229 <form action="{concat($processorURL,'apply?')}" method="get">
230 <xsl:apply-templates select="*"/>
234 <xsl:template match = "helm:hidden_params">
235 <xsl:call-template name="hidden_params"/>
238 <xsl:template match = "helm:j_params">
239 <xsl:call-template name="j_params"/>
242 <xsl:template name="hidden_params">
243 <input type="hidden" name="xmluri" value="{concat($getterURL,'getempty')}"/>
244 <input type="hidden" name="param.profile" value="{$profile}"/>
245 <input type="hidden" name="profile" value="{$profile}"/>
246 <input type="hidden" name="param.keys" value="{$keys}"/>
247 <input type="hidden" name="param.embedkeys" value="{$embedkeys}"/>
248 <input type="hidden" name="param.thkeys" value="{$thkeys}"/>
249 <input type="hidden" name="param.prooftreekeys" value="{$prooftreekeys}"/>
251 <input type="hidden" name="param.media-type" value="{$media-type}"/>
252 <input type="hidden" name="param.thmedia-type" value="{$thmedia-type}"/>
253 <input type="hidden" name="prooftreemedia-type" value="{$prooftreemedia-type}"/>
254 <input type="hidden" name="param.doctype-public" value="{$doctype-public}"/>
255 <input type="hidden" name="param.encoding" value="{$encoding}"/>
256 <input type="hidden" name="param.thencoding" value="{$thencoding}"/>
257 <input type="hidden" name="param.prooftreeencoding" value="{$prooftreeencoding}"/>
260 <xsl:template name="j_params">
261 <input type="hidden" name="j_xmluri" value="{concat($getterURL,'getempty')}"/>
262 <input type="hidden" name="j_processorURL" value="{$processorURL}"/>
263 <input type="hidden" name="j_profile" value="{$profile}"/>
264 <input type="hidden" name="j_keys" value="{$keys}"/>
265 <input type="hidden" name="j_embedkeys" value="{$embedkeys}"/>
266 <input type="hidden" name="j_thkeys" value="{$thkeys}"/>
267 <input type="hidden" name="j_prooftreekeys" value="{$prooftreekeys}"/>
269 <input type="hidden" name="j_media_type" value="{$media-type}"/>
270 <input type="hidden" name="j_thmedia_type" value="{$thmedia-type}"/>
271 <input type="hidden" name="j_prooftreemedia_type" value="{$prooftreemedia-type}"/>
272 <input type="hidden" name="j_doctype_public" value="{$doctype-public}"/>
273 <input type="hidden" name="j_encoding" value="{$encoding}"/>
274 <input type="hidden" name="j_thencoding" value="{$thencoding}"/>
275 <input type="hidden" name="j_prooftreeencoding" value="{$prooftreeencoding}"/>
278 <xsl:template match="/|*">
280 <xsl:copy-of select="@*"/>
281 <xsl:apply-templates/>