W3C home > Mailing lists > Public > public-forms@w3.org > May 2010

Re: Teaser with model and bind

From: COUTHURES Alain <alain.couthures@agencexml.com>
Date: Sat, 15 May 2010 08:03:45 +0200
Message-ID: <4BEE3941.2040602@agencexml.com>
To: Erik Bruchez <ebruchez@orbeon.com>
CC: Forms WG <public-forms@w3.org>, www-forms@w3.org
Erik,

I tested your teaser (I changed bind/@ref to bind/@nodeset):

    * EMC Formula: "banana"
    * Mozilla extension: "Joe"
    * XSLTForms: nothing

According to XForms 1.1 recommendation,

    * Every XPath expression requires an evaluation context consisting
      of a node, position, size, variable bindings, function set, and
      namespace context.
    * if the binding element expresses a |model| attribute that refers
      to a |model| other than the one containing the context node, then
      the context node of the in-scope evaluation context is changed to
      be the top-level document element node of the default instance of
      the referenced |model|, and the context position and size are
      changed to 1.
    * [the output Element] cannot bind to element nodes that have
      element children.
    * If element child nodes are present, then an
      |xforms-binding-exception| occurs.

So, my point of view is that an exception should occur and I'm still 
proud of XSLTForms for not being completely wrong ;-)

It might be easier for developer if context could consist of a node for 
each model... then "Joe" would be displayed, don't you think?

BTW, is there a price to win? ;-)

-Alain
> All,
>
> Here is a little puzzle:
>
> http://gist.github.com/401939
>
> What should the output sow, "Joe", or "banana"?
>
> First, is it clear that it is allowed to refer by id to a bind that
> does not belong to the current model?
>
> If so, since by specifying @model="model1" we are not actually
> changing the model in the sense that there is no ancestor @model
> attribute changing the model, should @model="model1" ensure that the
> nested xforms:output point to a node in model1 rather than model2?
>
> -Erik
>
>
>   
Received on Saturday, 15 May 2010 06:02:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:53 UTC