Re: What to do with outer xf:bind with no @nodeset

Hi Aaron,

I did have a feeling you would point that out.  To be fair to your point, 
I did take note of the fact that the spec did not come out and say that 
the MIPs attach to the context node.  But in fairness to everyone else who 
was satisfied with the current amount of specificity, there isn't a 
terribly obvious alternative for where to attach the MIP when the nodset 
is optional other than attaching the MIP to the context node for the MIP 
expression, which is how it works when the nodeset is required (granted 
because the context node is the same as the node indicated by the 
nodeset).  Put another way, why should it  behave differently and choose a 
different node because one says:

<bind nodeset="x">
     <bind calculate="y"/>
</bind>

rather than

<bind nodeset="x" calculate="y"/>

Still, we can put it on the list of edits for 1.1 going to PR.  Will that 
suffice?

Thanks,
John M. Boyer, Ph.D.
Senior Technical Staff Member
Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw





Aaron Reed <aaronr@us.ibm.com> 
Sent by: www-forms-request@w3.org
02/01/2008 01:13 PM

To
www-forms@w3.org
cc

Subject
Re: What to do with outer xf:bind with no @nodeset







Yep, I had seen that section, which clearly defines what the evaluation 
context node should be for the expressions contained in the MIP 
attributes.  But I don't see it say anywhere that the MIP's are then 
applied to the evaluation context node.  Nor does it say that anywhere 
in the xf:bind section.

And to be what I'm sure is over critical, I don't think that a user 
should have to look in the evaluation context section and read through 
that whole section to know what node(s) the MIPs are being applied to. 
I would expect it to be spelled out in the bind section.  Something like,

nodeset

     An optional attribute containing a model binding expression that 
selects the set of nodes on which this bind operates.  If the nodeset 
attribute is not present, then the bind operates on the evaluation 
context nodes of the bind element.

Then, if the user doesn't know what the evaluation context nodes are, 
they can read further on that subject.

I might be nitpicking, but it certainly isn't clear to me where the 
MIP's are applied.

Also, could someone verify what should happen if my @nodeset points to a 
node with complex content?  For example, the root node that has 3 child 
elements underneath it?  Should the result of @calculate wipe out the 
child elements or should the result of @calculate be stored as the first 
child node (a child text node) of the bound node and leave the child 
elements alone?

--Aaron

John Boyer wrote:
> 
> 
> The definition of the bind element appears here: 
> http://www.w3.org/TR/xforms/#structure-bind-element
> 
> It ends with the statement that the evaluation context for the MIP 
> attributes is obtained here: http://www.w3.org/TR/xforms/#expr-eval
> 
> Wherein the following relevant paragraph appears:
> 
> XPath expressions also appear in model item property attributes of the 
> bind element to define computed expressions. If the bind element does 
> not express a Node Set binding, then the in-scope evaluation context for 

> model item property attributes of the bind is equal to the in-scope 
> evaluation context for the bind. Otherwise, the bind has a Node Set 
> binding, and computed expressions for each model item property attribute 

> are generated for each node. For each computed expression generated, the 

> evaluation context node, position and size are determined by the same 
> method as dynamic in-scope evaluation context rule above, except the 
> computed expression is used in lieu of a binding expression attribute 
> such that the bind element is the nearest ancestor binding element.
> 
> The reference to the expression evaluation section was added in Erratum 
> E23: http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E23
> 
> That erratum also notes that it is dependent on the wording added by 
> erratum E17.3: 
> http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E17c
> 
> which is what included the above paragraph (see the diff-marked version 
> 
http://www.w3.org/2006/03/REC-xforms-20060314-errata-diff-20070719.html#E17c
).. 
> 
> 
> Cheers,
> John M. Boyer, Ph.D.
> Senior Technical Staff Member
> Lotus Forms Architect and Researcher
> Chair, W3C Forms Working Group
> Workplace, Portal and Collaboration Software
> IBM Victoria Software Lab
> E-Mail: boyerj@ca.ibm.com 
> 
> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
> Blog RSS feed: 
> http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw
> 
> 
> 
> 
> *Erik Bruchez <ebruchez@orbeon.com>*
> Sent by: www-forms-request@w3.org
> 
> 01/31/2008 08:32 PM
> 
> 
> To
>                www-forms@w3.org
> cc
> 
> Subject
>                Re: What to do with outer xf:bind with no @nodeset
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  > Orbeon sandbox can't even load the form
> 
> Yup we require the @nodeset attribute on xforms:bind. I had not 
> realized that the @nodeset attribute had become optional and I am 
> interested in the answer too!
> 
> -Erik
> 
>  >
>  >
>  > <?xml version="1.0" encoding="UTF-8"?>
>  > <!-- basic FO page definition stuff -->
>  > <html xmlns="http://www.w3.org/1999/xhtml" 
> xmlns:xforms="http://www.w3.org/2002/xforms
>  > "
>  > xmlns:ev="http://www.w3.org/2001/xml-events"
>  > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  > xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
>  >    <head>
>  >      <title>binding testcase</title>
>  >      <xforms:model>
>  >          <xforms:instance xmlns="">
>  >            <values>
>  >              <value>27</value>
>  >            </values>
>  >          </xforms:instance>
>  >          <xforms:bind id="binddata"
>  >                       calculate="now()"/>
>  >          <xforms:submission id="submitInfo"
>  >                             method="post"
>  >          action="http://www.xformstest.org/cgi-bin/echo.sh" />
>  >      </xforms:model>
>  >    </head>
>  >    <body>
>  >      <h2>I think that the submission should show the current date and
>  >          time along with the value node and its value.
>  >      </h2>
>  >      <h3>Uses now() and bind w/o nodeset attribute</h3><br/>
>  >      <xforms:submit submission="submitInfo">
>  >        <xforms:label>Echo instance data</xforms:label>
>  >      </xforms:submit>
>  >    </body>
>  > </html>
>  >
>  > Any help appreciated.  Thanks,
>  > --Aaron
>  >
>  >
>  >
> 
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
> 
> 
> 

Received on Saturday, 2 February 2008 02:14:38 UTC