|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Strange Problem with document($variablename)
Hi Torsten,
> Using <p><xsl:value-of select="$filename"/></p> the correct filename
> is being printed.
>
> (For example ../content/news/foo" if @name == foo.)
>
> Using document($filename) I get a java.io.FileNotFound exception for
> "../content/news/" (where is the foo gone; it the identical
> variable!!!).
That's very peculiar. If you want an equivalent variable, try using
the concat() function:
<xsl:variable name="filename"
select="concat('../content/news/', @name)" />
I doubt that it will give you a different result.
By the way, the reason that the file isn't found might be because the
URL is being resolved relative to the directory that the stylesheet
lives in rather than the directory that the XML document lives in. Try
using:
document($filename, .)
to get the $filename URL to be resolved relative to the current
<directory> element.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








