on 06-18-2010 1:42 PM
Hi All,
My XSLT mapping needs to pick a field(BOL) from the Header and the using that, search the Items node for the matching BOL and generate the output accordingly.
My current XSLT is as follows(not the entire program, just the snippet)
<xsl:for-each select="ns0:Messages/ns0:Message1/ns1:MT_Header/Header">
<xsl:param name="search"><xsl:value-of select="bol"/></xsl:param>
<xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
<Output>
<BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
</Output>
</xsl:for-each>
</xsl:for-each>
The following code works correctly(without the outer for-each and with hardcoding)
<xsl:param name="search">100</xsl:param>
<xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
<Output>
<BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
</Output>
</xsl:for-each>
So its the for-each within another for-each that does not work . Is there some syntax problem ? Or another way to achieve this in XSLT?
Closing this thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.