W3C home > Mailing lists > Public > www-forms@w3.org > August 2006

Re: Can toggle@case or case@selected be calculated?

From: John Boyer <boyerj@ca.ibm.com>
Date: Wed, 16 Aug 2006 15:45:49 -0700
To: Erik Bruchez <ebruchez@orbeon.com>
Cc: www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OF8102E6BE.15DF88F7-ON882571CC.007C3D32-882571CC.007D1333@ca.ibm.com>
I generally like the type of approach Eric describes in which we use a 
sub-element with a value attribute, where the subelement takes the same 
name as the attribute it controls.

I like it better than ATVs because ATVs open a Pandora's box of processing 
questions, whereas the subelement/@value idea allows us to add 
functionality precisely where it's needed in a way that is easy for form 
authors to grasp and for design environments to recognize.

In this case, though, my proposal on today's telecon was to do a 
spec-ready version of the more specific solution I posted earlier to this 
list, which was to make available a subelement/@value solution for setting 
the case of a toggle action and the control of a setfocus, e.g.

<toggle>
   <case value="concat('case-', some/node)"/>
</toggle>

<setfocus>
   <control value="concat('control-', some/node)"/>
</setfocus>

Based on having received the action item to do so on today's telecon, I 
will be making that spec-ready text available to the WG shortly, but the 
solution is so easy that I would not be surprised to see implementer 
feedback even before I finish the formal spec work!  Partly because XForms 
just needs to be able to do this (whereas there's a whole Pandora's box of 
issues that this solution happily avoids).

Best regards,
John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Co-Chair, W3C XForms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer





Erik Bruchez <ebruchez@orbeon.com> 
Sent by: www-forms-request@w3.org
08/16/2006 11:34 AM

To
www-forms@w3.org
cc

Subject
Re: Can toggle@case or case@selected be calculated?







Klotz, Leigh wrote:
> Two issues come to mind:
> 1. Currently @selected it's defined as an xsd:boolean (an enumeration of 
the strings "true", "false", "1", and "0".
> Unfortunately, "true" isn't an XPath expression that evaluates to 
"true"; that would have to be "true()", so there's not the smooth upgrade 
path that it seems like there might be.

One possible direction, syntactically, would be to use a nested element, 
as we may do for xforms:submission in 1.1. E.g.:

<xforms:case>
   <xforms:selected value="instance('my-instance')/my-value = 3"/>
   ...

or something like this. Ideally I would prefer attribute value templates 
  (post-1.1)but as you point out there is a discrepancy between 'true' 
and true().

-Erik

-- 
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/
Received on Wednesday, 16 August 2006 22:46:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:06 GMT