Referenced items in an xform repeat

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

Referenced items in an xform repeat

Shaw, Richard A
Referenced items in an xform repeat

Can somebody help we with the syntax of my xpath for selection items from a reference section. As you will see below I can do it in xsl using a variable but I can't find a way to do it with xforms:output because I can' see how to set a variable for xforms.

I have some XML that looks like the following
<root>
        <journey><legs><stop><id>1</…
        <references><stops><stop id='1'><name>Stop 1</…

When I display the legs of the journey I need to get the name of the stop from the references section (we have this because the same stop can be repeated many times in the journeys.

I have tried the following syntax -

<xforms:output value="../../references/stops/stop[@id=stop/id]/name"/>

But I get nothing displayed.

If I change the expression and hard code the stop id then it works (as below) -

<xforms:output value="../../references/stops/stop[@id='1']/name"/>

If I change to xsl instead of xforms:output I get the same effect. I can fix the xsl version by using a variable as -

<xsl:value-of select="../../references/stops/stop[@id=$stopID]/name"/>

But I want to use xforms:output because I have a table of journey summaries and I show the detail of the selected one, and I am assuming that I have to refresh my whole page when a new table row is selected if xsl is used to render the details.

I've attached my view and submission.
<<test-journey.xml>> <<test-journey.xhtml>>
Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Atkins Transport Systems
Woodcote Grove
Ashley Road
Epsom
KT18 5BW

Direct Dial.: +44 (0) 1372 756407
Switchboard:  +44 (0) 1372 726140
Fax:          +44 (0) 1372 740055
www.atkinsglobal.com/transportsystems





This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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

test-journey.xml (3K) Download Attachment
test-journey.xhtml (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Referenced items in an xform repeat

Erik Bruchez
Administrator
Shaw, Richard A wrote:
 > Can somebody help we with the syntax of my xpath for selection items
 > from a reference section. As you will see below I can do it in xsl using
 > a variable but I can't find a way to do it with xforms:output because I
 > can' see how to set a variable for xforms.

That's right, there are no variables in XForms. I agree that this
would be a very welcome addition though, in particular to make it easy
to declare the context of a node.

 > <xforms:output value="../../references/stops/stop[@id=stop/id]/name"/>

There is a problem in the above: the context for stop/id is
stops/stop. This means that this is looking for /stops/stop/stop/id,
and since you don't have such nested stop elements, the expression
won't return anything.

Let's take this step by step, using your attached source code (which
differs slightly from the example above):

o Using this as a basis:

   <xforms:output
     value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>

o The context within your xforms:repeat is a "leg" element.

o As you write correctly in your code, ../../../../Stops/Stop gets you
   a node-set (sequence in XPath 2.0) of all the "Stop" elements.

o Within the repeat context, "Board/StopRef" correctly points to an
   existing StopRef element. However, within the brackets in Stop[...],
   the context is changed to the "Stop" element. This makes "@Ref"
   correctly point to an attribute, but in that context,
   "Board/StopRef" does not point to what you expect.

o XForms 1.1 proposes a new current() function which will allow you to
   do exactly this by writing:

   <xforms:output
     value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>

o However OPS does not yet support this function. But it supports an
   extension function called xxforms:repeat-current() which will do the
   same:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions

   So try this:

   <xforms:output
 
value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopRef]/Name"/>

Let us know how this works out.

-Erik




--
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: Referenced items in an xform repeat

Shaw, Richard A
In reply to this post by Shaw, Richard A
Thanks for this but it doesn't seem to work.

I have the following namespace set -

      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"

I have changed my output to -

        <xforms:output value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:repeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>

And I get the following error -

XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}: Cannot find a matching 0-argument function named {http://orbeon.org/oxf/xml/xforms}repeat-current()

I'm using OPS 3.0.1

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Atkins Transport Systems
Woodcote Grove
Ashley Road
Epsom
KT18 5BW

Direct Dial.: +44 (0) 1372 756407
Switchboard:  +44 (0) 1372 726140
Fax:          +44 (0) 1372 740055
www.atkinsglobal.com/transportsystems



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 21 April 2006 18:49
To: [hidden email]
Subject: Re: [ops-users] Referenced items in an xform repeat

Shaw, Richard A wrote:
 > Can somebody help we with the syntax of my xpath for selection items  > from a reference section. As you will see below I can do it in xsl using  > a variable but I can't find a way to do it with xforms:output because I  > can' see how to set a variable for xforms.

That's right, there are no variables in XForms. I agree that this would be a very welcome addition though, in particular to make it easy to declare the context of a node.

 > <xforms:output value="../../references/stops/stop[@id=stop/id]/name"/>

There is a problem in the above: the context for stop/id is stops/stop. This means that this is looking for /stops/stop/stop/id, and since you don't have such nested stop elements, the expression won't return anything.

Let's take this step by step, using your attached source code (which differs slightly from the example above):

o Using this as a basis:

   <xforms:output
     value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>

o The context within your xforms:repeat is a "leg" element.

o As you write correctly in your code, ../../../../Stops/Stop gets you
   a node-set (sequence in XPath 2.0) of all the "Stop" elements.

o Within the repeat context, "Board/StopRef" correctly points to an
   existing StopRef element. However, within the brackets in Stop[...],
   the context is changed to the "Stop" element. This makes "@Ref"
   correctly point to an attribute, but in that context,
   "Board/StopRef" does not point to what you expect.

o XForms 1.1 proposes a new current() function which will allow you to
   do exactly this by writing:

   <xforms:output
     value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>

o However OPS does not yet support this function. But it supports an
   extension function called xxforms:repeat-current() which will do the
   same:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions

   So try this:

   <xforms:output
 
value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopRef]/Name"/>

Let us know how this works out.

-Erik




This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?4318150)


This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: Referenced items in an xform repeat

Erik Bruchez
Administrator
Richard,

That's right, this function has been implemented post 3.0.1. Can you try
  a nightly build? Otherwise you may have to wait for 3.0.2 or 3.1,
which should come reasonably soon. If not, there may be some
workarounds, but they may not be pretty.

-Erik

Shaw, Richard A wrote:

> Thanks for this but it doesn't seem to work.
>
> I have the following namespace set -
>
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>
> I have changed my output to -
>
> <xforms:output value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:repeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>
>
> And I get the following error -
>
> XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}: Cannot find a matching 0-argument function named {http://orbeon.org/oxf/xml/xforms}repeat-current()
>
> I'm using OPS 3.0.1
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Atkins Transport Systems
> Woodcote Grove
> Ashley Road
> Epsom
> KT18 5BW
>
> Direct Dial.: +44 (0) 1372 756407
> Switchboard:  +44 (0) 1372 726140
> Fax:          +44 (0) 1372 740055
> www.atkinsglobal.com/transportsystems
>
>
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 21 April 2006 18:49
> To: [hidden email]
> Subject: Re: [ops-users] Referenced items in an xform repeat
>
> Shaw, Richard A wrote:
>  > Can somebody help we with the syntax of my xpath for selection items  > from a reference section. As you will see below I can do it in xsl using  > a variable but I can't find a way to do it with xforms:output because I  > can' see how to set a variable for xforms.
>
> That's right, there are no variables in XForms. I agree that this would be a very welcome addition though, in particular to make it easy to declare the context of a node.
>
>  > <xforms:output value="../../references/stops/stop[@id=stop/id]/name"/>
>
> There is a problem in the above: the context for stop/id is stops/stop. This means that this is looking for /stops/stop/stop/id, and since you don't have such nested stop elements, the expression won't return anything.
>
> Let's take this step by step, using your attached source code (which differs slightly from the example above):
>
> o Using this as a basis:
>
>    <xforms:output
>      value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>
>
> o The context within your xforms:repeat is a "leg" element.
>
> o As you write correctly in your code, ../../../../Stops/Stop gets you
>    a node-set (sequence in XPath 2.0) of all the "Stop" elements.
>
> o Within the repeat context, "Board/StopRef" correctly points to an
>    existing StopRef element. However, within the brackets in Stop[...],
>    the context is changed to the "Stop" element. This makes "@Ref"
>    correctly point to an attribute, but in that context,
>    "Board/StopRef" does not point to what you expect.
>
> o XForms 1.1 proposes a new current() function which will allow you to
>    do exactly this by writing:
>
>    <xforms:output
>      value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>
>
> o However OPS does not yet support this function. But it supports an
>    extension function called xxforms:repeat-current() which will do the
>    same:
>
>    http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions
>
>    So try this:
>
>    <xforms:output
>  
> value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopRef]/Name"/>
>
> Let us know how this works out.
>
> -Erik
>
>
>
>
> This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?4318150)
>
>
> This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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

