W3C home > Mailing lists > Public > public-xformsusers@w3.org > December 2016

Re: Evaluation context

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 20 Dec 2016 21:21:16 -0800
Message-ID: <CAAc0PEXTH+QzMBtz0vwZvwxN2gCAa+TZ+Gv2=2DVuOUx6YwyLQ@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: XForms <public-xformsusers@w3.org>
>
> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:47 UTC