[redland-dev] Re: How to get ID of librdf_node?

Dave Beckett dave.beckett at bristol.ac.uk
Mon Jul 18 11:54:01 BST 2005


On Sun, 2005-07-17 at 14:06 -0700, Boris Popov wrote:
> Hi,
> 
> I must be missing something really simple, but how would I go about
> getting ID of a node without having to get a URI string and parsing it
> based on the presense of # ? There's librdf_node_get_blank_identifier
> for empty nodes, but no such thing for normal nodes...

A normal mode?  Assuming you mean a resource node which are URIs.  Use
librdf_node_get_uri to get the URI.  

I don't see what parsing and '#' has to do with URIs.  You might do that
when doing relative URI or base URI operations when serializing but in
RDF applications treat URIs as opaque.  See some of the operations in
the rdf_uri.h header e.g. librdf_new_uri_relative_to_base, 
librdf_new_uri_normalised_to_base

Dave





More information about the redland-dev mailing list