In backwards compatibilility mode, when a function is
declared with an optional string parameter, and the
supplied value is an empty sequence, this should be
converted to an empty string. Saxon is supplying an
The result is that a test such as
string-length(@x) = 0
is returning () rather than true when @x is absent. In
most boolean contexts, () is taken as false.
Test case: predicate58
Source code fixed.