[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|