</xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$path" />
+ <xsl:variable name="path_before_body" select="substring-before($path,'.body')"/>
+ <xsl:variable name="cleanpath">
+ <xsl:choose>
+ <xsl:when test="$path_before_body = ''">
+ <xsl:value-of select="$path"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$path_before_body"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$cleanpath" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>