Re: "Focus"

Yes it's XPath 2 terminology: [1]

    "[Definition: The first three components of the dynamic context
(context item, context position, and context size) are called the focus of
the expression. ] The focus enables the processor to keep track of which
items are being processed by the expression."

So we have:

- focus for the purpose of XPath evaluation
- focus on a UI control

The current HTML spec says this: [2]

    "When interacting with an interface using a keyboard, key input is
channeled from the system, through the hierarchy of interactive widgets, to
an active widget, which is said to be focused."

Maybe we could disambiguate by using "keyboard focus", as it is related to
the keyboard and matters for keyboard input (that's also the approach we
took in our documentation [3]), and try to not use focus in relation to
XPath evaluation?

-Erik

[1] https://www.w3.org/TR/xpath20/#dt-dynamic-context
[2] https://html.spec.whatwg.org/multipage/interaction.html#introduction-7
[3] https://doc.orbeon.com/xforms/focus.html

On Tue, Nov 1, 2016 at 8:20 AM, Philip Fennell <Philip.Fennell@marklogic.com
> wrote:

> Hello Steven,
>
> I don’t recall ever using or seeing used the term ‘focus’ in an XPath
> context. Only in the context of UI.
>
>
> Philip
>
> On 01/11/2016 14:23, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:
>
>     The spec uses the word 'focus' in two different ways:
>
>     1. In evaluation contexts:
>     https://www.w3.org/community/xformsusers/wiki/XForms_2.0#
> Maintaining_Position:_the_Focus
>
>     "The evaluation context consists of at least the focus, the variables
> in
>     scope and the available functions."
>
>     "The focus consists of the context item, position and size "
>
>     2. For the control that interaction is directed to.
>
>     Not actually defined anywhere (which I shall fix), but used all over
> the
>     place.
>
>     E.g. "Changing the focus to a form control within a repeat object may
>     cause one or more repeat index values to be changed"
>
>     This needs to be fixed.
>
>     Is there any technical reason that we use "focus" in the first case?
> (Is
>     it an XPath technical term that we are required to use?)
>
>     Steven
>
>
>
>

Received on Tuesday, 1 November 2016 16:34:21 UTC