summaryrefslogtreecommitdiffstats
path: root/docs/html/raptor2-section-world.html
blob: f14948a01933df5d74e9b713bd028fc8c973f742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>section-world: 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="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="serializer-dot.html" title="GraphViz dot serializer (name dot)">
<link rel="next" href="raptor2-section-general.html" title="section-general">
<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">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#raptor2-section-world.description" class="shortcut">Description</a></span>
</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="reference-manual.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="serializer-dot.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="raptor2-section-general.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="raptor2-section-world"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor2-section-world.top_of_page"></a>section-world</span></h2>
<p>section-world</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="raptor2-section-world.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="raptor2-section-world.html#raptor-new-world" title="raptor_new_world">raptor_new_world</a></td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-open" title="raptor_world_open ()">raptor_world_open</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-free-world" title="raptor_free_world ()">raptor_free_world</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-set-flag" title="raptor_world_set_flag ()">raptor_world_set_flag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-set-libxslt-security-preferences" title="raptor_world_set_libxslt_security_preferences ()">raptor_world_set_libxslt_security_preferences</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-set-log-handler" title="raptor_world_set_log_handler ()">raptor_world_set_log_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-get-parser-description" title="raptor_world_get_parser_description ()">raptor_world_get_parser_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-is-parser-name" title="raptor_world_is_parser_name ()">raptor_world_is_parser_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-guess-parser-name" title="raptor_world_guess_parser_name ()">raptor_world_guess_parser_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-get-serializer-description" title="raptor_world_get_serializer_description ()">raptor_world_get_serializer_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-is-serializer-name" title="raptor_world_is_serializer_name ()">raptor_world_is_serializer_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">unsigned <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-generate-bnodeid" title="raptor_world_generate_bnodeid ()">raptor_world_generate_bnodeid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-set-generate-bnodeid-handler" title="raptor_world_set_generate_bnodeid_handler ()">raptor_world_set_generate_bnodeid_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-set-generate-bnodeid-parameters" title="raptor_world_set_generate_bnodeid_parameters ()">raptor_world_set_generate_bnodeid_parameters</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-get-parsers-count" title="raptor_world_get_parsers_count ()">raptor_world_get_parsers_count</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-world.html#raptor-world-get-serializers-count" title="raptor_world_get_serializers_count ()">raptor_world_get_serializers_count</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-world.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world">raptor_world</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="raptor2-section-world.html#raptor-world-flag" title="enum raptor_world_flag">raptor_world_flag</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-world.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="raptor2-section-world.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="raptor-new-world"></a><h3>raptor_new_world</h3>
<pre class="programlisting">#define raptor_new_world() raptor_new_world_internal(RAPTOR_VERSION)
</pre>
<p>Allocate a new raptor_world object.</p>
<p>Allocation of the world and initialization are decoupled to allow
changing settings on the world object before init.</p>
<p>Settings and configuration of the world may be made after creating
the object and before the world is initialized using methods such
as <a class="link" href="raptor2-section-world.html#raptor-world-set-flag" title="raptor_world_set_flag ()"><code class="function">raptor_world_set_flag()</code></a>, <a class="link" href="raptor2-section-world.html#raptor-world-set-log-handler" title="raptor_world_set_log_handler ()"><code class="function">raptor_world_set_log_handler()</code></a>,
<a class="link" href="raptor2-section-world.html#raptor-world-set-generate-bnodeid-handler" title="raptor_world_set_generate_bnodeid_handler ()"><code class="function">raptor_world_set_generate_bnodeid_handler()</code></a>.  Some configuration
may not be changed after initialization.</p>
<p>The raptor_world is initialized with <a class="link" href="raptor2-section-world.html#raptor-world-open" title="raptor_world_open ()"><code class="function">raptor_world_open()</code></a>.</p>
<div class="refsect3">
<a name="raptor-new-world.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>version_decimal</p></td>
<td class="parameter_description"><p>raptor version as a decimal integer as defined by the macro <a class="link" href="raptor2-section-general.html#RAPTOR-VERSION:CAPS" title="RAPTOR_VERSION"><span class="type">RAPTOR_VERSION</span></a> and static int <a class="link" href="raptor2-section-general.html#raptor-version-decimal" title="raptor_version_decimal"><span class="type">raptor_version_decimal</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-new-world.returns"></a><h4>Returns</h4>
<p> uninitialized raptor_world object or NULL on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-open"></a><h3>raptor_world_open ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_open (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>);</pre>
<p>Initialise the raptor library.</p>
<p>Initializes a <a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> object created by <a class="link" href="raptor2-section-world.html#raptor-new-world" title="raptor_new_world"><code class="function">raptor_new_world()</code></a>.
Allocation and initialization are decoupled to allow
changing settings on the world object before init.</p>
<p>The initialized world object is used with subsequent raptor API calls.</p>
<div class="refsect3">
<a name="raptor-world-open.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>raptor_world object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-open.returns"></a><h4>Returns</h4>
<p> non-0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-free-world"></a><h3>raptor_free_world ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_free_world (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>);</pre>
<p>Terminate the raptor library.</p>
<p>Destroys the raptor_world object and all related information.</p>
<div class="refsect3">
<a name="raptor-free-world.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>raptor_world object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-set-flag"></a><h3>raptor_world_set_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_set_flag (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                       <em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world-flag" title="enum raptor_world_flag"><span class="type">raptor_world_flag</span></a> flag</code></em>,
                       <em class="parameter"><code><span class="type">int</span> value</code></em>);</pre>
