We're using MSXML4 and I'm trying to get xsl:include to work but I'm having
trouble. I created file "replace_string.xsl" that contains this:
<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="with"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of
select="substring-before($text,$replace)"/>
<xsl:value-of select="$with"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text"
select="substring-after($text,$replace)"/>
<xsl:with-param name="replace"
select="$replace"/>
<xsl:with-param name="with" select="$with"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</stylesheet>
*---------------------------------------------------------------------
Then in another style sheet where I want to "include" that template I use this
as a top-level element:
<xsl:include href="replace_string.xsl" />
Now "replace_string.xsl" is in the same application directory as the ASP page
rendering the page, and the xsl style sheet being rendered is in the same
directory. What happens is that I get a blank page in the browser when that
page is rendered. If I comment out the xsl:include then the page renders ok.
I've tried putting replace_string.xsl in the document root but that didn't
help. I'm sure there is something stupid that I'm (not) doing - please tell me
what the problem is.
TIA.
Hardy Merrill
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--