Re: [xsl] variable outside a for-each loop: second try

Subject: Re: [xsl] variable outside a for-each loop: second try
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 20 Sep 2007 17:31:45 +0200
Mathieu Malaterre wrote:

If I copy paste it I am getting:


Error at xsl:value-of on line 21 of file:/tmp/dummy.xsl:
 Required type of second operand of '/' is node(); supplied value has
type xs:string
Transformation failed: Failed to compile stylesheet. 1 error detected.

Where line 21 is:

<xsl:value-of select="../preceding-sibling::row/entry[position() eq
$position][1]/normalize-space(string-join(para,' '))" />

What does this mean ?

It means that line that the compiler is pointing you at is not the line where the error occurs, because the line that you show here does not have a string as the left-hand side of the / operator.


Oh, sorry. I see now: this error seems to come from an XSLT 1.0 processor. But you are using string-join in your original post. Which is a Xpath 2.0 function. What processor are you using? Or do you operate in backward compatibility mode?

-- Abel Braaksma

Current Thread