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

Re: Boolean Value of a Sequence of Booleans

Subject: Re: Boolean Value of a Sequence of Booleans
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Dec 2014 21:38:49 -0000
Re:  Boolean Value of a Sequence of Booleans
At 2014-12-05 20:39 +0000, Eliot Kimber ekimber@xxxxxxxxxxxx wrote:
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.

Not knowing the details of your key invocation, could you not do something like:


some $key in $allKeys satisfies count(key($key,$lookup)) > 1

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?

If your operator is OR then:


some $b in $booleanSeq satisfies $b

If your operator is AND then:

every $b in $booleanSeq satisfies $b

By using 'some' and 'every' you are passing on the logic and optimization to the processor.

I hope this helps ... unless I'm missing something in your requirement.

. . . . . . Ken


-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.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.