Boolean "sum" in XSLT
2 answers
Using
boolean(/*/b[. = 'true'])
This creates the boolean value of the expression :
/*/b[. = 'true']
and is true when the specified expression selects at least one node , that is, when exists b
, which is a child of the top element and whose string value is a string 'true
.
If you also want to compute the "logical product" (using and), do:
not(/*/b[. = 'false'])
+3
source to share