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 17:23:14 UTC