<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">