Is switch legal inside a repeat?

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> 
    C> I'm a bit confused here, and I wonder if anyone on this
    C> list can enlighten me.
    C> 
    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> 
    C> In some recent experiments, I used <switch> inside
    C> <repeat> to good effect, and it seemed to work fine with
    C> Firefox 2.0.0.3 and the Mozilla XForms add-on 0.7.0.1.
    C> (It doesn't seem to work with Firefox 2.0.0.4, 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> 
    C> I'll be grateful for any light anyone can shed on this
    C> question.  Thanks!
    C> 
    C> --Michael Sperberg-McQueen W3C
    C> 

-- 
Best Regards,
--raman

      
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