Set namespace declared handler

Raptor can report when namespace prefix/URIs are declared in during parsing a syntax such as those in XML, RDF/XML or Turtle. A handler function can be set to receive these declarations using the namespace handler method.

  raptor_namespace_handler namespaces_handler;

  raptor_set_namespace_handler(rdf_parser, user_data, namespaces_handler);

The namespaces_handler takes the following signature:

void
namespaces_handler(void* user_data, raptor_namespace *nspace) {
  /*  */
}

Note

This may be called multiple times with the same namespace, if the namespace is declared inside different XML sub-trees.