Summary: Function items based on collation-dependent functions
Product: XPath / XQuery / XSLT
Version: Last Call drafts
Component: XPath 3.0
AssignedTo: jonathan.robie@... ReportedBy: mike@... QAContact: public-qt-comments@...
We have a number of bug reports against tests (*) that use constructs such as
contains#2 or deep-equal#2 - constructs which we have disallowed because the
functions in question are context-dependent. I think this points to a usability
problem which we should fix. Users can work around the problem by defining
their own function as a wrapper around the system function, but it's clumsy,
and users are going to trip over this all the time.
I propose that we should remove the ban on forming function items from
context-dependent system functions in the case where the only dependency is on
the static context. In very many of these cases the dependency is on the
default collation. It makes sense to take the default collation from the static
context at the point where the function literal appears. There is no ambiguity,
as there could be in the case of a dependency on the dynamic context.