I have XML that looks like
<answers>
<answer>
<question-number>1</question-number>
<value>3</value>
<mean xsi:nil="1" />
</answer>
<answer>
<question-number>2</question-number>
<value>2</value>
<mean>2.3</mean>
</answer>
<answer>
<question-number>3</question-number>
<value>3</value>
<mean xsi:nil="1" />
</answer>
....
</answers>
I'm formatting each answer using xsl:for-each. If there is a mean present I have a graphical representation of the mean. For some potential lists of answers the mean will always be null.
At the bottom of the page I want to put a legend explaining the graphical representation of the mean. But I only want it to appear if I actually displayed a mean at all. So I want to be able to do a check, after closing the xsl:for-each, to say "do any of the answer elements have a non-null mean value?".
Really not sure how to do that.