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


From: Mark Seaborne <m_seaborne@mac.com>
Date: Mon, 29 May 2006 18:58:55 +0100
Message-Id: <9CC45A3C-DC08-4D03-BC98-96DA26708F20@mac.com>
To: www-forms <www-forms@w3.org>


I'm sure this must have been discussed before (I did look but  
couldn't see anything obvious), but here I go anyway.

I have got a switch/case construct:

	<case id="a"/>
	<case id="b"/>
	<case id="c"/>

, and all I want to do is let the user move along the sequence of  
cases in document order, a, b, c, or c, b, a. No exceptions.

So, I would really like just a single toggle action that navigates up  
the cases (a, b, c) and another that navigates down the way. Then I  
would only need two triggers to navigate through the  switch.

However, XForms 1.0 says that the case attribute on toggle is just "a  
reference to a case element", so I end up with loads of triggers.

If I have missed something obvious, and this is already possible,  
then please someone tell me. If not, has anyone implemented anything  
that makes this easy (or even possible), like allowing @case to take  
an XPath that evaluates to the name of a case, for example?

I can see that it would be possible to achieve the effect I want in  
XForms 1.1 (thanks for the hint Nick), but even there it is far from  
elegant. It seems such an obvious, simple thing to want to achieve  
that it should be made as easy as something like:

	<xforms:next switch="mySwitch" ev:event="DOMActivate"/>

	<xforms:previous switch="mySwitch" ev:event="DOMActivate"/>

and let the XForms processor worry about remembering which case is  
current, and is it the first or last one. It must be easier than  
managing repeat.

And another thing, why should I have to write out  
ev:event="DOMActivate" everytime I use a trigger? Isn't it obvious?

All the best

Received on Monday, 29 May 2006 17:59:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:17 UTC