Re: Please avoid RDF/XML [was Re: RDF/XML syntax for quads]

I find myself processing RDF graphs in Hadoop sometimes. I usually strip all the CR/LF characters from the RDF/XML and then write the output like so:

<graphURI>\t<rdf:RDF>…</rdf:RDF>
<graphURI>\t<rdf:RDF>…</rdf:RDF>

Etc.

That makes it easy to process as RDDs.

http://spark.apache.org/docs/latest/programming-guide.html#resilient-distributed-datasets-rdds



Depending on what the goal is, that might be a useful approach. The RDF/XML vs other RDF serializations isn’t that critical, as long as the CR/LF doesn’t become a factor. Otherwise it’s harder to know when one graph ends and the other begins.

Jeff



On 6/9/16, 4:00 PM, "Martynas Jusevičius" <martynas@graphity.org> wrote:

>Yes, I am using an RDF/XML dialect, but it's a perfectly standard
>dialect. I wish it would be standardized as some kind of profile.
>
>I have heard all these arguments before. But I know what I'm doing --
>as mentioned, we have been using XSLT quite successfully.
>
>Turtle and JSON-LD are fine, but they're simply not XML, and I don't
>think transforming them with Javascript or another imperative language
>is any more natural than transforming RDF/XML with XSLT.
>
>Anyway, I was asking about named graphs :)
>
>P.S. Sorry if you get multiple copies, I need to sort out my email aliases...
>
>On Thu, Jun 9, 2016 at 9:29 PM, David Booth <david@dbooth.org> wrote:
>> On 06/09/2016 02:20 PM, Martynas Jusevičius wrote:
>>>
>>> Honestly I don't understand why RDF/XML is getting such a bad rap :)
>>
>>
>> Key reasons:
>>
>>  1. Other (more modern) RDF serializations are far more
>> human friendly, such as Turtle or even JSON-LD.
>>
>>  2. RDF/XML does not play well with standard XML tooling,
>> such as XSLT, XML Schema or RelaxNG.
>>
>>  3. RDF/XML misleads people into thinking that RDF is a
>> dialect of XML, and it is not.
>>
>> As Kingsley stated on 3 September 2015:
>>> The problem with RDF/XML is that it had an exalted position
>>> in the Semantic Web realm for way too long. To this very day,
>>> many of us are still trying to get folks to understand that
>>> RDF is neither a format nor a dialect of XML.
>>
>> I too have spent too many painful hours coaching XML ninjas
>> who were misled in exactly that way, and were performing all
>> sorts of unnatural acts in XSLT in ultimately doomed efforts
>> to process RDF/XML as though it were "regular" XML.
>>
>> I don't mean to disparage RDF/XML.  RDF/XML was the best that
>> we had when it was created.  But we have much better serializations
>> for RDF now, such as Turtle/TriG and JSON-LD.
>>
>>> Sure, the spec could have been better with fewer variations, but if
>>> you don't do nesting and keep descriptions "flat", the output is
>>> perfectly predictable. That is the default Jena output and we have
>>> been transforming it for years.
>>
>>
>> Then you are using a particular, restricted dialect of RDF/XML that happens
>> to be produced by Jena -- not RDF/XML in general.
>>
>> David Booth
>>
>>>
>>> It is a convenient XML structure when related stuff is grouped under a
>>> parent element, such as properties of a resource, or resources of a
>>> graph. RDF/XML can provide that, TriX and SPARQL XML results cannot.
>>>
>>> On Thu, Jun 9, 2016 at 8:06 PM, David Booth <david@dbooth.org> wrote:
>>>>
>>>> On 06/09/2016 11:44 AM, Martynas Jusevičius wrote:
>>>>>
>>>>>
>>>>> Hey,
>>>>>
>>>>> we have a use case where we need an RDF format in XML syntax that
>>>>> 1. supports named graphs
>>>>> 2. has a convenient structure for XSLT transformations
>>>>>
>>>>> RDF/XML fails at #1, TriX fails at #2.
>>>>>
>>>>> I suggest extending RDF/XML with a concept of named graph,
>>>>
>>>>
>>>>
>>>> Please don't.  The more we can get away from RDF/XML the better.
>>>>
>>>> How about using the W3C standard SPARQL 1.1 XML results format, with
>>>> quads:
>>>> subject, predicate, object and graph?
>>>> https://www.w3.org/TR/rdf-sparql-XMLres/

>>>>
>>>> David Booth
>>>
>>>
>>>
>>>
>>
>

Received on Thursday, 9 June 2016 20:30:09 UTC