--
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
Reply | Threaded
Open this post in threaded view
|

RE: Referenced items in an xform repeat

Shaw, Richard A
In reply to this post by Shaw, Richard A
Has the nightly build changes the way in which the pages are found ?

I've rebuild ops.war from the nightly build and added my old version of the resources directory. And all I get is a an ops page not available message.

So I took the classes and lib directory from the nightly build and replaces the ones my 3.0.1 install and my page now displays, however the calendar now gives the following error "stack overflow at line: 1797" in a pop-up alert box.

I havn't got as far as testing repeat-current() yet.



Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Atkins Transport Systems
Woodcote Grove
Ashley Road
Epsom
KT18 5BW

Direct Dial.: +44 (0) 1372 756407
Switchboard:  +44 (0) 1372 726140
Fax:          +44 (0) 1372 740055
www.atkinsglobal.com/transportsystems



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 24 April 2006 18:33
To: [hidden email]
Subject: Re: [ops-users] Referenced items in an xform repeat

Richard,

That's right, this function has been implemented post 3.0.1. Can you try
  a nightly build? Otherwise you may have to wait for 3.0.2 or 3.1, which should come reasonably soon. If not, there may be some workarounds, but they may not be pretty.

-Erik

Shaw, Richard A wrote:

> Thanks for this but it doesn't seem to work.
>
> I have the following namespace set -
>
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>
> I have changed my output to -
>
> <xforms:output
> value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:r
> epeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>
>
> And I get the following error -
>
> XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}:
> Cannot find a matching 0-argument function named
> {http://orbeon.org/oxf/xml/xforms}repeat-current()
>
> I'm using OPS 3.0.1
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Atkins Transport Systems
> Woodcote Grove
> Ashley Road
> Epsom
> KT18 5BW
>
> Direct Dial.: +44 (0) 1372 756407
> Switchboard:  +44 (0) 1372 726140
> Fax:          +44 (0) 1372 740055
> www.atkinsglobal.com/transportsystems
>
>
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
> Bruchez
> Sent: 21 April 2006 18:49
> To: [hidden email]
> Subject: Re: [ops-users] Referenced items in an xform repeat
>
> Shaw, Richard A wrote:
>  > Can somebody help we with the syntax of my xpath for selection items  > from a reference section. As you will see below I can do it in xsl using  > a variable but I can't find a way to do it with xforms:output because I  > can' see how to set a variable for xforms.
>
> That's right, there are no variables in XForms. I agree that this would be a very welcome addition though, in particular to make it easy to declare the context of a node.
>
>  > <xforms:output
> value="../../references/stops/stop[@id=stop/id]/name"/>
>
> There is a problem in the above: the context for stop/id is stops/stop. This means that this is looking for /stops/stop/stop/id, and since you don't have such nested stop elements, the expression won't return anything.
>
> Let's take this step by step, using your attached source code (which differs slightly from the example above):
>
> o Using this as a basis:
>
>    <xforms:output
>      value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>
>
> o The context within your xforms:repeat is a "leg" element.
>
> o As you write correctly in your code, ../../../../Stops/Stop gets you
>    a node-set (sequence in XPath 2.0) of all the "Stop" elements.
>
> o Within the repeat context, "Board/StopRef" correctly points to an
>    existing StopRef element. However, within the brackets in Stop[...],
>    the context is changed to the "Stop" element. This makes "@Ref"
>    correctly point to an attribute, but in that context,
>    "Board/StopRef" does not point to what you expect.
>
> o XForms 1.1 proposes a new current() function which will allow you to
>    do exactly this by writing:
>
>    <xforms:output
>      
> value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>
>
> o However OPS does not yet support this function. But it supports an
>    extension function called xxforms:repeat-current() which will do the
>    same:
>
>    http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions
>
>    So try this:
>
>    <xforms:output
>  
> value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopR
> ef]/Name"/>
>
> Let us know how this works out.
>
> -Erik
>
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?4318150)
>
>
> This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.
>
>
>
> ----------------------------------------------------------------------
> --
>
>
> --
> 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

--
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
Reply | Threaded
Open this post in threaded view
|

RE: Referenced items in an xform repeat

Ryan Puddephatt
Richard,
        You have to be careful when replacing things as the ops, context and
