xsl-list
[Top] [All Lists]

Re: Strange Problem with document($variablename)

2003-07-11 09:36:12

I'm somewhat curious why no-one has made the following observation in this discussion.
Is it irrelevant?

Technically, there is whitespace between the basename and the relative file name
in the source for

<xsl:variable name="filename">
<xsl:value-of select="'../content/news/'" />
<xsl:value-of select="@name" />
</xsl:variable>

Such white space - if it were not removed , might explain why the file name got truncated when used for file lookup.

The concat(...) solution, definitely removed the white space.

Stan Devitt




Torsten Schlabach wrote:

Dear list,

my apologies if this is too obvious, but I cannot figure out this problem
for two days now. This is what I try to do:

In a <xsl:foreach> I iterate some directory elements. I want to open the
corresponding XML file for each of the directly entries. So I need to
concatenate the @name attribute of the current node the <xsl:foreach> iterator 
is
visiting with a directory name prefix. I try to do this like that:

<xsl:variable name="filename">
<xsl:value-of select="'../content/news/'" />
<xsl:value-of select="@name" />
</xsl:variable>

...




XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list