[Bug 22732] [F+O 3.0] Function-lookup and the dynamic context

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22732

--- Comment #5 from Ghislain Fourny <g@28.io> ---
I am wondering if does not suffice to add the exact same wording as for named
function references, since the idea and behavior is the same.

i.e.

"If the function retrieved by fn:function-lookup has an
implementation-dependent implementation, then the implementation of the
function returned by fn:function-lookup is associated with the static context
of the expression calling fn:function-lookup, and to the dynamic context in
which it is currently being evaluated."



Also, both for named function references and for fn:function-lookup, I am
wondering if, when this association is made, we should not explicitly define a
brand new function based on the underlying, context-dependent one. The way I
would picture it is:
- if no context association is made, the function that is returned is _exactly_
that from the dynamic context.
- if a context association is made, it is a different function, obtained by
copying the one in the dynamic context, removing its name and associating DC
and SC with the implementation-defined implementation.


Then we could fine-tune, like only make the association if the function is
context-dependent (currently, we always associate a context if it has an
implementation-dependent implementation, but it has no effect at all if the
function is not context-dependent).

I hope it makes sense.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 23 July 2013 16:14:31 UTC