Turtle version 2006-01-02

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Turtle version 2006-01-02

Dave Beckett-2

I've just done a major update to the Turtle RDF syntax folding in many
changes and comments that have been pending for some time.  The latest
version is at
  http://www.dajobe.org/2004/01/turtle/
and includes a detailed changelog however the primary reason for the
update is to align more with SPARQL as it has progressed.   The major
changes since the last big version at the end of 2004 are as follows:

* QNames updated (as long suggested) to follow XML 1.1 naming.
* Added double and decimal literal formats
* Added optional +/- sign prefix for numeric types.
* Added """long strings""" which can have #x9 #xA #xD whitespace.
* Expanded and clarified the string escapes description.
* Added a Turtle differences from SPARQL section.
* Added additional test cases for most of the above!

I hope it's ok to continue discussing Turtle on this list as
co-ordination with cwm & N3 is important to me.  I think we've pretty
much agreed on the decimal/double change on IRC, also co-ordinated with
the DAWG and SPARQL.

There are a few pending changes and I know several people are working on
new and updated parsers for Turtle, which is enouraging for me.
Especially thanks to Arjohn and Jeen for their series of comments,
feedback and tricky questions on Turtle that prompted me to get this out.

I'm sure there will be more questions, bring them on!

Cheers

Dave



Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Tim Berners-Lee

Dave,

The decimal formats I am happy with as a change to N3, as we discussed
on IRC.

Is there any way on which Turtle an/or SparQL have diverged from rather
than converged with N3?  Has anyone done the work to demonstrate
(automatically) a mapping between these three?

Tim


On Jan 2 2006, at 21:49, Dave Beckett wrote:

>
> I've just done a major update to the Turtle RDF syntax folding in many
> changes and comments that have been pending for some time.  The latest
> version is at
>   http://www.dajobe.org/2004/01/turtle/
> and includes a detailed changelog however the primary reason for the
> update is to align more with SPARQL as it has progressed.   The major
> changes since the last big version at the end of 2004 are as follows:
>
> * QNames updated (as long suggested) to follow XML 1.1 naming.
> * Added double and decimal literal formats
> * Added optional +/- sign prefix for numeric types.
> * Added """long strings""" which can have #x9 #xA #xD whitespace.
> * Expanded and clarified the string escapes description.
> * Added a Turtle differences from SPARQL section.
> * Added additional test cases for most of the above!
>
> I hope it's ok to continue discussing Turtle on this list as
> co-ordination with cwm & N3 is important to me.  I think we've pretty
> much agreed on the decimal/double change on IRC, also co-ordinated  
> with
> the DAWG and SPARQL.
>
> There are a few pending changes and I know several people are  
> working on
> new and updated parsers for Turtle, which is enouraging for me.
> Especially thanks to Arjohn and Jeen for their series of comments,
> feedback and tricky questions on Turtle that prompted me to get  
> this out.
>
> I'm sure there will be more questions, bring them on!
>
> Cheers
>
> Dave
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Dave Beckett-2

Tim Berners-Lee wrote:
> Dave,
>
> The decimal formats I am happy with as a change to N3, as we discussed
> on IRC.
>
> Is there any way on which Turtle an/or SparQL have diverged from rather
> than converged with N3?

Maybe.  I keep a note of changes from Turtle:
http://www.dajobe.org/2004/01/turtle/#sec-diff-n3

The ones that stand out now are the decimal/double issue which you are
going to change, and the boolean literals: true & false recently added
after SPARQL.

A test case for the latter:
--------
@prefix : <http://example.org#> .
:a :b true .
:c :d false .
--------

Testing with cwm (cvs version), it dies with a syntax error.

.. and so does my raptor turtle parser as I forgot to add this, oops!
Serves me right for not writing a test for it first.

I've used the above as Turtle test case 'test-24.ttl' and it should be
equivalent to:
--------
@prefix : <http://example.org#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
:a :b "true"^^xsd:boolean .
:c :d "false"^^xsd:boolean .
--------

I would give the ntriples but this dumb emailer wraps the long lines.


> Has anyone done the work to demonstrate
> (automatically) a mapping between these three?

Not that I'm aware of.

One suggestion for SPARQL/Turtle checks is that you could construct
SPARQL queries to check compatibility like this from a turtle example.

... turtle @prefixes lines from the example go here as PREFIX ...
CONSTRUCT {
  ... rest of the turtle example goes here ...
}
WHERE true

which should give the same RDF graph out as expressed in the original
turtle which can then be machine checked.

