- From: John Boyer <boyerj@ca.ibm.com>
- Date: Thu, 9 Dec 2010 08:40:28 -0800
- To: "Leigh L. Klotz, Jr." <Leigh.Klotz@Xerox.com>
- Cc: public-forms@w3.org, www-forms@w3.org
- Message-ID: <OFA9350E55.4EDFDC9A-ON882577F4.005AB9CF-882577F4.005B9A9F@ca.ibm.com>
Modulo my comments about why the spec might have originally contained that language (consistency, required MIP), this topic rings a bell as having been discussed and decided, perhaps a couple of years back, and that perhaps the human error of not creating an action item to fix the spec may have caused us to... not fix the spec. The bell I seem to recall is that we wanted the possibility of getting a select1 back into the "unselected" state. One can already do this for a select by simply unselecting everything, but for a select1 the only way to do it is to have an item with an empty value. I seem to recall our concluding that a form author who doesn't like that feature in his forms has options for simply not using that feature. Further, if the select1 is bound to a required node, it is of no consequence that the user's choice puts the form back into an unsubmittable state. If that is undesirable, then it is because the form incorrectly designates the node as required. As for answering the implementers poll, the IBM Forms product implements the ability of a select1 control to choose an item whose value is empty. The emptiness is transmitted to the data node to which the select1 is bound. If that data node is required, then the form control reverts to a display state that indicates the user must make a choice. Cheers, John M. Boyer, Ph.D. Distinguished Engineer, IBM Forms and Smarter Web Applications IBM Canada Software Lab, Victoria 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 From: "Leigh L. Klotz, Jr." <Leigh.Klotz@Xerox.com> To: www-forms@w3.org Cc: public-forms@w3.org Date: 12/08/2010 10:17 AM Subject: Implementors please read: poll about select1 and empty values A question has come up about conformance and interoperability of XForms processors with regard to the behavior of select1 when a value is the empty string or whitespace only. This message is a poll to find out how select1 with an empty item/value element behaves in existing XForms 1.1 implementations. Based on the results of this poll we may add additional test cases, additional clarification, issue an erratum, or propose new features for XForms 1.2. Background: The XForms 1.1 Recommendation says [1] about select1 (and select as well): "For both closed and open selections, any selection item with a storage value which is empty or which contains only white space characters must remain deselected." Discussion: Nick van den Bleeken tentatively reported that least one implementation supports a select1/item/label for the empty item/value. John Boyer and I both noted that select has this implementation requirement because its space-separated values in list content are indistinguishable from empty. In short, the absence of any selected item is ithe indication that no item is selected. John further noted, however, that the requirement on select1 is motivated not only by consistency with select, but also by another point, that the "required" MIP be used to indicate that a value has been set. John noted that xsi:nil can also be used for this purpose, but is not well understood or implemented. John suggested to form designers that a "none" value for any select1 control-bound data would better be represented by a distinguished value chosen by the application, e.g. "none" or "n", rather than an empty value. I noted that only if the XForms application and the data are co-designed can the form designer can satisfy this requirement, and that web resources may require an empty string to indicate a value of "none," and that allowing a binding of a label gives form designers the ability to express this UI. As a result of this discussion, we are polling implementations and seeking feedback on the presentation and behavior of empty ref node values and empty item/value (and by extension, itemset) in select1. Test Case: I have produced a test and made it work using xsltforms. It is available at http://xformstest.org/2010/12/select1-empty and please choose select1-empty.xml We're asking implementors to adapt and run this test case and report behavior. A sample report is below: Test Case Results Example For the sample I produced, here are the results for the select1 cases with an empty item/value. (The test page also includes controls with no empty item/value). no appearance: displays as pulldown menu empty value displays as a blank item inside select1. (to spec) selecting the "(empty)" labeled item causes only that control to change. (partially to spec) after that, selecting the unlabeled item causes all form controls bound to the node to change to the "(empty)" labeled item (not to spec) selecting the "full" labeled item causes all controls to change to "full". (to spec) selecting the "full" labeled item causes the blank item to disappear from all select1 controls, however the explicit "(empty)" choice remains. selecting the "(enpty)" labeled item again causes the blank item to re-appear in all select1 controls (???) appearance=minimal: displays as pulldown menu same behavior as above appearance=compact displays as in-place visible menus with one selection allowed same behavior as above appearance="full" displays as radio buttons; no blank or unlabeled radio button empty value displays as a selected "(empty)" radio button. (NOT to spec) selecting the "(empty)" labeled item causes all form controls to change to display the unlabeled item. (to spec) selecting the "full" labeled item causes all controls to change to "full". (to spec) selecting the "full" labeled item causes the blank item to disappear from all select1 controls, however the explicit "(empty)" choice remains; selecting the "(empty)" labeled item again causes the blank item to re-appear in all select1 controls. (???) Of the above, only the full appearance (radio) had a notable behavior: it offered no way to choose the empty item, and if the empty item were chosen by another control, it displayed with no selection. Leigh. [1] http://www.w3.org/TR/xforms11/#ui-selectOne
Received on Thursday, 9 December 2010 16:41:06 UTC