From 4038ab95a094b363f1748f3dcb51511a1217475d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:40:05 +0200 Subject: Adding upstream version 2.0.16. Signed-off-by: Daniel Baumann --- docs/html/tutorial-parser-set-id-handler.html | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 docs/html/tutorial-parser-set-id-handler.html (limited to 'docs/html/tutorial-parser-set-id-handler.html') diff --git a/docs/html/tutorial-parser-set-id-handler.html b/docs/html/tutorial-parser-set-id-handler.html new file mode 100644 index 0000000..4f17805 --- /dev/null +++ b/docs/html/tutorial-parser-set-id-handler.html @@ -0,0 +1,61 @@ + + + + +Set the identifier creator handler: Raptor RDF Syntax Library Manual + + + + + + + + + + + + + + + + +
+

+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. +

+
+ + + \ No newline at end of file -- cgit v1.2.3