XSL: Refer to Current Node in for-each

/ Published in: XSLT
Save to your folder(s)

"current()" is what you want, not "."

Copy this code and paste it in your HTML
  1. <xsl:when test="//benchmark/HoldingsMostRecentQuarter/Holdings/Holding[SubClassName=current()/SubClassName]">
  2. <xsl:value-of select="//benchmark/HoldingsMostRecentQuarter/Holdings/Holding[SubClassName=current()/SubClassName]/SubClassValue"/>
  3. </xsl:when>

URL: http://www.devguru.com/technologies/XSLT/8351.asp

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.