Re: [xsl] for-each tokenize() and context problem

Subject: Re: [xsl] for-each tokenize() and context problem
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 19 Nov 2009 18:33:16 +0100
Mario Madunic wrote:
I have the following variable,

Put an <xsl:variable name="t" select="."/> here, then

<xsl:variable name="l_GetPartNumber">
  <xsl:for-each select="tokenize(normalize-space($l_Components), ' ')">
    <xsl:variable name="l_Num" select="." />
    <xsl:for-each select="ancestor::*[self::page]/row[entry[1] = $l_Num]/entry[3]">

here use
<xsl:for-each select="$t/ancestor::*[self::page]/row[entry[1] = $l_Num]/entry[3]">


That is necessary as with the for-each select="tokenize(...)" you no longer have the context node you have outside of the for-each.




--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread