]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/resolve_topurl.xsl
Links in the control frame when the URI ends with .body are now handled
[helm.git] / helm / on-line / xslt / resolve_topurl.xsl
index c2ad9e28c132ddc956b14178294d07f7b5353dcd..a075e6a15327c57c97a3437079ee9b3a6b432a3b 100644 (file)
  <xsl:value-of select="$CICURI"/>
 </xsl:template>
 
+<xsl:template match="subst:cleanCICURI">
+ <xsl:variable name="uri" select="$CICURI"/>
+ <xsl:variable name="uri_before_body" select="substring-before($uri,'.body')"/>
+ <xsl:variable name="cleanuri">
+  <xsl:choose>
+   <xsl:when test="$uri_before_body = ''">
+    <xsl:value-of select="$uri"/>
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$uri_before_body"/>
+   </xsl:otherwise>
+  </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$cleanuri"/>
+</xsl:template>
+
 <xsl:template match="subst:base_CICURI">
   <xsl:variable name="len" select="string-length($CICURI)" />
   <xsl:variable name="extension">