W3C home > Mailing lists > Public > semantic-web@w3.org > November 2018

Re: Toward easier RDF: a proposal

From: Holger Knublauch <holger@topquadrant.com>
Date: Tue, 27 Nov 2018 20:12:58 +1000
To: semantic-web@w3.org
Message-ID: <b6331193-84d9-0694-76b8-20866273f585@topquadrant.com>
Tom certainly has a valid point, and I think it's worth drilling into 
these distinctions to clarify where the sweet spot would be.

There are various ways that XML trees can simulate graph structures, 
e.g. by marking certain attributes as ID or IDREF in DTDs. Likewise, for 
JSON the native runtime structure is technically an object model that 
can represent graphs. In both cases, these are arguably a bit artificial 
and inconsistent while RDF is designed from the ground up to be a 
"native" graph data model. These differences manifest themselves in how 
the APIs look like, how the languages are explained etc. An XML user is 
confronted with a variety of different attribute patterns on how object 
relations are represented (even GraphML), while only the 'child-nodes' 
relation is truly native to the APIs. For JSON, JSON-LD illustrates how 
graphs can be represented, yet if you load a JSON-LD file, you still 
don't get native JSON objects in their most natural form.

So let me rephrase:

XML and JSON are primarily designed for tree structures.
RDF is designed from the ground up for graph structures.

Holger


On 27/11/2018 7:34 pm, Martynas Jusevičius wrote:
> You missed the part about global identifiers. XML does not have them.
> RDF has them built in: URIs.
> On Tue, Nov 27, 2018 at 6:21 AM Thomas Passin <tpassin@tompassin.net> wrote:
>> On 11/26/2018 10:54 PM, Holger Knublauch wrote:
>>> XML and JSON are all about tree structures. RDF defines the more
>>> flexible data structure of graphs
>> It probably doesn't matter for this discussion, but I've seen statements
>> like this too often.  XML actually can represent graphs perfectly well.
>> One way is by using ID/IDREFs, and there are many other ways.  Just
>> because an XML document reads serially from start to finish doesn't mean
>> it has to represent a tree instead of a graph (leaving aside the matter
>> that a a tree is a particular kind of graph structure!).  In fact,
>> that's obvious because the XML syntax for RDF interchange describes RDF
>> graphs.
>>
>> XML elements (the ones without ID values, anyway) can be considered to
>> be typed anonymous nodes.  You could regard them as bnodes that have a
>> type relation but not an ID.
>>
>> TomP
>>
>>
Received on Tuesday, 27 November 2018 10:13:24 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:42:03 UTC