summaryrefslogtreecommitdiffstats
path: root/docs/html/tutorial-parser-set-id-handler.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:40:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:40:05 +0000
commit4038ab95a094b363f1748f3dcb51511a1217475d (patch)
tree7f393d66a783f91ddd263c78d681e485cf4f45ca /docs/html/tutorial-parser-set-id-handler.html
parentInitial commit. (diff)
downloadraptor2-4038ab95a094b363f1748f3dcb51511a1217475d.tar.xz
raptor2-4038ab95a094b363f1748f3dcb51511a1217475d.zip
Adding upstream version 2.0.16.upstream/2.0.16upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/html/tutorial-parser-set-id-handler.html')
-rw-r--r--docs/html/tutorial-parser-set-id-handler.html61
1 files changed, 61 insertions, 0 deletions
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Set the identifier creator handler: Raptor RDF Syntax Library Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
+<link rel="home" href="index.html" title="Raptor RDF Syntax Library Manual">
+<link rel="up" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples">
+<link rel="prev" href="tutorial-parser-set-error-warning-handlers.html" title="Set parsing log message handlers">
+<link rel="next" href="tutorial-parser-set-namespace-handler.html" title="Set namespace declared handler">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="tutorial-parsing.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="tutorial-parser-set-error-warning-handlers.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="tutorial-parser-set-namespace-handler.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="tutorial-parser-set-id-handler"></a>Set the identifier creator handler</h2></div></div></div>
+<p>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 <code class="literal">rdf:nodeID</code> are passed through this
+process. Setting a handler allows the identifier generation mechanism to be
+fully replaced. A lighter alternative is to use
+<a class="link" href="raptor2-section-world.html#raptor-world-set-generate-bnodeid-parameters" title="raptor_world_set_generate_bnodeid_parameters ()"><code class="function">raptor_world_set_generate_bnodeid_parameters()</code></a>
+to adjust the default algorithm for generated identifiers.
+</p>
+<p>It is used as follows
+</p>
+<pre class="programlisting">
+ raptor_generate_bnodeid_handler bnodeid_handler;
+
+ raptor_world_set_generate_bnodeid_handler(rdf_parser, user_data, bnodeid_handler);
+</pre>
+<p>
+</p>
+<p>The <span class="emphasis"><em>bnodeid_handler</em></span> takes the following signature:
+</p>
+<pre class="programlisting">
+unsigned char*
+generate_id_handler(void* user_data, unsigned char* user_id)
+{
+ /* return a new generated ID based on user_id (optional) */
+}
+</pre>
+<p>
+where <span class="emphasis"><em>user_id</em></span> an optional user-supplied identifier,
+such as the value of a <code class="literal">rdf:nodeID</code> in RDF/XML.
+</p>
+</div>
+<div class="footer">
+<hr>Generated by GTK-Doc V1.33.1</div>
+</body>
+</html> \ No newline at end of file