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

Boolean Value of a Sequence of Booleans

Subject: Boolean Value of a Sequence of Booleans
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Dec 2014 20:39:21 -0000
 Boolean Value of a Sequence of Booleans
I think I must be forgetting something fundamental, but I'm not figuring
out how to do something that should be fundamental, I think.

Using XSLT2, I'm examining all the items in a key() map to see if any
entries in the map have more than 1 item. I'm doing this by iterating over
the keys. I'm then producing a boolean for each iteration and capturing
the sequence of booleans in a variable.

My thinking was that I could then just AND the sequence to determine if
any of the items had more than 1 item. But I see that boolean() and not()
don't operate on sequences of booleans. Hmph.

I realize thinking about it now that I can only put true() items in my
sequence and then just check the first one.

But my question still remains: is there a built-in way to apply boolean
operators to a sequence of booleans or would I need to write my own
function? Obviously, if I was writing my own function I'd just use
recursion to walk the sequence, which would allow early termination for
and() and or().

Have I missed something obvious or not so obvious? I am I just thinking
about this particular problem the wrong way?

Thanks,

Eliot

bbbbb
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

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.