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

RE: Reminder for send comments and issues

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Mon, 10 Apr 2006 11:18:55 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF401B2C23A@usa7061ms01.na.xerox.net>
To: "Mark Birbeck" <mark.birbeck@x-port.net>, <www-forms@w3.org>
Cc: "Klotz, Leigh" <Leigh.Klotz@xerox.com>

Mark,
If we get the @id version I can take or leave the implied-parent
version.  Here's my reasoning:

- repeat-item is what I initially wanted
- but clearly it needs an @id just like repeat-index
- so then it needn't be limited to repeats because the id specifies
where it comes from
- but then without an argument it's not clear what it refers to anymore,
since it's not a repeat

So on the balance I'd say we don't need a no-arg version, just because
the defaulting rules would be confusing.
But if you or someone else says it's useful and clear, that's fine with
me too.

Leigh.

-----Original Message-----
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of Mark Birbeck
Sent: Monday, April 10, 2006 11:10 AM
To: www-forms@w3.org
Subject: RE: Reminder for send comments and issues


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:20:20 GMT

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