On 15/02/12 13:42, benjamin jailly wrote:
Hello everyone,


I'm trying to deal with rdf:seq and Jena Rules.
I want to test a condition on the member rdf:_(n) of the seq and do
something on the member rdf:_(n+1)

I thought I could write something like that:

(?seq rdf:_n ?X) (?seq rdf:_(n+1)  ?Y) (?X my:condition 'true'^^xs:boolean)
->  (?Y my:literal 'true'^^xs:boolean)

Nice idea! Sadly we don't support that right now.

I tried to work with rdfs:ContainerMembershipProperty
(?seq ?p ?X) (?p rdf:type rdfs:ContainerMembershipProperty)

but I didn't manage to get the index of the member.


Should I use regex on rdf:_ ?

Maybe, but probably will end up cleaner for you to create a custom builtin which can map between the rdf:_ URIs and the sequence number.

Dave

Reply via email to