- From: John Boyer <boyerj@ca.ibm.com>
- Date: Tue, 3 Apr 2007 18:20:50 -0700
- To: Aaron Reed <aaronr@us.ibm.com>
- Cc: www-forms@w3.org, www-forms-request@w3.org
- Message-ID: <OFB7F7B7EB.08A75FBB-ON882572B3.00074375-882572B3.0007667F@ca.ibm.com>
Yes, that's correct. @value is evaluated and returns a string always, so it can reference anything it wants. The xforms-binding-exception is issued based only on what happens with the single node binding (i.e. @ref or @bind) John M. Boyer, Ph.D. STSM: Workplace Forms Architect and Researcher Co-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 Aaron Reed <aaronr@us.ibm.com> Sent by: www-forms-request@w3.org 04/02/2007 02:50 PM To www-forms@w3.org cc Subject Re: context node for output's contents Thanks for confirming our thoughts, Mark. We will go ahead and fix the bug. A follow up type of question. Assume I have a xf:output has only @value (i.e. no binding attributes). It would NOT fall into the #36 erratum dealing with data binding restrictions, correct? http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E36 So if I had: <xf:instance xmlns=""> <root> <data> <value>This is my value</value> </data> </root> </xf:instance> .... <xf:group ref="/root/data"> <xf:output value="."> <xf:label ref="value"/? </xf:output> <xf:output ref="."/> </xf:group> Would I be correct to say that I should get a xforms-binding-exception for the second output but not the first? --Aaron Mark Birbeck wrote: > > Hi Aaron, > > I would suggest that it is worth fixing, since there should always be > an evaluation context, and so the context for the label should > definitely should be that of the 'most recent' evaluation context. > > formsPlayer does implement it that way, but I do recall that we had a > bug in this area at one time, so you may be using an out of date > version of formsPlayer for your comparisons. But I've just checked > with the latest preview release of 1.5 and it works the way we would > expect it to. I used your test first, and then modified it slightly as > follows: > > < http://svn.x-port.net/svn/public/samples/specifications/xforms/1.0/fc-output-evaluation-context.html > > > > The changes are minor and are only needed because we're trying to > achieve a standard 'format' for our tests, to make it easier to run > them with Selenium. In this case the display will be 'Test 1:ok'. > > The test can be run in Selenium by loading the formsPlayer test suite: > > < http://svn.x-port.net/svn/public/testsuite/selenium/core/TestRunner.html?test=../tests/TestFormsPlayer.html > > > > and then choosing the test 'TestXForms10FcOutputEvaluationContext' in > the left pane. Click on 'Selected' in the right pane to run only this > test. > > Regards, > > Mark > > On 02/04/07, Aaron Reed <aaronr@us.ibm.com> wrote: >> >> Hi, >> >> formsPlayer and XSmiles don't handle this testcase, but I think that it >> is a valid one. The general question is, "should the xforms contents of >> an output with @value have no context node with which to evalutate their >> xpath expressions (since the output has no binding attributes) or should >> they inherit the context node that the output used to evaluate its >> @value expression? Mozilla supported this at one time but regressed it >> so now I'm wondering if it is worth fixing if no one else handles this >> like Mozilla. >> >> Here is an example form: >> >> <?xml version="1.0"?> >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" >> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> >> <html xmlns="http://www.w3.org/1999/xhtml" >> xmlns:html="http://www.w3.org/1999/xhtml" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xforms="http://www.w3.org/2002/xforms" xml:lang="en"> >> <head> >> <title>Output Value Context</title> >> <xforms:model> >> <xforms:instance xmlns=""> >> <data xmlns=""> >> <value>X</value> >> </data> >> </xforms:instance> >> </xforms:model> >> </head> >> <body> >> <div> >> <p> >> This testcase test whether an output with a value attribute >> sets the >> correct context for its children (the label). The context should >> be its >> parent's context. >> </p> >> <p> >> I believe the following should display "X X Y": >> </p> >> <xforms:group ref="value"> >> <xforms:output ref="."/> >> <xforms:output value="'Y'"> >> <xforms:label ref="."/> >> </xforms:output> >> </xforms:group> >> </div> >> </body> >> </html> >> >> Thanks for any guidance, >> --Aaron >> >> >> >> >> > >
Received on Wednesday, 4 April 2007 01:21:15 UTC