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

RE: Reminder for send comments and issues

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Mon, 10 Apr 2006 19:09:34 +0100
To: <www-forms@w3.org>
Message-ID: <015901c65cc9$ec23d130$0e01a8c0@Jan>

Hi Leigh,

I like the @id idea.

You've also made me wonder whether actually most of the other use cases only
require access to the next context up. Thinking about it, you don't often
need to go up an arbitrary levels, you just generally need to 'get out of' a
context that has been set for some other purpose.

A typical example is the use of a group with model-based switching to
control the appearance (or not) of some controls; often the problem is that
the controls themselves operate in the context of the group's parent.

So...maybe my context() function should have an ID parameter as you suggest,
and then in addition we add another function that just gets the parent
context. It doesn't take any parameters, which hopefully addresses your
fragility concerns. :)

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

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

Download our XForms processor from
http://www.formsPlayer.com/

> -----Original Message-----
> From: Klotz, Leigh [mailto:Leigh.Klotz@xerox.com] 
> Sent: 10 April 2006 18:22
> To: Mark Birbeck; www-forms@w3.org
> Cc: Klotz, Leigh
> Subject: RE: Reminder for send comments and issues
> 
> Yes, that looks good, but does have a bit of fragility.  How 
> about an id instead?  That would also work for the repeat 
> case, and would be like the repeat-index function.
> 
>  
>   <repeat id="my-repeat" nodeset="a/b">
>     <group ref="instance('other')/test[@name = current()/@name]">
>       <group ref="context('my-repeat')">
>         <output ref="."><label ref="@name"/></output>
>       </group>
>     </group>
>   </repeat>
> 
> -----Original Message-----
> From: www-forms-request@w3.org 
> [mailto:www-forms-request@w3.org] On Behalf Of Mark Birbeck
> Sent: Saturday, April 08, 2006 12:39 PM
> To: www-forms@w3.org
> Subject: RE: Reminder for send comments and issues
> 
> 
> Allan/Leigh,
> 
> I don't recall if I ever wrote it up, but part of my proposal 
> for a @context attribute was to have a context function, and 
> it would take a parameter of the number of levels upwards you 
> wanted to go. context() would be 'the current context', which 
> would be the same as context(0), so to get the "evaluation 
> context of the parent bound node" you would do context(1).
> 
> This more general function would probably work in Leigh's 
> example, and would make his mark-up look like this:
> 
>   <repeat nodeset="a/b">
>     <group ref="instance('other')/test[@name = current()/@name]">
>       <group ref="context(1)">
>         <output ref="."><label ref="@name"/></output>
>       </group>
>     </group>
>   </repeat>
> 
> The value of context(1) would be the next evaluation context 
> up, which would be the context for the first xf:group, which 
> would be a/b[1], a/b[2], etc.
> 
> Regards,
> 
> Mark
> 
> 
> Mark Birbeck
> CEO
> x-port.net Ltd.
> 
> e: Mark.Birbeck@x-port.net
> t: +44 (0) 20 7689 9232
> b: http://internet-apps.blogspot.com/
> w: http://www.formsPlayer.com/
> 
> Download our XForms processor from
> http://www.formsPlayer.com/
> 
> > -----Original Message-----
> > From: www-forms-request@w3.org
> > [mailto:www-forms-request@w3.org] On Behalf Of Allan Beaufour
> > Sent: 07 April 2006 09:29
> > To: Klotz, Leigh
> > Cc: www-forms@w3.org
> > Subject: Re: Reminder for send comments and issues
> > 
> > 
> > On 4/7/06, Klotz, Leigh <Leigh.Klotz@xerox.com> wrote:
> > > I think there needs to be a new function, something like
> > repeat-node() or repeat-node("id").  It would be used once 
> the context
> 
> > node for the relevance has been used in the outer group, as 
> the inner 
> > group can't find its way back to the repeat item without the same 
> > function.
> > >
> > > <repeat nodeset="a/b">
> > >   <group ref="instance('other')/test[@name = current()/@name]">
> > >     <group ref="repeat-node()">
> > >       <output ref="."><label ref="@name"/></output>
> > >     </group>
> > >   </group>
> > > </repeat>
> > 
> > It's a recurring problem, yes. Maybe we should have something like 
> > that. I have no idea whether it has been discussed, and possibly 
> > dropped before?
> > 
> > --
> > ... Allan
> > 
> > 
> 
> 
> 
> 
Received on Monday, 10 April 2006 18:11:22 GMT

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