xsl if within for-each

webmasterbeta

New Member
I wish to display a comma separated list of values, when there are valuesmatching a criteria, and it seems that I have tried every combination I canthink of and none of them work, so I ask for some help and guidance.here is a sample of the XML I am looking at<NODE><CK></CK><CK>Item 1</CK><CK></CK><CK>Item 2</CK><CK></CK><CK></CK><CK>Item 3</CK><CK></CK><OTHER></OTHER></NODE>I want the display to beItem1, Item2, Item3so far I have the following xsl code segment, but I cannot get the if partto work on the current node...<xsl:for-each select="CK"><xsl:if ????? current value != '' ???? ><xsl:value-of /><xsl:if test="context()[not(end())]">, </xsl:if></xsl:if></xsl:for-each>Thanks for any helpCurt
 
Back
Top