Re: Draft response for comment N3-1

On 23/02/2010 10:18 AM, Steve Harris wrote:
> Just for my own edification. Is it correct that N3 already includes a
> path syntax similar to the SPARQL property paths one, and plans to add
> expressions, so will require a delimiter, or is it a first one to stick
> their syntax flag in the ground situation?

N3 does include path syntax. [1]

N3 allows a path in any position : subject/property/object - a path in 
the S or O slots ends in an implicit bnode.

N3 uses "!" for forward and "^" for backward (binary forms only - there 
has been a preference in SPARQL-WG for only the unary form of "^").

   :Class ^rdf:type :thing .	# Illegal N3.

but one can write the expression:

  :Class^rdf:type/:thing .	# No whitespace.

It's the bNode expression:

  [ rdf:type :Class ] .

because the propertyList can be empty in N3 - that's how it does []. 
SPARQL is stricter - no nodes without being in a triple pattern.

   :x .

is legal N3 syntax (which generates no triples).

Reverse paths  which seem quite natural to me in a path language.  N3 
paths are more like routes from graph node to graph node, including the 
endpoints, not the sequence of properties traversed.

N3 only permits fixed length traversal (no modifiers: * + ? {})

Expressions are not in N3 (the formal grammar ref'ed in the submission), 
nor are they implemented as far as I know.

If it were just P and expressions in S and O, there would not be a problem.

So if there is a syntax clash (it's not clear there definitely is), then 
expressions might need something like $(expr) or `expr`).

> It doesn't really alter my feelings on the subject, but the three way
> syntax land grab between turtle, N3 and SPARQL is not ideal. I don't
> really get the impression that there's any W3C policy in this area.

Agreed - just the differences in prefixed names between CURIEs, Turtle, 
TriG, N3 and SPARQL causes friction for developers.  DAWG got noticeable 
feedback from communities who have identifier schemes that naturally map 
to URIs with numeric final parts so DAWG allowed leading digits in the 
local part. Agreeing a set of terminals to buuld languages on would be a 
start.

	Andy

>
> - Steve

[1] http://www.w3.org/2000/10/swap/grammar/n3-report.html#pathitem
     From http://www.w3.org/TeamSubmission/n3/

Received on Tuesday, 23 February 2010 11:37:51 UTC