Bug 15912 - [XP3] Function items based on collation-dependent functions
[XP3] Function items based on collation-dependent functions
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.0
Last Call drafts
PC All
: P2 normal
: ---
Assigned To: Jonathan Robie
Mailing list for public feedback on specs from XSL and XML Query WGs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-06 15:57 UTC by Michael Kay
Modified: 2013-06-19 09:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2012-02-06 15:57:07 UTC
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.

* Examples: bug #15911, bug #15642
Comment 1 Jonathan Robie 2012-03-20 16:23:54 UTC
From the Prague face to face:

Bug 15912 (Context dependent function items). DECIDED to resolve bug 
15912 by splitting the category of functions that are context-dependent 
into two (static-context-dependent and dynamic-context-dependent), and 
permitting use of those that are only static-context-dependent in 
function item literals and dynamic function calls.
Comment 2 Jonathan Robie 2012-03-20 16:29:16 UTC
Leaving open pending WG discussion to specify in more detail.


  翻译: