]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/links_library.xsl
occurrences.xsl added
[helm.git] / helm / style / links_library.xsl
index a12807df235be0f031b36703fa8b8045c3b9a98c..fbe301634a01996a8273bdc8fe0abdf1febd12ae 100644 (file)
 <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="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>
 
 </xsl:stylesheet> 
+
+
+