Re: TriG production questions

On 15/05/13 17:36, Charles Greer wrote:
> Hi all,
>
> Looking at the editor's draft of TriG a couple of questions occur to us
> at MarkLogic.
>
> 1.  Could the spec be modified to allow TriG to be a superset of
> turtle?  Specifically, could the production rules be modified to allow
> a set of triples outside of any '{'  '}' to be the same as triples in a
> default anonymous graph?  It seems that even now, the rules allow
> multiple anonymous graph productions, whose union would be the unnamed
> graph.  It would be convenient if we could dispense with these anonymous
> curly braces altogether if possible.
>
> 2.  The first two production rules
> [1g] 	|trigDoc| 	::= 	graph_statement
> <https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html#grammar-production-graph_statement>|*|
>
> [2g] 	|graph_statement| 	::= 	directive
> <https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html#grammar-production-directive>
> || | graph
> <https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html#grammar-production-graph>
>
>
>
> permit @prefix statements et. al. to be anywhere in the document.  I
> don't have any issue with that, but it was a little surprising to me, as
> these always seemed like header information to me, and it seems as
> though it might be harder to implement this way.
>
> Charles

(not an official response)

This applies in in Turtle as well - prefixes can come between any
'[6] triples' block.

I hope it's clear that the directive applies from that point in the 
document onwards, not to the whole document. In implementation terms, 
parsing is streaming.

== Example 1

1.    { :x :p 123 . }
2.    @prefix : <http://example/ns#> .

is illegal because ":" isn't defined at line 1.

== Example 2

1.    @prefix : <http://example/nsX#> .
2.    { :x :p 123 . }
3.    @prefix : <http://example/nsY#> .
4.    { :x :p 123 . }

is two different triples.

If you find the document not to be clear, please could you make a formal 
comment?

(Whether it's good style to do this is another matter)

	Andy

>
> --
> Charles Greer
> Senior Engineer
> MarkLogic Corporation
> charles.greer@marklogic.com
> Phone: +1 707 408 3277
> www.marklogic.com
>

Received on Friday, 17 May 2013 09:50:12 UTC