diff options
Diffstat (limited to '')
-rw-r--r-- | docs/html/tutorial-parser-features.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/docs/html/tutorial-parser-features.html b/docs/html/tutorial-parser-features.html new file mode 100644 index 0000000..7ed2c1a --- /dev/null +++ b/docs/html/tutorial-parser-features.html @@ -0,0 +1,71 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Parser options: 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-create.html" title="Create the Parser object"> +<link rel="next" href="tutorial-parser-set-triple-handler.html" title="Set RDF statement callback 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-create.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="tutorial-parser-set-triple-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-features"></a>Parser options</h2></div></div></div> +<p>There are several +<span class="emphasis"><em> options</em></span> that can be set on parsers. +The exact list of options can be found at run time via the +<a class="link" href="tutorial-querying-functionality.html" title="Listing built-in functionality">Querying Functionality</a> +or in the API reference for +<a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><code class="literal">raptor_option</code></a>. +</p> +<p>Options are integer enumerations of the + <a class="link" href="raptor2-section-option.html#raptor-option" title="enum raptor_option"><span class="type">raptor_option</span></a> enum and have +typed values that are either booleans, integers or strings. +The function that sets options for parsers is +<a class="link" href="raptor2-section-parser.html#raptor-parser-set-option" title="raptor_parser_set_optionĀ ()">raptor_parser_set_option()</a> +used as follows: +</p> +<pre class="programlisting"> + /* Set a boolean or integer valued option to value 1 */ + raptor_parser_set_option(rdf_parser, option, NULL, 1); + + /* Set a string valued option to value "abc" */ + raptor_parser_set_option(rdf_parser, option, "abc", -1); +</pre> +<p> +</p> +<p> +There is a corresponding function for reading the values of parser +option +<a class="link" href="raptor2-section-parser.html#raptor-parser-get-option" title="raptor_parser_get_optionĀ ()"><code class="function">raptor_parser_get_option()</code></a> +which takes the option enumeration parameter and returns the boolean / +integer or string value correspondingly into the appropriate pointer +argument. +</p> +<pre class="programlisting"> + /* Get a boolean or integer option value */ + int int_var; + raptor_parser_get_option(rdf_parser, option, NULL, &int_var); + + /* Get a string option value */ + char* string_var; + raptor_parser_get_option(rdf_parser, option, &string_var, NULL); +</pre> +<p> +</p> +</div> +<div class="footer"> +<hr>Generated by GTK-Doc V1.33.1</div> +</body> +</html>
\ No newline at end of file |