An alternate title might be why true is false.
I got some help from Matthieu debugging a BPEL process today, and it boiled down to this little construct:
<b:while> <b:condition>true</b:condition> [...] </b:while>
A lint for XPath 1.0 would have caught this one. As written, true is a relative location path, and depending on the document and context node, if there isn't a node named true, it would evaluate to the boolean value false. (The expressions section of WS-BPEL 2.0 specification further states that the XPath function boolean(...) should be applied to any value not already a boolean.)
This is what the true() function is for. Kudos to Matthieu for spotting it after we'd explored a few rabbit holes looking for an explanation. (And, yes, I still write WS-BPEL by hand in Emacs. I'll get around to updating my Relax NG Compact schema for transitional BPEL to WS-BPEL 2.0 at some point.)












