Hello.
What I am doing is reading in some xml and using xsl to output it in a table to make it more readable.
So some sample xml:
<example1>
<sample name="aaa">
<help1>Help</help1>
<help2>Me</help2>
</sample>
<sample name="bbb">
<noHelp1>No</noHelp1>
<noHelp2>Help</noHelp2>
</sample>
</example1>
So I have a for-each loop to go through each sample. so <xsl:for-each select="example1/sample">
and will use some value-of statements to print some of the values into a table.
Now what I wanted to do was use an if statement to say
if for-each sample, example1/sample/help1 = valid path, then do something
So I thought it would be something along the lines of...
...
<xsl:if test = "something">
<xsl:for-each select="example1/sample">
doWork
</xsl:for-each>
</xsl:if>
The problem is I don't know how to test for this, ie. I don't know what the 'something' should be. I'm also not sure if I should use the if statement within the for-each statement instead.
Any help would be much appreciated.