Property paths can't have variables in them.
And it's not what you want anyway :-)
owl:sameAs links subject to object so the property URI will be in the
subject or object position to make it the same as another.
Maybe:
?pred rdfs:subPropertyOf rex:relationship .
?pred (owl:sameAs|^owl:sameAs)* ?P
?entity ?P ?s .
These queries may not be cheap.
Andy
On 29/12/10 02:19, Benson Margulies wrote:
Working, I had the following, which does a tiny bit of inference
without turning on the inference engine.
{ ?entity ?pred ?s .
?pred rdfs:subPropertyOf rex:relationship . }
Then I tried to get clever and make paths out of these, and I get
rejected. Is there some variation on this that works?
{ ?entity (?pred | (?pred/owl:sameAs) | (owl:sameAs/?pred)) ?s .
?pred rdfs:subPropertyOf rex:relationship . }