Set the identifier creator handler

Identifiers are created in some parsers by generating them automatically or via hints given a syntax. Raptor can customise this process using a user-supplied identifier handler function. For example, in RDF/XML generated blank node identifiers and those those specified rdf:nodeID are passed through this process. Setting a handler allows the identifier generation mechanism to be fully replaced. A lighter alternative is to use raptor_world_set_generate_bnodeid_parameters() to adjust the default algorithm for generated identifiers.

It is used as follows

  raptor_generate_bnodeid_handler bnodeid_handler;

  raptor_world_set_generate_bnodeid_handler(rdf_parser, user_data, bnodeid_handler);

The bnodeid_handler takes the following signature:

unsigned char*
generate_id_handler(void* user_data, unsigned char* user_id)
{
   /* return a new generated ID based on user_id (optional) */
}

where user_id an optional user-supplied identifier, such as the value of a rdf:nodeID in RDF/XML.