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

Re: Circular dependencies

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 22 Nov 2016 09:22:37 -0800
Message-ID: <CAAc0PEVXkT1bCWkCfTL-ZCOSkFo=90Y45=_LcTQe-awz-f=oUg@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
>
> If a compute is computationally dependent on an element in L and part of a
>> circular dependency, then an xforms-compute-error event must be dispatched
>> to the model element."
>>
>> It looks like
>>
>>         <bind ref="a" constraint=". != 13">
>>
>> is a circular dependency according to these definitions.
>
>
> Mmh, it says explicitly at the beginning "excluded are references to the
> current node's value in calculate expressions (such an instance node does
> not take itself as a dependent)." So I guess not?
>
>
> calculate != constraint
>
> This is excluded:
>
>    <bind ref="a" calculate="if(../condition, ., 0)"/>
>

Got it. In that case it seems wrong as there is clearly not a circular
dependency here.

This said it could become right in the big picture if we allowed the new
`valid()` [1], etc. functions in MIPs.

    <bind ref="a" constraint="valid(.)">

But currently we explicitly disallow/discourage this:

    "If the function is used in a model binding expression the XForms
Processor should dispatch the event xforms-binding-error Event to the
model. If the function is used in a computed expression the XForms
Processor should dispatch the event xforms-expression-error Event to the
model."

-Erik

[1]
https://www.w3.org/community/xformsusers/wiki/XPath_Expressions_Module#The_valid.28.29_Function
Received on Tuesday, 22 November 2016 17:23:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 22 November 2016 17:23:30 UTC