]> matita.cs.unibo.it Git - helm.git/commitdiff
cleanURI now removes also the part that follows the '#' symbol.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 5 Jul 2004 14:05:21 +0000 (14:05 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 5 Jul 2004 14:05:21 +0000 (14:05 +0000)
helm/on-line/xslt/resolve_topurl.xsl

index 6950471088529b9767f01b4637d465ae54516de5..c7f66437463d08c78224b1bf2702fc464954f5d7 100644 (file)
 <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:choose>
+  <xsl:when test="$uri_before_body = ''">
+   <xsl:variable name="uri_before_sharp" select="substring-before($uri,'#')"/>
+   <xsl:choose>
+    <xsl:when test="$uri_before_sharp = ''">
+     <xsl:value-of select="$uri"/>
+    </xsl:when>
+    <xsl:otherwise>
+     <xsl:value-of select="$uri_before_sharp"/>
+    </xsl:otherwise>
+   </xsl:choose>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:value-of select="$uri_before_body"/>
+  </xsl:otherwise>
+ </xsl:choose>
 </xsl:template>
 
 <xsl:template match="subst:base_CICURI">