[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Defining a Variable that depends on an unknown number

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
 Defining a Variable that depends on an unknown number
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.