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

Is switch legal inside a repeat?

From: T. V. Raman <raman@users.sf.net>
Date: Sat, 2 Jun 2007 14:57:23 -0700
Message-ID: <18017.59331.261944.350346@gargle.gargle.HOWL>
To: cmsmcq@acm.org
Cc: www-forms@w3.org

Switch was an exception in 1.0 because some implementors were
worried about the fact that doing the following:

<repat><switch> <case id="xx">...
would result in:

The repeat containing multiple instances of the same switch, and
therefore falling foul of XML's ids are unique rule. In practice
this turns out not to be an issue.

>>>>> "C" == C M Sperberg-McQueen <cmsmcq@acm.org> writes:
    C> In T. V. Raman's book, he says on pp. 104-105 that repeat
    C> "can use all of the XForms user interface vocabulary* in
    C> addition to markup defined by the host language", and adds
    C> in a footnote "An exception to this is construct
    C> <switch>".
    C> I'm a bit confused here, and I wonder if anyone on this
    C> list can enlighten me.
    C> The 1.0 spec does not list 'switch' among the possible
    C> children of 'repeat'-- but it does list 'group', and
    C> 'group' may have 'switch' as a child.  Does Raman mean
    C> only that 'switch' must not be a child of 'repeat'? Or is
    C> there something in the spec that says that groups inside
    C> of repeats should not have switches?  (And if so, why?)
    C> In some recent experiments, I used <switch> inside
    C> <repeat> to good effect, and it seemed to work fine with
    C> Firefox and the Mozilla XForms add-on
    C> (It doesn't seem to work with Firefox, and I'm
    C> trying to figure out whether the Firefox updates simply
    C> broke the add-on, or whether I'm now being punished for
    C> using switch inside repeat.  Since other parts of XForms
    C> seem also not to work for me now, I'm guessing the former.
    C> But since I'm still teaching myself XForms, and can't
    C> always tell correct XForms usage from incorrect usage,
    C> it's hard to be sure -- hence this question.)
    C> I'll be grateful for any light anyone can shed on this
    C> question.  Thanks!
    C> --Michael Sperberg-McQueen W3C

Best Regards,

Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs
Received on Saturday, 2 June 2007 21:57:46 UTC

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