W3C home > Mailing lists > Public > semantic-web@w3.org > May 2009

Turtle syntax question

From: Ian Emmons <iemmons@bbn.com>
Date: Thu, 28 May 2009 16:13:55 -0400
Message-Id: <52F245B3-B3BD-4314-963F-46D6A8DB2C73@bbn.com>
To: Semantic Web at W3C <semantic-web@w3.org>
A common construct in turtle files is the following:

     ex:fooInstance ex:predicate ex:barInstance .

In other words, three qnames followed by a period, denoting a statement.

A problem arises if any of the qnames contains a period, like this:

     ex:foo.instance ex:pred.i.cate ex:bar.instance .

In this case, the first period is interpreted as a statement  
terminator, resulting in a parsing error.  Looking into the turtle  
grammar at [1], I found much to my surprise that a period is not  
allowed in such identifiers in turtle.  In contrast, the period is  
allowed in XML -- see the NameStartChar and NameChar productions at  
[2] and [3].  It is likewise allowed in RDF.

This seems like a serious limitation of turtle.  Am I missing something?

Thanks,

Ian

[1] http://www.dajobe.org/2004/01/turtle/#sec-grammar-grammar
[2] http://www.w3.org/TR/REC-xml/#NT-NameStartChar
[3] http://www.w3.org/TR/xml11/#NT-NameStartChar

Received on Thursday, 28 May 2009 20:14:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:29 GMT