Re: Evaluation context

>
> One other thing: I assume that it is right that context() returns the
>> in-scope context as specified in
>> https://www.w3.org/community/xformsusers/wiki/XPath_Expressi
>> ons_Module#The_context.28.29_Function
>>
>
> Whereas position() and last() return the position and size of the element
> context.
> https://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-position


When there is a single-node binding, the context item always has a size of
1 (or may be missing). This is a bit tricky. What does this do:

<xf:repeat ref="1 to 10">
  <xf:output value="position"/>
</xf:repeat>

vs.

<xf:repeat ref="1 to 10">
  <xf:group ref=".">
    <xf:output value="position"/>
  </group>
</xf:repeat>

-Erik

Received on Wednesday, 21 December 2016 05:22:12 UTC