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

ACTION-2076 - Propose text for what value is used when the evaluation of function/result@value fails

From: Erik Bruchez <erik@bruchez.org>
Date: Tue, 22 Nov 2016 22:16:52 -0800
Message-ID: <CAAc0PEX4FBpZWitp45b0vsqSYathywav+ATNFwY0RoR7PvLRvA@mail.gmail.com>
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
All,

As discussed during this call [1].

I suggest the following text:

"A static or dynamic XPath error occurring while evaluating the `value`
attribute on the `result` element, or while evaluating the value of a `var`
element within the `body` element, propagates to the expression calling the
function."

I also covered `function/body/var` elements.

This leaves the handling of the static or dynamic error to the caller. So
an error in a custom function called by a `calculate` for example will
raise an `xforms-binding-error` (11.5.3), while an error in a custom
function called by `setvalue` in an action handler will raise 11.5.5 an
`xforms-action-error` (11.5.5).

Now this is separate but I notice that we don't say in "3.3.1 Function
signature syntax" what happens if the syntax of the function signature is
incorrect.

We do mention "It is a static error if two parameters of a custom function
have the same name." But we don't say how this works really.

We could say that an incorrect signature causes a static error when the
function is called, but we might not even know how to match that function
to a caller if the signature is messed up. And what if the function is
never called?

We dispatch `xforms-compute-error` to the model for missing functions.
Maybe we could use `xforms-expression-error` in this case.

-Erik

[1] https://www.w3.org/2016/10/12-forms-minutes.html
Received on Wednesday, 23 November 2016 06:17:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 23 November 2016 06:17:48 UTC