<p>Set library-wide configuration</p>
<p>This function is used to control raptor-wide options across
classes.  These options must be set before <a class="link" href="raptor2-section-world.html#raptor-world-open" title="raptor_world_open ()"><code class="function">raptor_world_open()</code></a> is
called explicitly or implicitly (by creating a raptor object).
There is no enumeration function for these flags because they are
not user options and must be set before the library is
initialised.  For similar reasons, there is no get function.</p>
<p>See the <a href="raptor2-section-world.html#raptor-world-flag"><span class="type">raptor_world_flags</span></a> documentation for full details of
what the flags mean.</p>
<div class="refsect3">
<a name="raptor-world-set-flag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>flag</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-set-flag.returns"></a><h4>Returns</h4>
<p> 0 on success, non-0 on failure: &lt;0 on errors (-1 if flag is unknown, -2 if value is illegal) and &gt;0 if world is already opened</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-set-libxslt-security-preferences"></a><h3>raptor_world_set_libxslt_security_preferences ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_set_libxslt_security_preferences
                               (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                <em class="parameter"><code><span class="type">void</span> *security_preferences</code></em>);</pre>
<p>Set libxslt security preferences policy object</p>
<p>The <em class="parameter"><code>security_preferences</code></em>
 object will NOT become owned by
<a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a>.</p>
<p>If libxslt is compiled into the library, <em class="parameter"><code>security_preferences</code></em>

should be an <span class="type">xsltSecurityPrefsPtr</span> and will be used to call
<code class="function">xsltSetCtxtSecurityPrefs()</code> when an XSLT engine is initialised.
If <em class="parameter"><code>security_preferences</code></em>
 is NULL, this will disable all raptor's
calls to <code class="function">xsltSetCtxtSecurityPrefs()</code>.</p>
<p>If libxslt is not compiled in, the object set here is not used.</p>
<div class="refsect3">
<a name="raptor-world-set-libxslt-security-preferences.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>security_preferences</p></td>
<td class="parameter_description"><p>security preferences (an <span class="type">xsltSecurityPrefsPtr</span>) or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-set-libxslt-security-preferences.returns"></a><h4>Returns</h4>
<p> 0 on success, non-0 on failure: &lt;0 on errors and &gt;0 if world is already opened</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-set-log-handler"></a><h3>raptor_world_set_log_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_set_log_handler (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                              <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                              <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-log-handler" title="raptor_log_handler ()"><span class="type">raptor_log_handler</span></a> handler</code></em>);</pre>
<p>Set the message (error, warning, info) handling function.</p>
<p>The function will receive callbacks when messages are generated</p>
<div class="refsect3">
<a name="raptor-world-set-log-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data to pass to function</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>pointer to the function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-set-log-handler.returns"></a><h4>Returns</h4>
<p> non-0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-get-parser-description"></a><h3>raptor_world_get_parser_description ()</h3>
<pre class="programlisting">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
raptor_world_get_parser_description (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                     <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);</pre>
<p>Get parser descriptive syntax information</p>
<div class="refsect3">
<a name="raptor-world-get-parser-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>counter</p></td>
<td class="parameter_description"><p>index into the list of parsers</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-get-parser-description.returns"></a><h4>Returns</h4>
<p> description or NULL if counter is out of range</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-is-parser-name"></a><h3>raptor_world_is_parser_name ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_is_parser_name (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                             <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Check the name of a parser is known.</p>
<div class="refsect3">
<a name="raptor-world-is-parser-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the syntax name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-is-parser-name.returns"></a><h4>Returns</h4>
<p> non 0 if name is a known syntax name</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-guess-parser-name"></a><h3>raptor_world_guess_parser_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
raptor_world_guess_parser_name (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                <em class="parameter"><code><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *uri</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
                                <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
                                <em class="parameter"><code>const unsigned <span class="type">char</span> *identifier</code></em>);</pre>