config folders within the resources directory contain things related to the
the way it works.

I normally use an merge program to see what has changed so I can replace the
OPS stuff as I don't want to replace properties.xml, theme.xsl etc.

Hope this helps

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Shaw, Richard A [mailto:[hidden email]]
>Sent: 25 April 2006 16:39
>To: [hidden email]
>Subject: RE: [ops-users] Referenced items in an xform repeat
>
>Has the nightly build changes the way in which the pages are found ?
>
>I've rebuild ops.war from the nightly build and added my old version of the
>resources directory. And all I get is a an ops page not available message.
>
>So I took the classes and lib directory from the nightly build and replaces
>the ones my 3.0.1 install and my page now displays, however the calendar
>now gives the following error "stack overflow at line: 1797" in a pop-up
>alert box.
>
>I havn't got as far as testing repeat-current() yet.
>
>
>
>Richard Shaw
>
>¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
>Atkins Transport Systems
>Woodcote Grove
>Ashley Road
>Epsom
>KT18 5BW
>
>Direct Dial.: +44 (0) 1372 756407
>Switchboard:  +44 (0) 1372 726140
>Fax:          +44 (0) 1372 740055
>www.atkinsglobal.com/transportsystems
>
>
>
>-----Original Message-----
>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
>Sent: 24 April 2006 18:33
>To: [hidden email]
>Subject: Re: [ops-users] Referenced items in an xform repeat
>
>Richard,
>
>That's right, this function has been implemented post 3.0.1. Can you try
>  a nightly build? Otherwise you may have to wait for 3.0.2 or 3.1, which
>should come reasonably soon. If not, there may be some workarounds, but
>they may not be pretty.
>
>-Erik
>
>Shaw, Richard A wrote:
>> Thanks for this but it doesn't seem to work.
>>
>> I have the following namespace set -
>>
>>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>
>> I have changed my output to -
>>
>> <xforms:output
>> value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:r
>> epeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>
>>
>> And I get the following error -
>>
>> XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}:
>> Cannot find a matching 0-argument function named
>> {http://orbeon.org/oxf/xml/xforms}repeat-current()
>>
>> I'm using OPS 3.0.1
>>
>> Richard Shaw
>>
>> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>>
>> Atkins Transport Systems
>> Woodcote Grove
>> Ashley Road
>> Epsom
>> KT18 5BW
>>
>> Direct Dial.: +44 (0) 1372 756407
>> Switchboard:  +44 (0) 1372 726140
>> Fax:          +44 (0) 1372 740055
>> www.atkinsglobal.com/transportsystems
>>
>>
>>
>> -----Original Message-----
>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>> Bruchez
>> Sent: 21 April 2006 18:49
>> To: [hidden email]
>> Subject: Re: [ops-users] Referenced items in an xform repeat
>>
>> Shaw, Richard A wrote:
>>  > Can somebody help we with the syntax of my xpath for selection items
>> from a reference section. As you will see below I can do it in xsl using
>> a variable but I can't find a way to do it with xforms:output because I
>> can' see how to set a variable for xforms.
>>
>> That's right, there are no variables in XForms. I agree that this would
>be a very welcome addition though, in particular to make it easy to declare
>the context of a node.
>>
>>  > <xforms:output
>> value="../../references/stops/stop[@id=stop/id]/name"/>
>>
>> There is a problem in the above: the context for stop/id is stops/stop.
>This means that this is looking for /stops/stop/stop/id, and since you
>don't have such nested stop elements, the expression won't return anything.
>>
>> Let's take this step by step, using your attached source code (which
>differs slightly from the example above):
>>
>> o Using this as a basis:
>>
>>    <xforms:output
>>      value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>
>>
>> o The context within your xforms:repeat is a "leg" element.
>>
>> o As you write correctly in your code, ../../../../Stops/Stop gets you
>>    a node-set (sequence in XPath 2.0) of all the "Stop" elements.
>>
>> o Within the repeat context, "Board/StopRef" correctly points to an
>>    existing StopRef element. However, within the brackets in Stop[...],
>>    the context is changed to the "Stop" element. This makes "@Ref"
>>    correctly point to an attribute, but in that context,
>>    "Board/StopRef" does not point to what you expect.
>>
>> o XForms 1.1 proposes a new current() function which will allow you to
>>    do exactly this by writing:
>>
>>    <xforms:output
>>
>> value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>
>>
>> o However OPS does not yet support this function. But it supports an
>>    extension function called xxforms:repeat-current() which will do the
>>    same:
>>
>>    http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions
>>
>>    So try this:
>>
>>    <xforms:output
>>
>> value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopR
>> ef]/Name"/>
>>
>> Let us know how this works out.
>>
>> -Erik
>>
>>
>>
>>
>> This message has been scanned for viruses by MailControl - (see
>> http://bluepages.wsatkins.co.uk/?4318150)
>>
>>
>> This email and any attached files are confidential and copyright
>protected. If you are not the addressee, any dissemination of this
>communication is strictly prohibited. Unless otherwise expressly agreed in
>writing, nothing stated in this communication shall be legally binding.
>>
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>>
>> --
>> 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
>
>
>--
>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
Reply | Threaded
Open this post in threaded view
|

RE: Referenced items in an xform repeat

Shaw, Richard A
In reply to this post by Shaw, Richard A
I have ignored the calendar error mentioned in my last post and tried the repeat-current() and it gives the following error message -

org.orbeon.oxf.common.OXFException: Enclosing xforms:repeat not found.
        at org.orbeon.oxf.xforms.XFormsControls.getRepeatCurrentSingleNode(XFormsControls.java:513)
        at org.orbeon.oxf.xforms.function.xxforms.XXFormsRepeatCurrent.evaluateItem(XXFormsRepeatCurrent.java:53)
        at org.orbeon.saxon.expr.ComputedExpression.iterate(ComputedExpression.java:408)
        at org.orbeon.saxon.expr.PathExpression.iterate(PathExpression.java:624)
        at org.orbeon.saxon.expr.PathExpression.iterate(PathExpression.java:624)
        at org.orbeon.saxon.value.Closure.iterate(Closure.java:207)
        at org.orbeon.saxon.expr.VariableReference.iterate(VariableReference.java:170)
        at org.orbeon.saxon.expr.Atomizer.iterate(Atomizer.java:70)
        at org.orbeon.saxon.expr.GeneralComparison.effectiveBooleanValue(GeneralComparison.java:295)
        at org.orbeon.saxon.expr.FilterIterator$NonNumeric.matches(FilterIterator.java:138)
        at org.orbeon.saxon.expr.FilterIterator.getNextMatchingItem(FilterIterator.java:68)
        at org.orbeon.saxon.expr.FilterIterator.next(FilterIterator.java:49)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:61)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:61)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.MappingIterator.next(MappingIterator.java:79)
        at org.orbeon.saxon.expr.ComputedExpression.evaluateItem(ComputedExpression.java:361)
        at org.orbeon.saxon.expr.LetExpression.evaluateItem(LetExpression.java:86)
        at org.orbeon.saxon.functions.StringFn.evaluateItem(StringFn.java:47)
        at org.orbeon.saxon.expr.ComputedExpression.iterate(ComputedExpression.java:408)
        at org.orbeon.saxon.xpath.XPathExpression.evaluateSingle(XPathExpression.java:125)
        at org.orbeon.oxf.util.PooledXPathExpression.evaluateSingle(PooledXPathExpression.java:129)
        at org.orbeon.oxf.xforms.DocumentXPathEvaluator.evaluateAsString(DocumentXPathEvaluator.java:143)
        at org.orbeon.oxf.xforms.XFormsInstance.evaluateXPathAsString(XFormsInstance.java:187)
        at org.orbeon.oxf.xforms.controls.OutputControlInfo.evaluateValue(OutputControlInfo.java:58)
        at org.orbeon.oxf.xforms.XFormsControls$ControlsState.evaluateValueControls(XFormsControls.java:1333)
        at org.orbeon.oxf.xforms.XFormsControls.initialize(XFormsControls.java:216)
        at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchExternalEvent(XFormsContainingDocument.java:483)
        at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchExternalEvent(XFormsContainingDocument.java:456)
        at org.orbeon.oxf.xforms.processor.XFormsServer.createXFormsContainingDocument(XFormsServer.java:1047)
        at org.orbeon.oxf.xforms.processor.XFormsToXHTML.doIt(XFormsToXHTML.java:79)
        at org.orbeon.oxf.xforms.processor.XFormsToXHTML.access$000(XFormsToXHTML.java:41)
        at org.orbeon.oxf.xforms.processor.XFormsToXHTML$1.readImpl(XFormsToXHTML.java:61)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:96)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$100(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:94)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:122)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:96)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$100(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:94)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:122)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:96)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$100(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:94)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1500(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$InternalTopOutput$1.run(PipelineProcessor.java:572)
        at org.orbeon.oxf.processor.ProcessorImpl.executeParents(ProcessorImpl.java:533)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1600(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$InternalTopOutput.readImpl(PipelineProcessor.java:568)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1500(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$InternalTopOutput$1.run(PipelineProcessor.java:572)
        at org.orbeon.oxf.processor.ProcessorImpl.executeParents(ProcessorImpl.java:533)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$1600(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$InternalTopOutput.readImpl(PipelineProcessor.java:568)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor.access$100(TeeProcessor.java:36)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.readImpl(TeeProcessor.java:57)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:404)
        at org.orbeon.oxf.processor.ProcessorImpl$4.read(ProcessorImpl.java:428)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:470)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:232)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:232)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControllerProcessor.java:416)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.getInput(PipelineProcessor.java:140)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:89)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.readImpl(ConcreteChooseProcessor.java:122)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:354)
        at org.orbeon.oxf.processor.IdentityProcessor$1.readImpl(IdentityProcessor.java:33)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$000(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$1.run(PipelineProcessor.java:96)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$100(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.readImpl(PipelineProcessor.java:94)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.read(ProcessorImpl.java:987)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1170)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:349)
        at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:354)
        at org.orbeon.oxf.processor.NullSerializer.start(NullSerializer.java:31)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.getInput(PipelineProcessor.java:140)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.getKeyImpl(PipelineProcessor.java:109)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyImpl(ConcreteChooseProcessor.java:132)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191)
        at org.orbeon.oxf.processor.IdentityProcessor$1.getKeyImpl(IdentityProcessor.java:37)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$400(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1$2.run(PipelineProcessor.java:113)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.access$500(PipelineProcessor.java:66)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$1.getKeyImpl(PipelineProcessor.java:111)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor$1.getKeyImpl(ConcreteChooseProcessor.java:132)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.pipeline.TeeProcessor$1.getKeyImpl(TeeProcessor.java:79)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl$1.getKey(ProcessorImpl.java:991)
        at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.getKey(ProcessorImpl.java:1181)
        at org.orbeon.oxf.processor.ProcessorImpl.getInputKey(ProcessorImpl.java:1191)
        at org.orbeon.oxf.processor.ProcessorImpl.getInputKeyValidity(ProcessorImpl.java:1222)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:456)
        at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsDOM4J(ProcessorImpl.java:426)
        at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:185)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor$5.run(PipelineProcessor.java:652)
        at org.orbeon.oxf.processor.ProcessorImpl.executeChildren(ProcessorImpl.java:515)
        at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:649)
        at org.orbeon.oxf.processor.PageFlowControllerProcessor.start(PageFlowControllerProcessor.java:416)
        at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:87)
        at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:95)
        at org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:74)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Atkins Transport Systems
