W3C home > Mailing lists > Public > www-html@w3.org > June 2005

RE: [XHTML2] exclude switch and case as presentational

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Mon, 13 Jun 2005 11:32:56 +0100
Message-ID: <E4C70A08-0AB7-40C0-897A-CFA00CF5A13C@S009>
To: "'Laurens Holst'" <lholst@students.cs.uu.nl>
Cc: <www-html-editor@w3.org>, <www-html@w3.org>, "'David Woolley'" <david@djwhome.demon.co.uk>

Laurens,

Laurens Holst wrote:
> 
> David Woolley wrote:
> 
> >The XHTML2 Forms module includes switch and case elements, but it is 
> >pretty clear from the XFORMS 1 specfication that these are 
> >presentational/ hehavioural elements and therefore shouldn't 
> be in a structural language.
> >
> >The give away that they are presentational is the statement 
> that they 
> >are there to control whether or not parts of the document 
> are *rendered*.
> >  
> >
> What else do you expect when you want to create something 
> with specific behavioral and visual representation (such as 
> the request for tab boxes)?
> 
> The alternative is to just script it using Javascript. Not 
> that difficult, and perfect separation of content, behaviour 
> and style.

Not quite. David is correct that switch/case are a little out on a limb in
terms of XForms partly because they rely on events (behavioural), and partly
because they are presentational. I wouldn't argue to get rid of them, since
they can be useful, particularly when moved out of the document and into
XBL.

But in our own XForms work we will nearly always use xf:group with the
enabled and disabled MIPs, so that the instance data drives the form. This
is much more declarative, and if you have a situation where you must save
the state of the form at a certain point then it is the *only* way to do
things, since switch/case have no state information.

One way to look at switch/case is in the same way you might look at a
drop-box; whether the user has the drop-box open or closed at any point does
not affect the *logic* of the form. The same goes for scroll position,
whether the window is minimised or maximised, and so on. Whether this kind
of 'user-controlled state' is useful to your form or not will be very
specific.

This is explained further on the XForms Wiki:

  <http://www.xforms-wiki.com/bin/view/Main/TechniqueStateDrivenForms>

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/
Received on Monday, 13 June 2005 10:33:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:19:03 UTC