I have a xml:
0
I want to implement logic that will return true if one of the success tags is equal to 0 and false if all of them are equal to 0.
First, let's make the truth table:
All zeros | None zero | Some zero, others not
-------------------------------------------
False | False | True
Second, node-set comparison in XPath are existencial. So:
boolean(/soapenv:Envelope/soapenv:Body[success = 0 and success != 0])
It will return true
or false
boolean value.
This input
0
0
1
With this stylesheet
Returns
true
Check it in http://www.utilities-online.info/xsltransformation/?save=ceed7a50-6a47-4c2c-b344-86ad3b3b0d92-xsltransformation