#29 context() function

open
nobody
None
5
2012-12-21
2010-06-21
No

The context() function, at least when used on setvalue, returns the
context node of the setvalue instead of the context of the parent node.

Here's the example from the XForms 1.1 Recommendation:

<setvalue ref="x" value="context()/y"/>

This action sets node |x| to the value of node |y|, where both nodes
are children of the in-scope evaluation context node for the
|setvalue| element.

Here's an test case that shows that the value of context() in this case
would be the "x" node, which is incorrect.

http://xformstest.org/klotz/2010/06/context/context-wrong-context.xml

Note that we are considering a context(id) function for XForms 1.2,
where the id would specify the id of an element in current scope, so a
fix that makes implementing context(id) easier would be valuable to
XSLTForms as well.

https://sourceforge.net/mailarchive/forum.php?forum_name=xsltforms-support

Discussion