[redland-dev] Parser incorrectly interprets Blank Nodes on
	reload...
    Brian Holdsworth 
    holdswob33 at yahoo.com
       
    Mon Jan 24 05:25:37 PST 2005
    
    
  
It might not be a bug in librdf.  Looking at the code
for raptor_rdfxml_serialize_statement() in
raptor_serialize.c, it sure looks like it does *the
right thing*.  Perhaps my nodes in my model have
somehow gotten the wrong type associated with them.
By golly, there's a bug *somewhere* :)
- Brian
--- Simon Cross <simon at sanbi.ac.za> wrote:
> Hi Brian,
> 
> > I am seeing a strange behavior on my model when I
> > re-parse it after using the rdfxml serializer.  My
> > model has lots of blank node identifiers.  When I
> > serialize it to a rdfxml file, I get statements
> such
> > as this related to the blank nodes:
> > 
> >   <rdf:Description rdf:about="r1r377">
> >     <rdf:value>843-218-6669</rdf:value>
> >   </rdf:Description>
> 
> I think the problem is in the way blank nodes are
> being serialized, not
> in the RDF/XML parsing.  The RDF Primer bit on
> RDF/XML [1] says:
> 
> A blank node is referred to in RDF/XML using an
> rdf:nodeID attribute,
> with a blank node identifier as its value, in places
> where the URIref of
> a resource would otherwise appear. Specifically, a
> statement with a
> blank node as its subject can be written in RDF/XML
> using an
> rdf:Description element with an rdf:nodeID attribute
> instead of an
> rdf:about attribute.
> 
> So the correct serialization would be:
> 
>   <rdf:Description rdf:nodeID="r1r377">
>      <rdf:value>843-218-6669</rdf:value>
>   </rdf:Description>
> 
> The parser seems to correctly treat the rdf:about as
> specifying a URI
> for a non-blank node.
> 
> I've only been playing with RDF for a few weeks so
> don't take any of
> this as gospel. :)
> 
> [1] http://www.w3.org/TR/rdf-primer/#rdfxml
> 
> Schiavo
> Simon
> 
> 
    
    
More information about the redland-dev
mailing list