[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:include problems

Subject: xsl:include problems
From: "Hardy Merrill" <HMerrill@xxxxxxxxxxxxxxxx>
Date: Tue, 31 May 2005 12:22:12 -0400
xsl include problems
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.