Hey guys,
Here's what I'm trying to do: only execute code when the value of an item isn't an empty string. Tell me what looks wrong:
XML:
<Item>Item1</Item>
<Item>Item2</Item>
<Item></Item>
<Item>Item3</Item>
XSL:
<xsl:template match="Item">
<xsl:for-each select=".">
<xsl:if test="value-of select='Item' != ''">
DO STUFF HERE
</xsl:if>
</xsl:for-each>
</xsl:template>
I'm pretty sure the way I'm trying to get the value fromthe current node is wrong in the if, but I'm not sure what it should be.
Thanks,
Jack
Here's what I'm trying to do: only execute code when the value of an item isn't an empty string. Tell me what looks wrong:
XML:
<Item>Item1</Item>
<Item>Item2</Item>
<Item></Item>
<Item>Item3</Item>
XSL:
<xsl:template match="Item">
<xsl:for-each select=".">
<xsl:if test="value-of select='Item' != ''">
DO STUFF HERE
</xsl:if>
</xsl:for-each>
</xsl:template>
I'm pretty sure the way I'm trying to get the value fromthe current node is wrong in the if, but I'm not sure what it should be.
Thanks,
Jack