Woodcote Grove
Ashley Road
Epsom
KT18 5BW

Direct Dial.: +44 (0) 1372 756407
Switchboard:  +44 (0) 1372 726140
Fax:          +44 (0) 1372 740055
www.atkinsglobal.com/transportsystems



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 24 April 2006 18:33
To: [hidden email]
Subject: Re: [ops-users] Referenced items in an xform repeat

Richard,

That's right, this function has been implemented post 3.0.1. Can you try
  a nightly build? Otherwise you may have to wait for 3.0.2 or 3.1, which should come reasonably soon. If not, there may be some workarounds, but they may not be pretty.

-Erik

Shaw, Richard A wrote:

> Thanks for this but it doesn't seem to work.
>
> I have the following namespace set -
>
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>
> I have changed my output to -
>
> <xforms:output
> value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:r
> epeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>
>
> And I get the following error -
>
> XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}:
> Cannot find a matching 0-argument function named
> {http://orbeon.org/oxf/xml/xforms}repeat-current()
>
> I'm using OPS 3.0.1
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Atkins Transport Systems
> Woodcote Grove
> Ashley Road
> Epsom
> KT18 5BW
>
> Direct Dial.: +44 (0) 1372 756407
> Switchboard:  +44 (0) 1372 726140
> Fax:          +44 (0) 1372 740055
> www.atkinsglobal.com/transportsystems
>
>
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
> Bruchez
> Sent: 21 April 2006 18:49
> To: [hidden email]
> Subject: Re: [ops-users] Referenced items in an xform repeat
>
> Shaw, Richard A wrote:
>  > Can somebody help we with the syntax of my xpath for selection items  > from a reference section. As you will see below I can do it in xsl using  > a variable but I can't find a way to do it with xforms:output because I  > can' see how to set a variable for xforms.
>
> That's right, there are no variables in XForms. I agree that this would be a very welcome addition though, in particular to make it easy to declare the context of a node.
>
>  > <xforms:output
> value="../../references/stops/stop[@id=stop/id]/name"/>
>
> There is a problem in the above: the context for stop/id is stops/stop. This means that this is looking for /stops/stop/stop/id, and since you don't have such nested stop elements, the expression won't return anything.
>
> Let's take this step by step, using your attached source code (which differs slightly from the example above):
>
> o Using this as a basis:
>
>    <xforms:output
>      value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>
>
> o The context within your xforms:repeat is a "leg" element.
>
> o As you write correctly in your code, ../../../../Stops/Stop gets you
>    a node-set (sequence in XPath 2.0) of all the "Stop" elements.
>
> o Within the repeat context, "Board/StopRef" correctly points to an
>    existing StopRef element. However, within the brackets in Stop[...],
>    the context is changed to the "Stop" element. This makes "@Ref"
>    correctly point to an attribute, but in that context,
>    "Board/StopRef" does not point to what you expect.
>
> o XForms 1.1 proposes a new current() function which will allow you to
>    do exactly this by writing:
>
>    <xforms:output
>      
> value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>
>
> o However OPS does not yet support this function. But it supports an
>    extension function called xxforms:repeat-current() which will do the
>    same:
>
>    http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions
>
>    So try this:
>
>    <xforms:output
>  
> value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/StopR
> ef]/Name"/>
>
> Let us know how this works out.
>
> -Erik
>
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?4318150)
>
>
> This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.
>
>
>
> ----------------------------------------------------------------------
> --
>
>
> --
> 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

