context for origin on xf:insert

Hi,

In XForms 1.1, I have a question about @bind.  The contents of this 
question are inspired by a testcase on a bug opened against our Mozilla 
XForms extension (https://bugzilla.mozilla.org/show_bug.cgi?id=391586).

If I have:

   <xf:group ref="instance('containers')/source/date">
     <xf:trigger>
       <xf:label>copy source date (containing text)</xf:label>
       <xf:action ev:event="DOMActivate">
         <xf:insert bind="date" origin="." position="after" at="1"/>
       </xf:action>
     </xf:trigger>
   </xf:group>

should the context node for the evaluation of @origin's XPath expression 
be the result of the evaluation of @bind?  Or should the context node 
for @origin be instance('containers')/source/date?

The spec says -> "The insert context is determined. If the bind 
attribute is present or if the context attribute is not given, the 
insert context is the in-scope evaluation context. Otherwise, the XPath 
expression provided by the context attribute is evaluated using the 
in-scope evaluation context, and the first node rule is applied to 
obtain the insert context." I would think that the result of @bind's 
evaluation would be the context node since that is how xpath evaluations 
are evaluated on almost every other xforms element in the spec (for 
example setvalue) and this would also logically explain why @context is 
ignored if @bind is present.  But both the Orbeon and Sidewinder 
implementations seem to think that the context should be 
instance('containers')/source/date.

I assume one of us is right :)  And I am guessing that it is probably 
Orbeon and Sidewinder since the spec mentions in-scope evaluation 
context instead of 'Nodeset binding'.  However, it is quite confusing to 
have 'Node Set Binding' attributes mentioned in the insert action, have 
@context ignored if @bind is present, but then not have @bind provide 
context for the xpath evaluations even though it provides context 
elsewhere in the spec.  It might be worth a special mention in the spec.

Thanks for your help,
--Aaron

Received on Thursday, 9 August 2007 23:44:22 UTC