Subject: Defining a Variable that depends on an unknown number of conditions
From: "Andrew Ferk" <andrewferk@xxxxxxxxx>
Date: Wed, 31 Dec 2008 16:47:48 -0600
|
I am looking for a solution that can define a variable that depends on
an unknown number of conditions. I'm hoping for a solution
compatibile with XSLT 1.0.
xml file: in the xml file there can be any number of <option>'s with a value.
<xml>
<option value="7"/>
<option value="8"/>
...
<option value="1"/>
</xml>
xsl file: How do I define variable "hasZero" based on these conditions...
a) if at least one option has value="0", set "hasZero" to "yes"
b) otherwise "hasZero" is "no".
The only way I can think of doing this is with <xsl:break />, but that
doesn't exits :)
Thank you.
--
Andrew Ferk
|