| | Stylesheet |
<xsl:stylesheet extension-element-prefixes="saxon" version="2.0">
<xsl:variable name="basename">
<xsl:if test="function-available('saxon:system-id')">
<xsl:analyze-string select="saxon:system-id()" regex="[^/]+$">
<xsl:matching-substring>
<xsl:choose>
<xsl:when test="contains(., '%7e')">
<xsl:value-of select="concat(substring-before(.,'%7e'), '~', substring-after(.,'%7e'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:if>
</xsl:variable>
<xsl:template name="xmlink">
<xsl:if test="$basename != ''">
<a title="{$basename}" href="{$basename}">
<xsl:value-of select="$basename"/>
</a>
</xsl:if>
</xsl:template>
<xsl:variable name="add-ext">.html</xsl:variable>
</xsl:stylesheet> xmlink2.xsl |