No good reason.  Apparently, it's my own mental lapse.
$array//index[$index] should work ... I had overlooked the abbreviated
syntax when I last looked at the spec.

But! If $array[position() = $index] works and $array[$index] doesn't work,
it's probably due to a type coercion issue in Ode.

Does $array[position() = $index] work in your case?

alex

On Wed, Jan 21, 2009 at 12:48 PM, Bill McCusker <[email protected]>wrote:

> What reason is there that the expression $array//item[$index] is not valid?
> Accord to the XPath 1.0 Specification Section 2.4 (
> http://www.w3.org/TR/xpath.html#predicates) the expression item[3] is
> equivalent to item[position()=3]. Therefore it should be accepted by ODE
> which supports XPath 1.0.
>
>
> Alex Boisvert wrote:
>
>> Bill,
>>
>> Your BPEL uses this form:
>>
>> $array//item[$index]
>>
>> but should use this instead:
>>
>> $array//item[position() = $index]
>>
>> alex
>>
>>
>> On Wed, Jan 21, 2009 at 10:57 AM, Bill McCusker <[email protected]
>> >wrote:
>>
>>
>>
>>> I too am seeing this problem. I tried assigning from an expression and
>>> from
>>> the counter variable to an index variable. Both cases did not work. I
>>> also
>>> tried using the index variable directly in the xpath which also did not
>>> work. Attached is the process I used to test. If it works it should
>>> return a
>>> message with a single part whose contents are "startapples1oranges2." The
>>> value "start" is used to initialize the response variable it should then
>>> be
>>> followed up by the array value and then the index number that was used.
>>> Hope
>>> this helps.
>>>
>>> Bill McCusker
>>>
>>>
>>>
>>
>>
>>
>
>

Reply via email to