--
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
Reply | Threaded
Open this post in threaded view
|

RE: Referenced items in an xform repeat

Shaw, Richard A
In reply to this post by Shaw, Richard A
I did wonder about that - I'll try what you suggest - thanks


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Atkins Transport Systems
Woodcote Grove
Ashley Road
Epsom
KT18 5BW

Direct Dial.: +44 (0) 1372 756407
Switchboard:  +44 (0) 1372 726140
Fax:          +44 (0) 1372 740055
www.atkinsglobal.com/transportsystems



-----Original Message-----
From: Ryan Puddephatt [mailto:[hidden email]]
Sent: 25 April 2006 16:44
To: [hidden email]
Subject: RE: [ops-users] Referenced items in an xform repeat

Richard,
        You have to be careful when replacing things as the ops, context and config folders within the resources directory contain things related to the the way it works.

I normally use an merge program to see what has changed so I can replace the OPS stuff as I don't want to replace properties.xml, theme.xsl etc.

Hope this helps

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Shaw, Richard A [mailto:[hidden email]]
>Sent: 25 April 2006 16:39
>To: [hidden email]
>Subject: RE: [ops-users] Referenced items in an xform repeat
>
>Has the nightly build changes the way in which the pages are found ?
>
>I've rebuild ops.war from the nightly build and added my old version of
>the resources directory. And all I get is a an ops page not available message.
>
>So I took the classes and lib directory from the nightly build and
>replaces the ones my 3.0.1 install and my page now displays, however
>the calendar now gives the following error "stack overflow at line:
>1797" in a pop-up alert box.
>
>I havn't got as far as testing repeat-current() yet.
>
>
>
>Richard Shaw
>
>¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
>Atkins Transport Systems
>Woodcote Grove
>Ashley Road
>Epsom
>KT18 5BW
>
>Direct Dial.: +44 (0) 1372 756407
>Switchboard:  +44 (0) 1372 726140
>Fax:          +44 (0) 1372 740055
>www.atkinsglobal.com/transportsystems
>
>
>
>-----Original Message-----
>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>Bruchez
>Sent: 24 April 2006 18:33
>To: [hidden email]
>Subject: Re: [ops-users] Referenced items in an xform repeat
>
>Richard,
>
>That's right, this function has been implemented post 3.0.1. Can you
>try
>  a nightly build? Otherwise you may have to wait for 3.0.2 or 3.1,
>which should come reasonably soon. If not, there may be some
>workarounds, but they may not be pretty.
>
>-Erik
>
>Shaw, Richard A wrote:
>> Thanks for this but it doesn't seem to work.
>>
>> I have the following namespace set -
>>
>>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>
>> I have changed my output to -
>>
>> <xforms:output
>> value="../../../../../../../*:References/*:Stops/*:Stop[@Ref=xxforms:
>> r epeat-current()/*:Board/*:StopRef]/*:Geocode/*:Easting"/>
>>
>> And I get the following error -
>>
>> XPath syntax error at char 92 in {...xforms:repeat-current()/*:Bo...}:
>> Cannot find a matching 0-argument function named
>> {http://orbeon.org/oxf/xml/xforms}repeat-current()
>>
>> I'm using OPS 3.0.1
>>
>> Richard Shaw
>>
>> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>>
>> Atkins Transport Systems
>> Woodcote Grove
>> Ashley Road
>> Epsom
>> KT18 5BW
>>
>> Direct Dial.: +44 (0) 1372 756407
>> Switchboard:  +44 (0) 1372 726140
>> Fax:          +44 (0) 1372 740055
>> www.atkinsglobal.com/transportsystems
>>
>>
>>
>> -----Original Message-----
>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>> Bruchez
>> Sent: 21 April 2006 18:49
>> To: [hidden email]
>> Subject: Re: [ops-users] Referenced items in an xform repeat
>>
>> Shaw, Richard A wrote:
>>  > Can somebody help we with the syntax of my xpath for selection
>> items from a reference section. As you will see below I can do it in
>> xsl using a variable but I can't find a way to do it with
>> xforms:output because I can' see how to set a variable for xforms.
>>
>> That's right, there are no variables in XForms. I agree that this
>> would
>be a very welcome addition though, in particular to make it easy to
>declare the context of a node.
>>
>>  > <xforms:output
>> value="../../references/stops/stop[@id=stop/id]/name"/>
>>
>> There is a problem in the above: the context for stop/id is stops/stop.
>This means that this is looking for /stops/stop/stop/id, and since you
>don't have such nested stop elements, the expression won't return anything.
>>
>> Let's take this step by step, using your attached source code (which
>differs slightly from the example above):
>>
>> o Using this as a basis:
>>
>>    <xforms:output
>>      value="../../../../Stops/Stop[@Ref=Board/StopRef]/Name"/>
>>
>> o The context within your xforms:repeat is a "leg" element.
>>
>> o As you write correctly in your code, ../../../../Stops/Stop gets you
>>    a node-set (sequence in XPath 2.0) of all the "Stop" elements.
>>
>> o Within the repeat context, "Board/StopRef" correctly points to an
>>    existing StopRef element. However, within the brackets in Stop[...],
>>    the context is changed to the "Stop" element. This makes "@Ref"
>>    correctly point to an attribute, but in that context,
>>    "Board/StopRef" does not point to what you expect.
>>
>> o XForms 1.1 proposes a new current() function which will allow you to
>>    do exactly this by writing:
>>
>>    <xforms:output
>>
>> value="../../../../Stops/Stop[@Ref=current()Board/StopRef]/Name"/>
>>
>> o However OPS does not yet support this function. But it supports an
>>    extension function called xxforms:repeat-current() which will do the
>>    same:
>>
>>    http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions
>>
>>    So try this:
>>
>>    <xforms:output
>>
>> value="../../../../Stops/Stop[@Ref=xxforms:repeat-current()Board/Stop
>> R
>> ef]/Name"/>
>>
>> Let us know how this works out.
>>
>> -Erik
>>
>>
>>
>>
>> This message has been scanned for viruses by MailControl - (see
>> http://bluepages.wsatkins.co.uk/?4318150)
>>
>>
>> This email and any attached files are confidential and copyright
>protected. If you are not the addressee, any dissemination of this
>communication is strictly prohibited. Unless otherwise expressly agreed
>in writing, nothing stated in this communication shall be legally binding.
>>
>>
>>
>> ---------------------------------------------------------------------
>> -
>> --
>>
>>
>> --
>> 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
>
>
>--
>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