W3C home > Mailing lists > Public > www-forms@w3.org > June 2007

Is switch legal inside a repeat?

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Fri, 1 Jun 2007 13:32:44 -0600
Message-Id: <52848D90-6FC8-45AA-962B-5B1E65DE27A1@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>
To: www-forms@w3.org

In T. V. Raman's book, he says on pp. 104-105 that repeat "can use
all of the XForms user interface vocabulary* in addition to markup
defined by the host language", and adds in a footnote "An
exception to this is construct <switch>".

I'm a bit confused here, and I wonder if anyone on this list can
enlighten me.

The 1.0 spec does not list 'switch' among the possible children
of 'repeat'-- but it does list 'group', and 'group' may have
'switch' as a child.  Does Raman mean only that 'switch' must not
be a child of 'repeat'? Or is there something in the spec that says
that groups inside of repeats should not have switches?  (And
if so, why?)

In some recent experiments, I used <switch> inside <repeat> to
good effect, and it seemed to work fine with Firefox 2.0.0.3
and the Mozilla XForms add-on 0.7.0.1.  (It doesn't seem to work
with Firefox 2.0.0.4, and I'm trying to figure out whether
the Firefox updates simply broke the add-on, or whether I'm
now being punished for using switch inside repeat.  Since other
parts of XForms seem also not to work for me now, I'm guessing
the former.  But since I'm still teaching myself XForms, and
can't always tell correct XForms usage from incorrect usage,
it's hard to be sure -- hence this question.)

I'll be grateful for any light anyone can shed on this question.
Thanks!

--Michael Sperberg-McQueen
   W3C
Received on Friday, 1 June 2007 19:32:50 GMT

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