|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: xsl:include href problems - again
Subject: Re: xsl:include href problems - again
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Mon, 17 Oct 2005 13:28:46 -0400
|
Hardy Merrill wrote:
I have a stylesheet in the document root which renders fine when I do these:
<xsl:include href="includes/new_banner.xsl"/>
<xsl:include href="includes/new_footer.xsl"/>
Why not just do that?
But does NOT work (***and I don't understand why***) if I add the leading slash like this:
<xsl:include href="/includes/new_banner.xsl"/>
<xsl:include href="/includes/new_footer.xsl"/>
that produces just a blank screen - no error.
Because your webserver is not providing the files, the filesystem is.
You are transforming on your webserver machine. The transformation is
not happening in the browser. If it was happening in the browser then
the above should work.
I don't want to do this (doesn't work anyway and I don't know why, but might be
a permission issue with the "includes" directory):
<xsl:include href="http://our.developmentserver.com/includes/new_banner.xsl"/>
<xsl:include href="http://our.developmentserver.com/includes/new_footer.xsl"/>
because then when I migrate this xsl to our "test" and "prod" servers I'd have to
change the "our.developmentserver.com" to "our.testserver.com" and so on.
This should work, but it is a waste of network resources since the files
are relative to the including XSL. I would use your first example above.
I'm looking for a way to have the include href's refer to things relative to the document
root, without having to name the specific server in an http string. Is this possible?
yes. use your first example.
-Rob

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|