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')"/>
106 <xsl:variable name="cleanuri">
108 <xsl:when test="$uri_before_body = ''">
109 <xsl:value-of select="$uri"/>
112 <xsl:value-of select="$uri_before_body"/>
116 <xsl:value-of select="$cleanuri"/>
119 <xsl:template match="subst:base_CICURI">
120 <xsl:variable name="len" select="string-length($CICURI)" />
121 <xsl:variable name="extension">
123 <xsl:when test="substring($CICURI,$len)='/'">#</xsl:when>
124 <xsl:when test="substring($CICURI,$len - 6)='.theory'">.theory</xsl:when>
125 <xsl:when test="substring($CICURI,$len - 3)='.con'">.con</xsl:when>
126 <xsl:when test="substring($CICURI,$len - 3)='.ind'">.ind</xsl:when>
127 <xsl:when test="substring($CICURI,$len - 3)='.var'">.var</xsl:when>
128 <xsl:when test="substring($CICURI,$len - 8)='.con.body'">.con.body</xsl:when>
131 <xsl:message terminate="no">
132 resolve_topurl.xsl: assertion failed
138 <xsl:call-template name="name_of_uri">
139 <xsl:with-param name="uri">
141 <xsl:when test="substring($CICURI,$len)='/'">
142 <xsl:value-of select="concat(substring($CICURI,1,$len - 1),'#')" />
145 <xsl:value-of select="$CICURI" />
149 <xsl:with-param name="extension" select="$extension" />
153 <xsl:template match="subst:annotations">
154 <xsl:value-of select="$annotations"/>
157 <xsl:template match="subst:makeURL">
158 <xsl:call-template name="makeURL">
159 <xsl:with-param name="uri" select="$CICURI"/>
160 <xsl:with-param name="createframeset" select="false()"/>
164 <xsl:template match="subst:makeProofTreeURL">
165 <xsl:call-template name="makeProofTreeURL">
166 <xsl:with-param name="uri" select="$CICURI"/>
167 <xsl:with-param name="createframeset" select="false()"/>
171 <xsl:template match="subst:makeHTMLURLwithProfile">
172 <xsl:call-template name="makeHTMLURLwithProfile">
173 <xsl:with-param name="uri" select="$CICURI"/>
174 <xsl:with-param name="profile" select="@profile"/>
178 <xsl:template match="subst:makeTheoryURL">
179 <xsl:call-template name="makeTheoryURL">
180 <xsl:with-param name="uri" select="$CICURI"/>
181 <xsl:with-param name="createframeset" select="false()"/>
185 <xsl:template match="subst:makeTheoryURLwithProfile">
186 <xsl:call-template name="makeTheoryURLwithProfile">
187 <xsl:with-param name="uri" select="$CICURI"/>
188 <xsl:with-param name="createframeset" select="true()"/>
189 <xsl:with-param name="profile" select="@profile"/>
193 <xsl:template match="subst:makeDirectDependencyURL">
194 <xsl:call-template name="makeDirectDependenciesURL">
195 <xsl:with-param name="uri" select="$CICURI"/>
199 <xsl:template match="subst:makeRecDependencyURL">
200 <xsl:call-template name="makeGraphURL">
201 <xsl:with-param name="uri" select="$CICURI"/>
202 <xsl:with-param name="keys" select="'MDG'"/>
203 <xsl:with-param name="uri_set_size" select="$uri_set_size"/>
207 <xsl:template match="subst:makeInverseDirectDependencyURL">
208 <xsl:call-template name="makeInverseDirectDependenciesURL">
209 <xsl:with-param name="uri" select="$CICURI"/>
213 <xsl:template match="subst:makeInverseRecDependencyURL">
214 <xsl:call-template name="makeGraphURL">
215 <xsl:with-param name="uri" select="$CICURI"/>
216 <xsl:with-param name="keys" select="'MMG'"/>
217 <xsl:with-param name="uri_set_size" select="$uri_set_size"/>
221 <!-- used by moogle -->
223 <xsl:template match="helm:uwobo_form">
224 <form action="{concat($processorURL,'apply?')}" method="get">
225 <xsl:apply-templates select="*"/>
229 <xsl:template match = "helm:hidden_params">
230 <xsl:call-template name="hidden_params"/>
233 <xsl:template match = "helm:j_params">
234 <xsl:call-template name="j_params"/>
237 <xsl:template name="hidden_params">
238 <input type="hidden" name="xmluri" value="{concat($getterURL,'getempty')}"/>
239 <input type="hidden" name="param.profile" value="{$profile}"/>
240 <input type="hidden" name="profile" value="{$profile}"/>
241 <input type="hidden" name="param.keys" value="{$keys}"/>
242 <input type="hidden" name="param.embedkeys" value="{$embedkeys}"/>
243 <input type="hidden" name="param.thkeys" value="{$thkeys}"/>
244 <input type="hidden" name="param.prooftreekeys" value="{$prooftreekeys}"/>
246 <input type="hidden" name="param.media-type" value="{$media-type}"/>
247 <input type="hidden" name="param.thmedia-type" select="{$thmedia-type}"/>
248 <input type="hidden" name="prooftreemedia-type" select="{$prooftreemedia-type}"/>
249 <input type="hidden" name="param.doctype-public" select="{$doctype-public}"/>
250 <input type="hidden" name="param.encoding" select="{$encoding}"/>
251 <input type="hidden" name="param.thencoding" select="{$thencoding}"/>
252 <input type="hidden" name="param.prooftreeencoding" select="{$prooftreeencoding}"/>
255 <xsl:template name="j_params">
256 <input type="hidden" name="j_xmluri" value="{concat($getterURL,'getempty')}"/>
257 <input type="hidden" name="j_processorURL" value="{$processorURL}"/>
258 <input type="hidden" name="j_profile" value="{$profile}"/>
259 <input type="hidden" name="j_keys" value="{$keys}"/>
260 <input type="hidden" name="j_embedkeys" value="{$embedkeys}"/>
261 <input type="hidden" name="j_thkeys" value="{$thkeys}"/>
262 <input type="hidden" name="j_prooftreekeys" value="{$prooftreekeys}"/>
264 <input type="hidden" name="j_media_type" value="{$media-type}"/>
265 <input type="hidden" name="j_thmedia_type" select="{$thmedia-type}"/>
266 <input type="hidden" name="j_prooftreemedia_type" select="{$prooftreemedia-type}"/>
267 <input type="hidden" name="j_doctype_public" select="{$doctype-public}"/>
268 <input type="hidden" name="j_encoding" select="{$encoding}"/>
269 <input type="hidden" name="j_thencoding" select="{$thencoding}"/>
270 <input type="hidden" name="j_prooftreeencoding" select="{$prooftreeencoding}"/>
273 <xsl:template match="/|*">
275 <xsl:copy-of select="@*"/>
276 <xsl:apply-templates/>