xsl-list
[Top] [All Lists]

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

2009-11-19 12:33:52
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--