Re: Discussion of property paths, SPARQL and N3

On 29 Jan 2010, at 13:07, Sandro Hawke wrote:
...
> But I think *maybe* it can just be handled in a grammar.  Here's a  
> silly
> example query:
>
>   {  ?x eg:age ?x_age.
>      ?xfoaf:knows+ ?y
>      ?y eg:age ?x_age+1 }

or

{ ?x eg:age ?x_age.
   ?x foaf:knows+/eg:age ?x_age+1. }

I've not thought very hard about it, but I'd expect to run into  
problems with ()s, and/or the expressions being hard to read.

{ ?x eg:age ?x_age.
   ?x foaf:knows+/eg:age ?y_age.
   ?x foaf:knows+/eg:age (?x_age+?y_age)/2.     (1)
}

I suspect you need a lot of lookahead around (1) to tell if it's a  
list or an expression. You could write ?x_age/2+?y_age/2 instead, but  
that's not very user friendly.

- Steve

Received on Friday, 29 January 2010 14:52:46 UTC