[redland-dev] Round tripping rdfxml forgets xmlns

Sebastian Jansen sebastian.jansen at gmail.com
Fri Sep 22 15:37:36 UTC 2006


Hi,

I'm using the latest Redland Perl -binding to develop an RDF to Topic Maps -
Mapping Tool, which maps both standards semantically.

Although the mapping idea itself is quite clear, I'm struggling with a more
Redland - related problem:

When I use the following RDF-XML file as an input:

semblog:~/development/RDFTM-Mapper # cat example.rtm
<rdf:RDF xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:foaf=3D"http://xmlns.com/foaf/0.1/"
         xmlns:rtm=3D"http://psi.ontopia.net/rtm/#">

<rdf:Description rdf:about=3D"rdf:type">
  <rtm:maps-to rdf:resource=3D"rtm:instance-of"/>
</rdf:Description>

<rdf:Description rdf:about=3D"foaf:name">
  <rtm:maps-to rdf:resource=3D"rtm:basename"/>
</rdf:Description>

</rdf:RDF>

And let it go through the Redland rdfxml Serializer via my MySQL database,
it generates the following output:

semblog:~/development/RDFTM-Mapper # cat example_rdfxml.rtm
<?xml version=3D"1.0" encoding=3D"utf-8"?>
<rdf:RDF xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=3D"rdf:type">
    <ns0:maps-to xmlns:ns0=3D"http://psi.ontopia.net/rtm/#"
rdf:resource=3D"rtm:instance-of"/>
  </rdf:Description>
  <rdf:Description rdf:about=3D"foaf:name">
    <ns0:maps-to xmlns:ns0=3D"http://psi.ontopia.net/rtm/#"
rdf:resource=3D"rtm:basename"/>
  </rdf:Description>
</rdf:RDF>

Thus, the foaf and rtm name space is completely forgotten or squeezed in in
a weird way... Any hints to avoid this?

Thanks in advance,
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.usefulinc.com/pipermail/redland-dev/attachments/20060922/=
9fbe92cc/attachment.htm


More information about the redland-dev mailing list