Re: Transforming RDF into (non-binary!) trees

[I'm  not sure if the original poster is looking to construct trees of rdf
statements, represent trees in rdf, or represent n-ary predicates. The last
requires creating a new object.  Some patterns for doing this are described
in [2] (this note predates OWL 2.0, so HasKey axioms were not available).]

On Jul 6, 2014 12:20 PM, "Tim Berners-Lee" <timbl@w3.org> wrote:

> Any serializer to turtle, etc, produces a tree in the process.

Asterisk: a good turtle serializer will tree things up as much as possible
(streaming processors may have time/memory constraints).  A bad serializer
is free to output one triple at a time (technically a tree :) .  An evil
serializer is free to output a few gigatrips in the n-triples subset,  then
throw in a [] (a non-evil n-quads serializer may emit a few gigatrips,
reach the end of the default graph and stop being turtle or Trig). This is
a pain if you're trying to write code to guess serialization formats
without processing the entire document...

> In general, a graph may have disconnected parts and so may have to be
serialized to more than one tree.

Obelisk: If RDF interpretation is allowed,  there's always a pseudo root of
rdf:Property available without too much cheating [1].

> (Note that if you allow N3's  reverse arc syntax  (   <#a> is :child of
 <#b> ) the you can serialize any acyclic graph to turtle without having to
generate arbitrary identifiers for blank nodes, just using the turtle [ ]
 syntax.   That is one reason why it was a shame that the reverse syntax
was omitted from Turtle.)

I'd rather have n3 @forSome, add named, linkable [],  and made the prefix
for blank nodes  be
"_I_cannot_think_of_any_reasonable_name_for_this_entity_" followed by 80
emoji of a sad kitten 😿
, because blank nodes should get syntactic sour 😉
.

Simon

[1] http://www.w3.org/TR/2014/REC-rdf11-mt-20140225/#rdf-interpretations

[2] http://www.w3.org/TR/swbp-n-aryRelations

Received on Sunday, 6 July 2014 20:06:22 UTC