-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettier output from Erfurt RDF/Turtle export #32
Comments
Ping. |
But I think in general comma separated lists are better readable if they are in one line. |
I see your point. However, the exporter only needs to make sure a comma is followed by a line break and appropriate indentation, rather than a space. The object of Turtle notation is, as far as I know, to provide a RDF serialization which is easier for humans to read. True enough, each human being will have his own personal preferences, and catering for this variety is a complex task. Now, generally, other Turtle files I have seen tend to present combined triples like the above on multiple lines. The idea seems to be that line breaks are more easily interpreted as a logical separator than are spaces. Turning to the source, the W3C TeamSubmission states that "This document defines a textual syntax for RDF called Turtle that allows RDF graphs to be completely written in a compact and natural text form, with abbreviations for common usage patterns and datatypes." The compactness and natural text form is of course a matter of interpretation. Section 2.3 further exemplifies the syntax, and indicates that groups of triples should be written such: # this is not a complete turtle document
:a :b :c ,
:d .
# the last triple is :a :b :d . and that groups of predicates should be written such: # this is not a complete turtle document
:a :b :c ;
:d :e .
# the last triple is :a :d :e . Combining these, in my personal interpretation, gives the folowing: # this is not a complete turtle document
:a :b :c ;
:d :e ,
:f .
# the last triple is :a :d :f . Personally, I find this more readable than # this is not a complete turtle document
:a :b :c ;
:d :e , :f .
# the last triple is :a :d :f . however valid and readable this syntax is for a machine. I'll have to inquire of the TeamSubmission authors for a clarification. |
Reading a bit more on the issue reveals that things are more complicated still. The W3C Turtle Working Draft is not conclusive on this matter. From http://www.w3.org/TR/2012/WD-turtle-20120710/#object-lists From http://www.w3.org/TR/2012/WD-turtle-20120710/#sec-parsing-example # Example I
# this is not a complete turtle document
:a :b :c ;
:d :e ,
:f .
# the last triple is :a :d :f . I'll look into the matter. ;)Frode |
The Turtle source as exported from
http://data.bbib.no/source/edit/r/Nordahl_Grieg
is not very readable for the part containing frbr:creatorOf. Never mind the frbr:creatorOf appearing twice. This is an error on my part whilst using OntoWiki, adding a separate instance of a property widget for frbr:creatorOf, instead of using the
+
button to expand the widget. This is an OntoWiki issue, I suppose.The readability of the line
is what concerns this issue.
Exporting this as
would be more readable, and still valid Turtle syntax, I suppose.
;)Frode
The text was updated successfully, but these errors were encountered: