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

Re: Turtle syntax question

From: Brian Manley <brian.manley@gmail.com>
Date: Thu, 28 May 2009 13:38:27 -0700
Cc: Semantic Web at W3C <semantic-web@w3.org>
Message-Id: <DDA96172-64DF-40CF-8E20-FED3D97B7F4C@gmail.com>
To: Ian Emmons <iemmons@bbn.com>
Hi Ian,

Good point. But turtle isn't XML. :) Using a uriref instead of a qname  
should get you past this I would think.

<http://foo.org/foo.instance> <http://foo.org/pred.i.cate> <http://foo.org/bar.instance 
 > .

Regards,
Brian



On May 28, 2009, at 1:13 PM, Ian Emmons wrote:

> 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:39:02 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:12 UTC