147
146
collections were initially added.
148
147
</simpara></listitem>
150
<varlistentry id="RAPTOR-FEATURE-NORMALIZE-LANGUAGE:CAPS" role="constant">
149
<varlistentry id="RAPTOR-FEATURE-NORMALIZE-LANGUAGE--CAPS" role="constant">
151
150
<term><literal>RAPTOR_FEATURE_NORMALIZE_LANGUAGE</literal></term>
152
151
<listitem><simpara> If true (default true) then
153
152
XML language values such as from xml:lang will be normalized to
155
154
</simpara></listitem>
157
<varlistentry id="RAPTOR-FEATURE-NON-NFC-FATAL:CAPS" role="constant">
156
<varlistentry id="RAPTOR-FEATURE-NON-NFC-FATAL--CAPS" role="constant">
158
157
<term><literal>RAPTOR_FEATURE_NON_NFC_FATAL</literal></term>
159
158
<listitem><simpara> If true (default false) then
160
159
illegal Unicode Normal Form C in literals will give a fatal
161
160
error, otherwise just a warning.
162
161
</simpara></listitem>
164
<varlistentry id="RAPTOR-FEATURE-WARN-OTHER-PARSETYPES:CAPS" role="constant">
163
<varlistentry id="RAPTOR-FEATURE-WARN-OTHER-PARSETYPES--CAPS" role="constant">
165
164
<term><literal>RAPTOR_FEATURE_WARN_OTHER_PARSETYPES</literal></term>
166
165
<listitem><simpara> If true (default true) then
167
166
the RDF/XML parser will warn about unknown rdf:parseType values.
168
167
</simpara></listitem>
170
<varlistentry id="RAPTOR-FEATURE-CHECK-RDF-ID:CAPS" role="constant">
169
<varlistentry id="RAPTOR-FEATURE-CHECK-RDF-ID--CAPS" role="constant">
171
170
<term><literal>RAPTOR_FEATURE_CHECK_RDF_ID</literal></term>
172
171
<listitem><simpara> If true (default true) then the
173
172
RDF/XML will check rdf:ID attribute values for duplicates and
174
173
cause an error if any are found.
175
174
</simpara></listitem>
177
<varlistentry id="RAPTOR-FEATURE-RELATIVE-URIS:CAPS" role="constant">
176
<varlistentry id="RAPTOR-FEATURE-RELATIVE-URIS--CAPS" role="constant">
178
177
<term><literal>RAPTOR_FEATURE_RELATIVE_URIS</literal></term>
179
178
<listitem><simpara> If true (default true) then
180
179
relative URIs will be used wherever possible when serializing.
181
180
</simpara></listitem>
183
<varlistentry id="RAPTOR-FEATURE-START-URI:CAPS" role="constant">
182
<varlistentry id="RAPTOR-FEATURE-START-URI--CAPS" role="constant">
184
183
<term><literal>RAPTOR_FEATURE_START_URI</literal></term>
185
184
<listitem><simpara> Set the start URI for serlalizing to use.
186
185
</simpara></listitem>
188
<varlistentry id="RAPTOR-FEATURE-WRITER-AUTO-INDENT:CAPS" role="constant">
187
<varlistentry id="RAPTOR-FEATURE-WRITER-AUTO-INDENT--CAPS" role="constant">
189
188
<term><literal>RAPTOR_FEATURE_WRITER_AUTO_INDENT</literal></term>
190
189
<listitem><simpara> Automatically indent elements when
192
191
</simpara></listitem>
194
<varlistentry id="RAPTOR-FEATURE-WRITER-AUTO-EMPTY:CAPS" role="constant">
193
<varlistentry id="RAPTOR-FEATURE-WRITER-AUTO-EMPTY--CAPS" role="constant">
195
194
<term><literal>RAPTOR_FEATURE_WRITER_AUTO_EMPTY</literal></term>
196
195
<listitem><simpara> Automatically detect and
197
196
abbreviate empty elements when serializing.
198
197
</simpara></listitem>
200
<varlistentry id="RAPTOR-FEATURE-WRITER-INDENT-WIDTH:CAPS" role="constant">
199
<varlistentry id="RAPTOR-FEATURE-WRITER-INDENT-WIDTH--CAPS" role="constant">
201
200
<term><literal>RAPTOR_FEATURE_WRITER_INDENT_WIDTH</literal></term>
202
201
<listitem><simpara> Integer number of spaces to use
203
202
for each indent level when serializing with auto indent.
204
203
</simpara></listitem>
206
<varlistentry id="RAPTOR-FEATURE-WRITER-XML-VERSION:CAPS" role="constant">
205
<varlistentry id="RAPTOR-FEATURE-WRITER-XML-VERSION--CAPS" role="constant">
207
206
<term><literal>RAPTOR_FEATURE_WRITER_XML_VERSION</literal></term>
208
207
<listitem><simpara> Integer XML version XML 1.0 (10) or XML 1.1 (11)
209
208
</simpara></listitem>
211
<varlistentry id="RAPTOR-FEATURE-WRITER-XML-DECLARATION:CAPS" role="constant">
210
<varlistentry id="RAPTOR-FEATURE-WRITER-XML-DECLARATION--CAPS" role="constant">
212
211
<term><literal>RAPTOR_FEATURE_WRITER_XML_DECLARATION</literal></term>
213
212
<listitem><simpara> Write XML 1.0 or 1.1 declaration.
214
213
</simpara></listitem>
216
<varlistentry id="RAPTOR-FEATURE-NO-NET:CAPS" role="constant">
215
<varlistentry id="RAPTOR-FEATURE-NO-NET--CAPS" role="constant">
217
216
<term><literal>RAPTOR_FEATURE_NO_NET</literal></term>
218
217
<listitem><simpara> Deny network requests.
219
218
</simpara></listitem>
221
<varlistentry id="RAPTOR-FEATURE-RESOURCE-BORDER:CAPS" role="constant">
220
<varlistentry id="RAPTOR-FEATURE-RESOURCE-BORDER--CAPS" role="constant">
222
221
<term><literal>RAPTOR_FEATURE_RESOURCE_BORDER</literal></term>
223
222
<listitem><simpara> Border color of resource
224
223
nodes for GraphViz DOT serializer.
225
224
</simpara></listitem>
227
<varlistentry id="RAPTOR-FEATURE-LITERAL-BORDER:CAPS" role="constant">
226
<varlistentry id="RAPTOR-FEATURE-LITERAL-BORDER--CAPS" role="constant">
228
227
<term><literal>RAPTOR_FEATURE_LITERAL_BORDER</literal></term>
229
228
<listitem><simpara> Border color of literal nodes
230
229
for GraphViz DOT serializer.
231
230
</simpara></listitem>
233
<varlistentry id="RAPTOR-FEATURE-BNODE-BORDER:CAPS" role="constant">
232
<varlistentry id="RAPTOR-FEATURE-BNODE-BORDER--CAPS" role="constant">
234
233
<term><literal>RAPTOR_FEATURE_BNODE_BORDER</literal></term>
235
234
<listitem><simpara> Border color of blank nodes for
236
235
GraphViz DOT serializer.
237
236
</simpara></listitem>
239
<varlistentry id="RAPTOR-FEATURE-RESOURCE-FILL:CAPS" role="constant">
238
<varlistentry id="RAPTOR-FEATURE-RESOURCE-FILL--CAPS" role="constant">
240
239
<term><literal>RAPTOR_FEATURE_RESOURCE_FILL</literal></term>
241
240
<listitem><simpara> Fill color of resource nodes
242
241
for GraphViz DOT serializer.
243
242
</simpara></listitem>
245
<varlistentry id="RAPTOR-FEATURE-LITERAL-FILL:CAPS" role="constant">
244
<varlistentry id="RAPTOR-FEATURE-LITERAL-FILL--CAPS" role="constant">
246
245
<term><literal>RAPTOR_FEATURE_LITERAL_FILL</literal></term>
247
246
<listitem><simpara> Fill color of literal nodes for
248
247
GraphViz DOT serializer.
249
248
</simpara></listitem>
251
<varlistentry id="RAPTOR-FEATURE-BNODE-FILL:CAPS" role="constant">
250
<varlistentry id="RAPTOR-FEATURE-BNODE-FILL--CAPS" role="constant">
252
251
<term><literal>RAPTOR_FEATURE_BNODE_FILL</literal></term>
253
252
<listitem><simpara> Fill color of blank nodes for
254
253
GraphViz DOT serializer.
255
254
</simpara></listitem>
257
<varlistentry id="RAPTOR-FEATURE-HTML-TAG-SOUP:CAPS" role="constant">
256
<varlistentry id="RAPTOR-FEATURE-HTML-TAG-SOUP--CAPS" role="constant">
258
257
<term><literal>RAPTOR_FEATURE_HTML_TAG_SOUP</literal></term>
259
258
<listitem><simpara> Use a lax HTML parser if an XML parser
260
259
fails when read HTML for GRDDL parser.
261
260
</simpara></listitem>
263
<varlistentry id="RAPTOR-FEATURE-MICROFORMATS:CAPS" role="constant">
262
<varlistentry id="RAPTOR-FEATURE-MICROFORMATS--CAPS" role="constant">
264
263
<term><literal>RAPTOR_FEATURE_MICROFORMATS</literal></term>
265
264
<listitem><simpara> Look for microformats for GRDDL parser.
266
265
</simpara></listitem>
268
<varlistentry id="RAPTOR-FEATURE-HTML-LINK:CAPS" role="constant">
267
<varlistentry id="RAPTOR-FEATURE-HTML-LINK--CAPS" role="constant">
269
268
<term><literal>RAPTOR_FEATURE_HTML_LINK</literal></term>
270
269
<listitem><simpara> Look for head <link> to type rdf/xml
271
270
for GRDDL parser.
272
271
</simpara></listitem>
274
<varlistentry id="RAPTOR-FEATURE-WWW-TIMEOUT:CAPS" role="constant">
273
<varlistentry id="RAPTOR-FEATURE-WWW-TIMEOUT--CAPS" role="constant">
275
274
<term><literal>RAPTOR_FEATURE_WWW_TIMEOUT</literal></term>
276
275
<listitem><simpara> Set timeout for internal WWW URI requests
277
276
for GRDDL parser.
278
277
</simpara></listitem>
280
<varlistentry id="RAPTOR-FEATURE-WRITE-BASE-URI:CAPS" role="constant">
279
<varlistentry id="RAPTOR-FEATURE-WRITE-BASE-URI--CAPS" role="constant">
281
280
<term><literal>RAPTOR_FEATURE_WRITE_BASE_URI</literal></term>
282
281
<listitem><simpara> Write <parameter>base</parameter> directive for Turtle/N3.
283
282
</simpara></listitem>
285
<varlistentry id="RAPTOR-FEATURE-WWW-HTTP-CACHE-CONTROL:CAPS" role="constant">
284
<varlistentry id="RAPTOR-FEATURE-WWW-HTTP-CACHE-CONTROL--CAPS" role="constant">
286
285
<term><literal>RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL</literal></term>
287
286
<listitem><simpara> HTTP Cache-Control: header
288
287
</simpara></listitem>
290
<varlistentry id="RAPTOR-FEATURE-WWW-HTTP-USER-AGENT:CAPS" role="constant">
289
<varlistentry id="RAPTOR-FEATURE-WWW-HTTP-USER-AGENT--CAPS" role="constant">
291
290
<term><literal>RAPTOR_FEATURE_WWW_HTTP_USER_AGENT</literal></term>
292
291
<listitem><simpara> HTTP User-Agent: header
293
292
</simpara></listitem>
295
<varlistentry id="RAPTOR-FEATURE-JSON-CALLBACK:CAPS" role="constant">
294
<varlistentry id="RAPTOR-FEATURE-JSON-CALLBACK--CAPS" role="constant">
296
295
<term><literal>RAPTOR_FEATURE_JSON_CALLBACK</literal></term>
297
296
<listitem><simpara> JSON serializer callback function.
298
297
</simpara></listitem>
300
<varlistentry id="RAPTOR-FEATURE-JSON-EXTRA-DATA:CAPS" role="constant">
299
<varlistentry id="RAPTOR-FEATURE-JSON-EXTRA-DATA--CAPS" role="constant">
301
300
<term><literal>RAPTOR_FEATURE_JSON_EXTRA_DATA</literal></term>
302
301
<listitem><simpara> JSON serializer extra top-level data
303
302
</simpara></listitem>
305
<varlistentry id="RAPTOR-FEATURE-RSS-TRIPLES:CAPS" role="constant">
304
<varlistentry id="RAPTOR-FEATURE-RSS-TRIPLES--CAPS" role="constant">
306
305
<term><literal>RAPTOR_FEATURE_RSS_TRIPLES</literal></term>
307
306
<listitem><simpara> Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples)
308
307
</simpara></listitem>
310
<varlistentry id="RAPTOR-FEATURE-ATOM-ENTRY-URI:CAPS" role="constant">
309
<varlistentry id="RAPTOR-FEATURE-ATOM-ENTRY-URI--CAPS" role="constant">
311
310
<term><literal>RAPTOR_FEATURE_ATOM_ENTRY_URI</literal></term>
312
311
<listitem><simpara> Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found.
313
312
</simpara></listitem>
315
<varlistentry id="RAPTOR-FEATURE-LAST:CAPS" role="constant">
314
<varlistentry id="RAPTOR-FEATURE-PREFIX-ELEMENTS--CAPS" role="constant">
315
<term><literal>RAPTOR_FEATURE_PREFIX_ELEMENTS</literal></term>
316
<listitem><simpara> Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed.
317
</simpara></listitem>
319
<varlistentry id="RAPTOR-FEATURE-LAST--CAPS" role="constant">
316
320
<term><literal>RAPTOR_FEATURE_LAST</literal></term>
317
321
<listitem><simpara> Internal
318
322
</simpara></listitem>
320
324
</variablelist></refsect2>
321
325
<refsect2 id="raptor-get-feature-count" role="function">
322
326
<title>raptor_get_feature_count ()</title>
323
<indexterm zone="raptor-get-feature-count"><primary>raptor_get_feature_count</primary></indexterm><programlisting>unsigned <link linkend="int">int</link> raptor_get_feature_count (void);</programlisting>
327
<indexterm zone="raptor-get-feature-count"><primary sortas="raptor_get_feature_count">raptor_get_feature_count</primary></indexterm><programlisting>unsigned <link linkend="int">int</link> raptor_get_feature_count (void);</programlisting>
325
329
Get the count of features defined.
328
This is prefered to the compile time-only symbol <link linkend="RAPTOR-FEATURE-LAST:CAPS"><type>RAPTOR_FEATURE_LAST</type></link>
332
This is prefered to the compile time-only symbol <link linkend="RAPTOR-FEATURE-LAST--CAPS"><type>RAPTOR_FEATURE_LAST</type></link>
329
333
and returns a count of the number of features which is
330
<link linkend="RAPTOR-FEATURE-LAST:CAPS"><type>RAPTOR_FEATURE_LAST</type></link>+1.</para>
334
<link linkend="RAPTOR-FEATURE-LAST--CAPS"><type>RAPTOR_FEATURE_LAST</type></link>+1.</para>
333
336
</para><variablelist role="params">
334
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> count of features in the <link linkend="raptor-feature"><type>raptor_feature</type></link> enumeration
337
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> count of features in the <link linkend="raptor-feature"><type>raptor_feature</type></link> enumeration
335
338
</simpara></listitem></varlistentry>
336
339
</variablelist></refsect2>
337
340
<refsect2 id="raptor-features-enumerate" role="function">
338
341
<title>raptor_features_enumerate ()</title>
339
<indexterm zone="raptor-features-enumerate"><primary>raptor_features_enumerate</primary></indexterm><programlisting><link linkend="int">int</link> raptor_features_enumerate (const <link linkend="raptor-feature">raptor_feature</link> feature,
342
<indexterm zone="raptor-features-enumerate"><primary sortas="raptor_features_enumerate">raptor_features_enumerate</primary></indexterm><programlisting><link linkend="int">int</link> raptor_features_enumerate (const <link linkend="raptor-feature">raptor_feature</link> feature,
340
343
const <link linkend="char">char</link> **name,
341
344
<link linkend="raptor-uri">raptor_uri</link> **uri,
342
345
const <link linkend="char">char</link> **label);</programlisting>
344
347
Get list of syntax features.
347
If uri is not NULL, a pointer toa new raptor_uri is returned
348
that must be freed by the caller with <link linkend="raptor-free-uri"><function>raptor_free_uri()</function></link>.</para>
350
If uri is not NULL, a pointer to a new raptor_uri is returned
351
that must be freed by the caller with <link linkend="raptor-free-uri"><function>raptor_free_uri()</function></link>.
354
<link linkend="raptor-init"><function>raptor_init()</function></link> MUST have been called before calling this function.
355
Use <link linkend="raptor-features-enumerate-v2"><function>raptor_features_enumerate_v2()</function></link> if using raptor_world APIs.</para>
351
357
</para><variablelist role="params">
352
<varlistentry><term><parameter>feature</parameter> :</term>
358
<varlistentry><term><parameter>feature</parameter> :</term>
353
359
<listitem><simpara> feature enumeration (0+)
354
360
</simpara></listitem></varlistentry>
355
<varlistentry><term><parameter>name</parameter> :</term>
361
<varlistentry><term><parameter>name</parameter> :</term>
356
362
<listitem><simpara> pointer to store feature short name (or NULL)
357
363
</simpara></listitem></varlistentry>
358
<varlistentry><term><parameter>uri</parameter> :</term>
364
<varlistentry><term><parameter>uri</parameter> :</term>
359
365
<listitem><simpara> pointer to store feature URI (or NULL)
360
366
</simpara></listitem></varlistentry>
361
<varlistentry><term><parameter>label</parameter> :</term>
367
<varlistentry><term><parameter>label</parameter> :</term>
362
368
<listitem><simpara> pointer to feature label (or NULL)
363
369
</simpara></listitem></varlistentry>
364
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> 0 on success, <0 on failure, >0 if feature is unknown
370
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> 0 on success, <0 on failure, >0 if feature is unknown
365
371
</simpara></listitem></varlistentry>
366
372
</variablelist></refsect2>
367
373
<refsect2 id="raptor-feature-from-uri" role="function">
368
374
<title>raptor_feature_from_uri ()</title>
369
<indexterm zone="raptor-feature-from-uri"><primary>raptor_feature_from_uri</primary></indexterm><programlisting><link linkend="raptor-feature">raptor_feature</link> raptor_feature_from_uri (<link linkend="raptor-uri">raptor_uri</link> *uri);</programlisting>
375
<indexterm zone="raptor-feature-from-uri"><primary sortas="raptor_feature_from_uri">raptor_feature_from_uri</primary></indexterm><programlisting><link linkend="raptor-feature">raptor_feature</link> raptor_feature_from_uri (<link linkend="raptor-uri">raptor_uri</link> *uri);</programlisting>
371
377
Turn a feature URI into an feature enum.
374
The allowed feature URIs are available via <link linkend="raptor-features-enumerate"><function>raptor_features_enumerate()</function></link>.</para>
380
The allowed feature URIs are available via <link linkend="raptor-features-enumerate"><function>raptor_features_enumerate()</function></link>.
383
<link linkend="raptor-init"><function>raptor_init()</function></link> MUST have been called before calling this function.
384
Use <link linkend="raptor-feature-from-uri-v2"><function>raptor_feature_from_uri_v2()</function></link> if using raptor_world APIs.</para>
377
386
</para><variablelist role="params">
378
<varlistentry><term><parameter>uri</parameter> :</term>
387
<varlistentry><term><parameter>uri</parameter> :</term>
379
388
<listitem><simpara> feature URI
380
389
</simpara></listitem></varlistentry>
381
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> < 0 if the feature is unknown
390
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> < 0 if the feature is unknown
382
391
</simpara></listitem></varlistentry>
383
392
</variablelist></refsect2>
384
393
<refsect2 id="raptor-feature-value-type" role="function">
385
394
<title>raptor_feature_value_type ()</title>
386
<indexterm zone="raptor-feature-value-type"><primary>raptor_feature_value_type</primary></indexterm><programlisting><link linkend="int">int</link> raptor_feature_value_type (const <link linkend="raptor-feature">raptor_feature</link> feature);</programlisting>
395
<indexterm zone="raptor-feature-value-type"><primary sortas="raptor_feature_value_type">raptor_feature_value_type</primary></indexterm><programlisting><link linkend="int">int</link> raptor_feature_value_type (const <link linkend="raptor-feature">raptor_feature</link> feature);</programlisting>
388
397
Get the type of a features.