[redland-dev] Default serializer not saving rdf:about

Ricardo J. Méndez mendezster at gmail.com
Thu Jan 25 02:13:14 UTC 2007


Hi,

I've run into an interesting problem with Redland. I'm using

raptor-1.4.13
redland-1.0.5
rasqal-0.9.13

When attempting serialization of a model using the default serializator, as

    serializer=RDF.Serializer()
    serializer.set_namespace("dc", RDF.Uri("http://xmlns.com/foaf/0.1/"))
    serializer.set_namespace("rdf",
RDF.Uri("http://www.w3.org/1999/02/22-rdf-syntax-ns#"))
    serializer.serialize_model_to_file(out_file, model)

the resulting output does not contain the rdf:about tags for any of
the nodes. Instead, they look like

  <dc:Person rdf:about="">
    <dc:name>The Name</dc:name>

However, pretty much any other serializer includes it, like

  <dc:Person rdf:about="http://thename.site.org/">
    <dc:name>The Name</dc:name>

if it's rdfxml or rdfxml-abbrev, or as an element if it's ntriples.

Two questions:

1)  Is this behavior a bug?
2) Which one is the default serializer?  I've serialized data using
RDF.Serializer(), RDF.Serializer("rdfxml"),
RDF.Serializer("rdfxml-abbrev") and RDF.Serializer("ntriples"), and
while the default one matches rdfxml-abbrev the closest, the output
isn't exactly the same.

I've got some test code if anyone considers it necessary.

Thanks in advance,


Ricardo J. Méndez
http://ricardo.strangevistas.net/


More information about the redland-dev mailing list