|
top
|
Subject: Using Key Author: prasad rama Date: 27 Jan 2009 02:17 PM
|
Hi,
I got the solution for this problem.
<xsl:key name="tierCode" match="/states/state[@name='TN']/product[@code='Scale']/group[@value='1']/tier" use="@min_custom"/>
Instead of declaring the key like this, I did declared
<xsl:key name="tierCode" match="/states/state/product/group/tier" use="concat(../../../../@name,../../../@code,../@value,@min_custom)"/>
Used the key like this...
<xsl:for-each select="//tier[generate-id()=generate-id(key('tierCode',concat($Name,$Product,'1',@min_custom))[1])]">
So that we can change the StateName,ProductCode and Value dynamically.
|
|
|