Merely a matter of programming :)

For Notation 3/Turtle checks you could just run cwm on all the existing
Turtle tests.  I do that occasionally especially when adding new things
to see what works.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Yosi Scharf

Dave Beckett wrote:

>Tim Berners-Lee wrote:
>  
>
>>Dave,
>>
>>The decimal formats I am happy with as a change to N3, as we discussed
>>on IRC.
>>
>>Is there any way on which Turtle an/or SparQL have diverged from rather
>>than converged with N3?
>>    
>>
>
>Maybe.  I keep a note of changes from Turtle:
>http://www.dajobe.org/2004/01/turtle/#sec-diff-n3
>
>The ones that stand out now are the decimal/double issue which you are
>going to change, and the boolean literals: true & false recently added
>after SPARQL.
>
>  
>
Cwm should now be parsing (and generating) decimals correctly. Much
cleanup is needed in terms of builtins, and which decimal class to use.


Yosi

Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Arjohn Kampman
In reply to this post by Tim Berners-Lee

Tim Berners-Lee wrote:
> Dave,
>
> The decimal formats I am happy with as a change to N3, as we discussed
> on IRC.
>
> Is there any way on which Turtle an/or SparQL have diverged from rather
> than converged with N3?  Has anyone done the work to demonstrate
> (automatically) a mapping between these three?

While working on an update of our N3 writer, I just remembered that
there is one fundamental difference between Turtle and N3: Turtle has
the notion of (document-scoped) blank node identifiers but N3 does not
(AFAIK). RDF/XML and N-Triples also support blank node identifiers.

The lack of blank node identifiers makes it much harder to export RDF
data in N3 format when blank nodes are involved, requiring multiple
passes over the set of statements. Also, some RDF graphs that are
expressible in RDF/XML and Turtle might not be expressible in N3. For
example, is it possible to express that a blank node is a subclass of
itself?

Any chance that N3 will get support for blank node identifiers in the
near future?

Regards,

Arjohn

--
[hidden email]
Aduna BV - http://aduna.biz/
Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
tel. +31-(0)33-4659987

Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Tim Berners-Lee

N3 has blank node identifiers starting with  "_:".

Quoting http://www.w3.org/DesignIssues/Notation3.html

"N3 allows the _: namespace as in NTriples. These identifiers are  
used to identify blank nodes in the graph. These are generalized in  
N3 such that they are used to identify blanknodes in the local  
formula. They are arbitrary temporary names for nodes which are  
existentially quanitified within the current formula (not the whole  
file). They can only be used within a single formula, and not within  
nested formulae."

Tim

On Jan 20, 2006, at 9:21, Arjohn Kampman wrote:

> [...]
> While working on an update of our N3 writer, I just remembered that
> there is one fundamental difference between Turtle and N3: Turtle has
> the notion of (document-scoped) blank node identifiers but N3 does not
> (AFAIK). RDF/XML and N-Triples also support blank node identifiers.
>
> The lack of blank node identifiers makes it much harder to export RDF
> data in N3 format when blank nodes are involved, requiring multiple
> passes over the set of statements. Also, some RDF graphs that are
> expressible in RDF/XML and Turtle might not be expressible in N3. For
> example, is it possible to express that a blank node is a subclass of
> itself?
>
> Any chance that N3 will get support for blank node identifiers in the
> near future?
>
> Regards,
>
> Arjohn
>
> --
> [hidden email]
> Aduna BV - http://aduna.biz/
> Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
> tel. +31-(0)33-4659987


Reply | Threaded
Open this post in threaded view
|

Re: Turtle version 2006-01-02

Arjohn Kampman

Tim Berners-Lee wrote:

> N3 has blank node identifiers starting with  "_:".
>
> Quoting http://www.w3.org/DesignIssues/Notation3.html
>
> "N3 allows the _: namespace as in NTriples. These identifiers are used
> to identify blank nodes in the graph. These are generalized in N3 such
> that they are used to identify blanknodes in the local formula. They are
> arbitrary temporary names for nodes which are existentially quanitified
> within the current formula (not the whole file). They can only be used
> within a single formula, and not within nested formulae."

Right, missed that. I couldn't find any reference to blank nodes in the
N3/N3-rdf grammars or under "Anonymous nodes" and jumped to the
conclusion that they still weren't supported. However, archive.org just
showed me that this has been changed some 1.5 years ago :blush:

Sorry for the inconvenience,

Arjohn

--
[hidden email]
Aduna BV - http://aduna.biz/
Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
tel. +31-(0)33-4659987