Is there a current() function in XForms?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a current() function in XForms?

Mark Gibson-8
Hello,
I've searched all over for this, and found nothing
so I'd thought I'd ask here.
Is there any equivalent of the XSLT current()
function in XForms for use in a repeat structure?

Example of what I'm trying to do in XForms,
using current() as if it were in XSLT:

<xforms:instance id="main">
   <instance>
     <something ref="1"/>
   </instance>
</xforms:instance>

<xforms:instance id="lookup">
   <instance>
     <anotherthing id="1">One</anotherthing>
   </instance>
</xforms:instance>

<xforms:repeat nodeset="instance('main')/something">
   <xforms:group ref="instance('lookup')/anotherthing[@id=current()/@ref]">
     <xforms:output ref="."/>
   </xforms:group>
</xforms>

or does anyone knows how I can lookup stuff from within a
repeat structure?

Cheers
- Mark Gibson



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Is there a current() function in XForms?

Mark Gibson-8
Mark Gibson wrote:
> Hello,
> I've searched all over for this, and found nothing
> so I'd thought I'd ask here.
> Is there any equivalent of the XSLT current()
> function in XForms for use in a repeat structure?

Oh bugger, I've done it again, RTFM, just found:
xxforms:repeat-current()

How I overlooked this I don't know!!!
Sorry.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Is there a current() function in XForms?

Erik Bruchez
Administrator
Mark,

Yes, you found the right function ;-)

As mentioned earlier, the current XForms 1.1 proposes a current()
function that has nothing to do with xforms:repeat, but that returns the
XPath context of the XPath expression. Once this is implemented, you
won't need to use xxforms:repeat-current() in your use-case.

We have a bug entry to track this new feature:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305017&group_id=168&atid=350207

-Erik

Mark Gibson wrote:

> Mark Gibson wrote:
>> Hello,
>> I've searched all over for this, and found nothing
>> so I'd thought I'd ask here.
>> Is there any equivalent of the XSLT current()
>> function in XForms for use in a repeat structure?
>
> Oh bugger, I've done it again, RTFM, just found:
> xxforms:repeat-current()
>
> How I overlooked this I don't know!!!
> Sorry.
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws