On Wed, Jul 10, 2013 at 12:16 PM, Damian Steer <[email protected]> wrote:
>
> On 10 Jul 2013, at 17:11, Joshua TAYLOR <[email protected]> wrote:
>
>> On Wed, Jul 10, 2013 at 11:25 AM, Damian Steer <[email protected]> wrote:
>>>
>>> * You can rearrange your second query to get what you want:
>>>
>>> OPTIONAL {
>>>   ?element2 :atIndex ?index2 .
>>>   BIND(  ?index2 + 1 as ?index)
>>> }
>>
>> This doesn't actually work though, because BIND isn't allowed to bind
>> a variable that's already in scope.  So this query :
>
> ?index isn't in scope, though. Honest, try it!

Oops, I thought I had!  There's a big difference between

   BIND(  ?index2 + 1 as ?index)

and

   BIND(  ?index - 1 as ?index2)

I've been staring at this stuff too long, now. :)





-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to