<p>Guess a parser name for content.</p>
<p>Find a parser by scoring recognition of the syntax by a block of
characters, the content identifier or a mime type.  The content
identifier is typically a filename or URI or some other identifier.</p>
<p>If the guessing finds only low scores, NULL will be returned.</p>
<div class="refsect3">
<a name="raptor-world-guess-parser-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>URI identifying the syntax (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime_type</p></td>
<td class="parameter_description"><p>mime type identifying the content (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer of content to guess (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>length of buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>identifier</p></td>
<td class="parameter_description"><p>identifier of content (or NULL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-guess-parser-name.returns"></a><h4>Returns</h4>
<p> a parser name or NULL if no guess could be made</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-get-serializer-description"></a><h3>raptor_world_get_serializer_description ()</h3>
<pre class="programlisting">const <a class="link" href="raptor2-section-general.html#raptor-syntax-description" title="raptor_syntax_description"><span class="returnvalue">raptor_syntax_description</span></a> *
raptor_world_get_serializer_description
                               (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                <em class="parameter"><code>unsigned <span class="type">int</span> counter</code></em>);</pre>
<p>Get serializer descriptive syntax information</p>
<div class="refsect3">
<a name="raptor-world-get-serializer-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>counter</p></td>
<td class="parameter_description"><p>index into the list of serializers</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-get-serializer-description.returns"></a><h4>Returns</h4>
<p> description or NULL if counter is out of range</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-is-serializer-name"></a><h3>raptor_world_is_serializer_name ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_is_serializer_name (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                 <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Check name of a serializer.</p>
<div class="refsect3">
<a name="raptor-world-is-serializer-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>raptor_world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the syntax name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-is-serializer-name.returns"></a><h4>Returns</h4>
<p> non 0 if name is a known syntax name</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-generate-bnodeid"></a><h3>raptor_world_generate_bnodeid ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">char</span> *
raptor_world_generate_bnodeid (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>);</pre>
<p>Generate an new blank node ID</p>
<div class="refsect3">
<a name="raptor-world-generate-bnodeid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>raptor_world object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-generate-bnodeid.returns"></a><h4>Returns</h4>
<p> newly allocated generated ID or NULL on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-set-generate-bnodeid-handler"></a><h3>raptor_world_set_generate_bnodeid_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_world_set_generate_bnodeid_handler
                               (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-generate-bnodeid-handler" title="raptor_generate_bnodeid_handler ()"><span class="type">raptor_generate_bnodeid_handler</span></a> handler</code></em>);</pre>
<p>Set the generate ID handler function.</p>
<p>Sets the function to generate IDs for the library.  The handler is
called with the <em class="parameter"><code>user_data</code></em>
 parameter.</p>
<p>The final argument of the callback method is user_bnodeid, the value of
the rdf:nodeID attribute that the user provided if any (or NULL).
It can either be returned directly as the generated value when present or
modified.  The passed in value must be <code class="function">free()</code>d if it is not used.</p>
<p>If handler is NULL, the default method is used</p>
<div class="refsect3">
<a name="raptor-world-set-generate-bnodeid-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> world object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data pointer for callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler</p></td>
<td class="parameter_description"><p>generate ID callback function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-set-generate-bnodeid-parameters"></a><h3>raptor_world_set_generate_bnodeid_parameters ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
raptor_world_set_generate_bnodeid_parameters
                               (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>,
                                <em class="parameter"><code><span class="type">char</span> *prefix</code></em>,
                                <em class="parameter"><code><span class="type">int</span> base</code></em>);</pre>
<p>Set default ID generation parameters.</p>
<p>Sets the parameters for the default algorithm used to generate IDs.
The default algorithm uses both <em class="parameter"><code>prefix</code></em>
 and <em class="parameter"><code>base</code></em>
 to generate a new
identifier.   The exact identifier generated is not guaranteed to
be a strict concatenation of <em class="parameter"><code>prefix</code></em>
 and <em class="parameter"><code>base</code></em>
 but will use both
parts. The <em class="parameter"><code>prefix</code></em>
 parameter is copied to generate an ID.</p>
<p>For finer control of the generated identifiers, use
<a class="link" href="raptor2-section-world.html#raptor-world-set-generate-bnodeid-handler" title="raptor_world_set_generate_bnodeid_handler ()"><code class="function">raptor_world_set_generate_bnodeid_handler()</code></a>.</p>
<p>If <em class="parameter"><code>prefix</code></em>
 is NULL, the default prefix is used (currently "genid")
If <em class="parameter"><code>base</code></em>
 is less than 1, it is initialised to 1.</p>
<div class="refsect3">
<a name="raptor-world-set-generate-bnodeid-parameters.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>prefix string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base</p></td>
<td class="parameter_description"><p>integer base identifier</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-get-parsers-count"></a><h3>raptor_world_get_parsers_count ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_get_parsers_count (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>);</pre>
<p>Get number of parsers</p>
<div class="refsect3">
<a name="raptor-world-get-parsers-count.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-get-parsers-count.returns"></a><h4>Returns</h4>
<p> number of parsers or &lt;0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-get-serializers-count"></a><h3>raptor_world_get_serializers_count ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_world_get_serializers_count (<em class="parameter"><code><a class="link" href="raptor2-section-world.html#raptor-world" title="raptor_world"><span class="type">raptor_world</span></a> *world</code></em>);</pre>
<p>Get number of serializers</p>
<div class="refsect3">
<a name="raptor-world-get-serializers-count.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>world</p></td>
<td class="parameter_description"><p>world object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-world-get-serializers-count.returns"></a><h4>Returns</h4>
<p> number of serializers or &lt;0 on failure</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="raptor2-section-world.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="raptor-world"></a><h3>raptor_world</h3>
<pre class="programlisting">typedef struct raptor_world_s raptor_world;
</pre>
<p>Raptor world class.</p>
</div>
<hr>
<div class="refsect2">
<a name="raptor-world-flag"></a><h3>enum raptor_world_flag</h3>
<p>Raptor world flags</p>
<p>These are used by <a href="raptor2-section-world.html#raptor-world-set-flag"><code class="function">raptor_world_set_flags()</code></a> to control raptor-wide
options across classes.  These must be set before
<a class="link" href="raptor2-section-world.html#raptor-world-open" title="raptor_world_open ()"><code class="function">raptor_world_open()</code></a> is called explicitly or implicitly (by
creating a raptor object).  There is no enumeration function for
these flags because they are not user options and must be set
before the library is initialised.  For similar reasons, there is
no get function.</p>
<p>If any libxml handler saving/restoring is enabled, any existing
handler and context is saved before parsing and restored
afterwards.  Otherwise, no saving/restoring is performed.</p>
<div class="refsect3">
<a name="raptor-world-flag.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-WORLD-FLAG-LIBXML-GENERIC-ERROR-SAVE:CAPS"></a>RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE</p></td>
<td class="enum_member_description">
<p>if set (non-0 value) - save/restore the libxml generic error handler when raptor library initializes (default set)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-WORLD-FLAG-LIBXML-STRUCTURED-ERROR-SAVE:CAPS"></a>RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE</p></td>
<td class="enum_member_description">
<p>if set (non-0 value) - save/restore the libxml structured error handler when raptor library terminates (default set)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-WORLD-FLAG-URI-INTERNING:CAPS"></a>RAPTOR_WORLD_FLAG_URI_INTERNING</p></td>
<td class="enum_member_description">
<p>if set (non-0 value) - each URI is saved interned in-memory and reused (default set)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RAPTOR-WORLD-FLAG-WWW-SKIP-INIT-FINISH:CAPS"></a>RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH</p></td>
<td class="enum_member_description">
<p>if set (non-0 value) the raptor will neither initialise or terminate the lower level WWW library.  Usually in raptor initialising either curl_global_init (for libcurl) are called and in raptor cleanup, curl_global_cleanup is called.   This flag allows the application finer control over these libraries such as setting other global options or potentially calling and terminating raptor several times.  It does mean that applications which use this call must do their own extra work in order to allocate and free all resources to the system.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>