W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2012

Re: Turtle Draft

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Wed, 02 May 2012 10:49:50 +0100
Message-ID: <4FA1033E.2050200@epimorphics.com>
To: public-rdf-wg@w3.org

On 02/05/12 00:02, Gavin Carothers wrote:
> New draft is up before meeting
> http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html
> Sections I'm still not happy with:
> 3.1.2: Has no examples, but all the examples showed how to abuse @base
> to do horrible things. If anyone has a GOOD example of @base twice in
> a document...
> 3.3.1: Not a friendly introduction to nested blank nodes, but than I
> hate nested blank nodes. Better prose welcome.
> 9: We should likely have a test suite that tests the current grammar
> and design, just saying.
> Cheers,
> Gavin

(rushed, incomplete ... sorry)

I put my "mechanically implement" hat on and went and looked at the 
formal specifications for Turtle and N-Triples:

== Turtle

Producing triples from a Turtle document is Section 6.3 "RDF Triples 

It covers:

1/ """
    For every object N in the document produces an RDF triple
     curSubject curPredicate N."""
2/ Nodes produced by blankNodePropertyList
3/ Nodes produced by collection.

Comment 1:
I was expecting this section to contain all the places triples are produced.

I was expecting something about predicateObjectList and objectList but I 
don't see anything.  At a minimum, how do these productions set N?

Sec 2.2 "Predicate Lists" describes the process for predicateObjectList 
but is not formal.

Comment 2:
  1 says triples are "produced"
  3 says triples are "created".
  Sec 7 says "emit"

Comment 3:

"a novel blank node B. "

The usual term is "fresh" not "novel".

Comment 4:

What happens to "B"?  Is it N somehow?  For a formal section, this 
should be explicitly stated.  It does not say it's an object.

"The node produced" but triples are "produced".

Overall suggestion:

Parsing is a process so writing as pseudo-code would be a good way of 
formally defining triple production.  Having already talked about the 
state variables, this seems natural to me.

== N-Triples

Comment 5:
Rule names inconsistent

[2]		triple		::= 	subj pred obj '.'
but the rule names are:
[3] subjects     (NB plural as well)
[4] predicate
[5] object

[5] object ::= 	(IRIREF | BLANK_NODE_LABEL | lit)
Ditto 'lit'

Comment 6a:
The links in [2] didn't work

Comment 6b:
[4] IRIREF links back to Turtle, not the rule in the N-Triples grammar 
(they are the same but links in N-Triples should go to the N-Triples copy).
This occurs several times.

Comment 7:
It may be trivial but there is not equivalent to section 6.3 for 
N-Triples.  Add such a section.

Comment 8: whitespace, comments

N-Triples does not define horizontal white space processing.
As stated the doc below is illegal because it has whitespace bewteen tokens.

---- Doc
<http://example/s>  <http://example/p>  "abc"  .
---- Doc

Something on comments should go it.

EOL is confusing as it's one or more end of lines.

Sec 12.1 Summary of diffrences in N-Triples and Turtle should mention 
that triples can't be split across lines.

Comment 9:
[160s]		PN_CHARS		::= 	(PN_CHARS_U

PN_CHARS_U isn't in the N-Triples grammar.

PN_CHARS_BASE is defined but not used.


Other comments:

clicking around:

The link in 3.3.1 tp predicateObjectList results in a page saying:
error: rdf-turtle/predicateObjectList@a52278f0801e: not found in manifest

<a href="predicateObjectLa novel blank node B. ist">predicateObjectList</a>
<a href="#grammar-production-predicateObjectList">predicateObjectList</a>
Received on Wednesday, 2 May 2012 09:50:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:17 UTC