Question regarding serialization

15 views
Skip to first unread message

Lukas Leander Rosenstock

unread,
Apr 15, 2012, 12:33:54 PM4/15/12
to arc...@googlegroups.com
Hello everybody!

I have a question regarding serialization formats, especially the handling of bnodes. Let's assume I have the following RDF:
<?xml version='1.0'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
 <foaf:Person rdf:about="uri">
   <foaf:name>me</foaf:name>
   <foaf:knows>
     <foaf:Person>
      <foaf:name>friend</foaf:nick>
     </foaf:Person>
    </foaf:knows>
   </foaf:Person>
</rdf:RDF>
I can parse this RDF with ARC2, but when trying to serialize it again, I get the following:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
   <foaf:Person rdf:about="uri">
    <foaf:name>me</foaf:name>
    <foaf:knows rdf:nodeID="arc4007b2"/>
   </foaf:Person>
   <foaf:Person rdf:nodeID="arc4007b2">
    <foaf:name>friend</foaf:name>
   </foaf:Person>
</rdf:RDF>

While I agree that those two are semantically the same, I find the nested structure of the input easier to read. My question is whether there is any way to configure the serializer in such a way that it will also output a nested structure or if there are alternative serializers?!

Thanks in advance for your relies!
Lukas

Stéphane Corlosquet

unread,
Apr 15, 2012, 9:36:37 PM4/15/12
to arc...@googlegroups.com
Lukas,

Have you tried any of the configuration options at the bottom of https://github.com/semsol/arc2/wiki/Serializing-ARC-Structures?

Steph.

Lukas Leander Rosenstock

unread,
Apr 23, 2012, 12:44:00 PM4/23/12
to arc...@googlegroups.com
I have already looked at those configuration options, but they do not apply to my issue.


Am Montag, 16. April 2012 03:36:37 UTC+2 schrieb Stephane Corlosquet:
Lukas,

Have you tried any of the configuration options at the bottom of https://github.com/semsol/arc2/wiki/Serializing-ARC-Structures?

Steph.
Reply all
Reply to author
Forward
0 new messages