]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/links_library.xsl
Initial revision
[helm.git] / helm / style / links_library.xsl
index 1457169fd34f0d975930ef58b84f3b767c4e481e..22e0ac48d779da37cd0f5b7e83c92d32836005e3 100644 (file)
 
 <xsl:param name="getterURL" select="'http://localhost:8081/'"/>
 <xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
+<xsl:param name="draw_graphURL" select="'http://localhost:8083/'"/>
+<xsl:param name="uri_set_queueURL" select="'http://localhost:8084/'"/>
+<xsl:param name="proofcheckerURL" select="'http://localhost:48084/'"/>
 <!-- URL to the frameset (control + output) -->
+<xsl:param name="topurl" select="''"/>
 <xsl:param name="interfaceURL" select="''"/>
 <xsl:param name="thinterfaceURL" select="''"/>
 
@@ -48,6 +52,7 @@
 
 <xsl:param name="naturalLanguage" select="'yes'"/>
 <xsl:param name="annotations" select="'no'"/>
+<xsl:param name="UNICODEvsSYMBOL" select="'symbol'"/>
 
 <xsl:param name="media-type" select="'text/html'"/>
 <xsl:param name="thmedia-type" select="'text/html'"/>
  </xsl:call-template>
 </xsl:variable>
 
+<xsl:variable name="escaped-topurl">
+ <xsl:call-template name="quote">
+  <xsl:with-param name="s" select="$topurl"/>
+ </xsl:call-template>
+</xsl:variable>
+
 <xsl:variable name="escaped-thinterfaceURL">
  <xsl:call-template name="quote">
   <xsl:with-param name="s" select="$thinterfaceURL"/>
 <xsl:variable name="header0"><xsl:value-of select="$interfaceURL"/>?url=</xsl:variable>
 <xsl:variable name="thheader0"><xsl:value-of select="$thinterfaceURL"/>?url=</xsl:variable>
 <xsl:variable name="header1"><xsl:value-of select="$escaped-processorURL"/>apply?keys=</xsl:variable>
-<xsl:variable name="bothheader2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;param.keys=<xsl:value-of select="$quotedkeys"/>&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$escaped-processorURL"/>&#x26;param.interfaceURL=<xsl:value-of select="$escaped-interfaceURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+<xsl:variable name="bothheader2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.proofcheckerURL=<xsl:value-of select="$proofcheckerURL"/>&#x26;param.draw_graphURL=<xsl:value-of select="$draw_graphURL"/>&#x26;param.uri_set_queueURL=<xsl:value-of select="$uri_set_queueURL"/>&#x26;param.UNICODEvsSYMBOL=<xsl:value-of select="$UNICODEvsSYMBOL"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;param.keys=<xsl:value-of select="$quotedkeys"/>&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$escaped-processorURL"/>&#x26;param.interfaceURL=<xsl:value-of select="$escaped-interfaceURL"/>&#x26;param.topurl=<xsl:value-of select="$escaped-topurl"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
 <xsl:variable name="header2">&#x26;prop.media-type=<xsl:value-of select="$media-type"/>&#x26;prop.encoding=<xsl:value-of select="$encoding"/></xsl:variable>
 <xsl:variable name="thheader2">&#x26;prop.media-type=<xsl:value-of select="$thmedia-type"/>&#x26;param.thmedia-type=<xsl:value-of select="$thmedia-type"/>&#x26;param.thkeys=<xsl:value-of select="$quotedthkeys"/>&#x26;param.embedkeys=<xsl:value-of select="$quotedembedkeys"/>&#x26;param.thinterfaceURL=<xsl:value-of select="$escaped-thinterfaceURL"/>&#x26;param.thencoding=<xsl:value-of select="$thencoding"/>&#x26;prop.encoding=<xsl:value-of select="$thencoding"/></xsl:variable>
 
 <xsl:template name="makeURL4embedding">
 <xsl:param name="uri" select="''"/>
 <xsl:param name="type" select="'standalone'"/>
+ <xsl:variable name="uri_after_sharp" select="substring-after($uri,'#')"/>
  <xsl:variable name="cleanuri">
   <xsl:choose>
    <xsl:when test="$uri_after_sharp">
  <xsl:value-of select="$quotedembedkeys"/>
  <xsl:value-of select="$header2"/>
  <xsl:value-of select="$bothheader2"/>
- <xsl:value-of select="$cleanuri"/>&#x26;param.CICURI=<xsl:value-of select="$cleanuri"/>&#x26;param.type=<xsl:value-of select="$type"/>
+ <xsl:value-of select="$cleanuri"/>&#x26;param.CICURI=<xsl:value-of select="$cleanuri"/>&#x26;param.type=<xsl:value-of select="$type"/><xsl:value-of select="$sharpsuffix"/>
+</xsl:template>
+
+<!-- makeURL4InnerTypes() maps URIs into URLs              -->
+<!-- The target of the URL is only the processed document -->
+
+<xsl:template name="makeURL4InnerTypes">
+<xsl:param name="uri" select="''"/>
+ <xsl:variable name="uri_after_sharp" select="substring-after($uri,'#')"/>
+ <xsl:variable name="cleanuri">
+  <xsl:choose>
+   <xsl:when test="$uri_after_sharp">
+    <xsl:value-of select="substring-before($uri,'#')"/>
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$uri"/>
+   </xsl:otherwise>
+  </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sharpsuffix">
+  <xsl:choose>
+   <xsl:when test="$uri_after_sharp">%23<xsl:value-of select="$uri_after_sharp"/></xsl:when>
+   <xsl:otherwise></xsl:otherwise>
+  </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$header1"/>d_c&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.CICURI=<xsl:value-of select="$cleanuri"/>&#x26;xmluri=<xsl:value-of select="$absPath"/><xsl:value-of select="$cleanuri"/>
  <xsl:value-of select="$sharpsuffix"/>
 </xsl:template>