This repository has been archived by the owner on Sep 12, 2018. It is now read-only.
forked from dajobe/raptor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RELEASE.html
4046 lines (3016 loc) · 141 KB
/
RELEASE.html
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
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Raptor RDF Syntax Library - Release Notes</title>
</head>
<body>
<h1 style="text-align:center">Raptor RDF Syntax Library - Release Notes</h1>
<h2 id="rel2_0_8"><a name="rel2_0_8">Raptor2 2.0.8 changes</a></h2>
<p>Not yet released.
</p>
<h2 id="rel2_0_7"><a name="rel2_0_7">Raptor2 2.0.7 changes</a></h2>
<p>CVE-2012-0037 fixed</p>
<p>Issues Fixed:</p>
<ul>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=448">0000448</a>: Turtle parser does not return error status from turtle_parse_chunk()</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=469">0000469</a>: Allow rapper to bypass server SSL certs checks in libcurl</li>
</ul>
<p>Removed Expat support since expat has not had a release in years
and libxml2 works well. This allows some code simplification.
Updated <code>configure</code> so that if Raptor is configured with
no parser that requires an XML parser, libxml2 will not be required.
</p>
<p>Removed internal Unicode NFC checking code used for checking
RDF/XML literals conformance which was expensive to check and a large
of compiled-in static dataset that was rather out of date. Replaced
with optional compiled use of <a href="http://www.icu-project.org/">ICU</a>.
If ICU is not explicitly configured, no literal checking is done.</p>
<h3>Options changes</h3>
<p>Added new options:</p>
<dl>
<dt><code>RAPTOR_OPTION_NO_FILE</code><br/></dt>
<dd>Deny file requests during parsing. Enabled by default.</dd>
<dt><code>RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES</code><br/></dt>
<dd>Allow loading of XML external entity loading. Disabled by
default.</dd>
<dt><code>RAPTOR_OPTION_WWW_SSL_VERIFY_PEER</code><br/></dt>
<dd>Controls verifying an SSL peer during parsing / WWW. Takes an
integer value: non-0 to verify peer SSL certificate (default
1).</dd>
<dt><code>RAPTOR_OPTION_WWW_SSL_VERIFY_HOST</code><br/></dt>
<dd>Controls verifying an SSL host during parsing / WWW. Takes an
integer value: 0 none, 1 CN match, 2 host match (default). Other
values are ignored.</dd>
</dl>
<h3>Parser class changes</h3>
<p>The RDF/XML, RSS Tag Soup and RDFa parsers now pass on network,
file and entity loading parser options to the internal SAX2 to enable
enforcing of network, file and entity loading policy.</p>
<p>RDF/JSON parser handles an API change between YAJL V1 and V2.
</p>
<p>Turtle parser now returns parser errors to
<code>raptor_parse_chunk()</code>.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=488">Issue #0000488</a>
</p>
<h3>SAX2 class changes</h3>
<p>Added <code>raptor_sax2_set_uri_filter()</code> to set a URI
filter for any SAX2 calls that do internal lookups of URIs.
</p>
<p>Control file and network loading inside SAX2. Option
<code>RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES</code> now enforces
loading external XML entities and is by default enabled. If enabled,
<code>RAPTOR_OPTION_NO_FILE</code> and
<code>RAPTOR_OPTION_NO_NET</code> are also checked. All URIs loaded
are also passed through any URI filter, if set by
<code>raptor_sax2_set_uri_filter()</code>.
</p>
<h3>URI class changes</h3>
<p>Added new URI constructor
<code>raptor_new_uri_from_uri_or_file_string()</code>
to build a URI from a URI string or a filename string, normalizing
the result to a <code>file:</code> URI.
</p>
<p>Added
<code>raptor_uri_uri_string_to_counted_filename_fragment()</code> to
turn a URI string to a filename and URI fragment along with string
output string counts.
</p>
<p>Added utility methods for checking if a file: URI or filename is a
file that exists:
<code>raptor_uri_file_exists()</code> and
<code>raptor_uri_filename_exists()</code>
</p>
<h3>WWW class changes</h3>
<p>Added <code>raptor_www_set_ssl_verify_options()</code> to set SSL
verify options.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=469">Issue# 0000469</a>.
</p>
<p>The <code>raptor_www_fetch()</code> call now returns the status
from any URI filter that returns a non-0 response.
</p>
<h3>Build changes</h3>
<p>Added <code>--with-icu-config=</code><em>PATH</em> option
to enable use of ICU for NFC checking.</p>
<p>Requires automake 1.11.2+ for <code>-Wextra-portability</code></p>
<p><code>configure</code> uses <code>AM_PROG_AR</code> to make
automake <code>-Wextra-portability</code> happy.
</p>
<h2 id="rel2_0_6"><a name="rel2_0_6">Raptor2 2.0.6 changes</a></h2>
<p>Fixed expat support which was broken in 2.0.5</p>
<p>Handle libCurl SSL options before 7.16.4 (that's 2007) since old
libcurl is still around on Enterprise (that means old) linux systems.
</p>
<h3>Sequence Changes</h3>
<p>Added utility functions to swap elements, reverse the sequence and
generate permuations:</p>
<pre>
int raptor_sequence_swap(raptor_sequence* seq,
int i, int j);
int raptor_sequence_reverse(raptor_sequence* seq,
int start_index, int length);
int raptor_sequence_next_permutation(raptor_sequence *seq,
raptor_data_compare_handler compare);
</pre>
<h2 id="rel2_0_5"><a name="rel2_0_5">Raptor2 2.0.5 changes</a></h2>
<p>Issues Fixed:</p>
<ul>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=465">0000465</a>: c99 snprintf usage</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=476">0000476</a>: Add Format URIs to raptor_syntax_descriptions</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=479">0000479</a>: raptor 2.0.4 : -i nquads fails to treat the context term as optional bugs.librdf.org</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=481">0000481</a>: Invalid unicode characters cause raptor to emit infinite output while converting n-quads to n-triples</li>
</ul>
<h3>Parser class changes</h3>
<p>Updated all parser URIs to use the
<a href="http://www.w3.org/ns/formats/">W3C Format URIs</a>
as the primary URIs. Existing URIs become aliases. (Nicholas J Humfrey)
</p>
<p>GRDDL parser: Correctly set the base_uri when resolving the
sheet URI.</p>
<p>N-Quads parser: Make context optional. (Lauri Aalto)
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=479">Issue #0000479</a>.
<br />
When guessing formats, make N-Quads always beat N-Triples since
since now all ntriples parse fine with the nquads parser. (Lauri Aalto)
</p>
<p>RDFA parser: fix when building with 64-bit systems to prevent
value truncation.</p>
<p>Turtle parser: now uses the official <em>text/turtle</em> mime
type in the syntax recognizing code.
</p>
<h3>Serializer class changes</h3>
<p>Updated all serializer URIs to use the
<a href="http://www.w3.org/ns/formats/">W3C Format URIs</a>
as the primary URIs. Existing URIs become aliases. (Nicholas J Humfrey)
</p>
<p>Turtle serializer now uses the official <em>text/turtle</em> mime
type in the syntax recognizing code.
Do not generate infinite output when the input Unicode UTF-8 encoding
is bad.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=481">Issue #000481</a>.
</p>
<h3>Unicode class changes</h3>
<p>Added new utility functions for calculating number of Unicode
characters in a UTF-8
string <code>raptor_unicode_utf8_strlen()</code> and getting a subset
of a UTF-8 string <code>raptor_unicode_utf8_substr()</code>:
</p>
<pre>
int raptor_unicode_utf8_strlen(const unsigned char *string,
size_t length);
size_t raptor_unicode_utf8_substr(
unsigned char* dest, size_t* dest_length_p,
const unsigned char* src, size_t src_length,
int startingLoc, int length);
</pre>
<h3>URI class changes</h3>
<p><code>raptor_uri_string_to_relative_uri_string()</code> now
compares URI paths not files. (Joe Presbrey)
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=472">Issue #0000472</a>
</p>
<h3>Build changes</h3>
<p>The library no longer needs <code>trunc()</code>,
<code>lround()</code>, <code>round()</code> or anything else from
libm. Removed the checks for these functions from
<code>configure</code>.
</p>
<p><code>configure</code> no longer enables debug messages by default
for <code>--enable-maintainer-mode</code> but now requires the
<code>--enable-debug</code> option to be given.
</p>
<h3>Other changes</h3>
<p>Records GIT version in the version string when building from GIT
sources with <code>--enable-maintainer-mode</code>. This makes it
clearer when an non-released version is being used.
</p>
<p>Added internal <code>raptor_format_integer()</code> which enabled
the removal of all internal use of <code>snprintf()</code>.
</p>
<p>Added <code>raptor_vsnprintf2()</code> deprecating
<code>raptor_vsnprintf()</code> which does not actually have the
vsnprintf() calling contention. Added <code>raptor_snprintf()</code>
with snprintf() calling convention. Added
<code>raptor_vasprintf()</code> with vasprintf() (GNU) calling
convention.
</p>
<pre>
int raptor_vsnprintf2(char *buffer, size_t size,
const char *format, va_list arguments);
int raptor_snprintf(char *buffer, size_t size, const char *format, ...);
int raptor_vasprintf(char **ret, const char *format, va_list arguments);
</pre>
<p><code>raptor_locator_format()</code> now picks a large enough
buffer size if <code>snprintf()</code> is likely not portable, when
HAVE_C99_VSNPRINTF is not defined.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=465">Issue #0000465</a>
</p>
<p>Internal code style changes for how allocation is done and casting
with new macros.</p>
<blockquote>
<p>RAPTOR_GOOD_CAST: code checks or logic ensures cast will not
truncate</p>
<p>RAPTOR_BAD_CAST: value may be truncated; may require API
change/break. Might be unrealistic e.g. a >4G error message,
qname prefix.</p>
<p>Some good uses:</p>
<ul>
<li>narrowing a known, checked unicode char to a U16</li>
</ul>
<p>Some 'bad' uses:</p>
<ul>
<li>only handing error messages, literal language, qname prefixes of
a max len constrained by int</li>
<li>passing in data to libxml constrained by int max len</li>
<li>locator column field constrained to int size</li>
</ul>
<p>Some bad uses:</p>
<ul>
<li>iostream read_bytes and write-bytes methods return int but could
easily return a lot more in the size_t range (compare to fread).
API change needed.</li>
<li>locator byte field constrained to int size. should be size_t</li>
<li>raptor_nfc_check returns int offset into a buffer that could
be larger</li>
<li>raptor_ntriples_parser_context changed line_length and offset
to size_t</li>
<li>raptor_turtle_parser changed buffer_length to size_t</li>
</ul>
</blockquote>
<p>Updated code to use <code>size_t</code> for sizes such as those
from <code>strlen()</code> and <code>ptrdiff_t</code> for pointer
differences so that on 64-bit architectures, values are not
potentially truncated to size of int.
</p>
<h2 id="rel2_0_4"><a name="rel2_0_4">Raptor2 2.0.4 changes</a></h2>
<p>Issues Fixed:</p>
<ul>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=308">0000308</a>: undefined reference to round and trunc while cross compiling for mipsel</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=449">0000449</a>: ntriples serializer and parser inconsistent w.r.t. _ in name tokens</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=451">0000451</a>: Incorrect qname definition in TRiG parser</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=455">0000455</a>: Incorrect AVL tree operations. [ with fix ]</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=456">0000456</a>: raptor-2.0.3 fails to build against yajl-2.0.2 API</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=457">0000457</a>: raptor-2.0.3 fails to build with curl-7.21.7</li>
</ul>
<h3>Parser class changes</h3>
<p>The <code>raptor_option</code> enumeration gains values for
setting SSL client side certificates:
<code>RAPTOR_OPTION_WWW_CERT_FILENAME</code> for the certificate
filename, <code>RAPTOR_OPTION_WWW_CERT_TYPE</code> for the
certificate type and <code>RAPTOR_OPTION_WWW_CERT_PASSPHRASE</code>
for the certificate passphrase.
</p>
<p><code>raptor_parser_parse_uri_with_connection()</code> (which is
called by <code>raptor_parse_uri()</code>) now uses
<code>raptor_www_set_ssl_cert_options()</code> to turn the parser
options above into settings on the WWW object.
</p>
<p>RDF/JSON parser: Gains support for building with
<a href="http://lloyd.github.com/yajl/">YAJL</a> V2. Note that YAJL
V1 and V2 both install the same library name 'libyajl' even though
they have different ABI and APIs.</p>
<p>TRiG parser: Fixed to support the legal <em>uri</em> <code>:
{</code> ... <code>}</code> syntax naming a graph where the
'<code>:</code>' is optional.
</p>
<p>Turtle parser: Modified to not include the internal
<code>input()</code> function in the lexer which is never needed.
</p>
<h3>Serializer class changes</h3>
<p>N-Triples and Turtle serializers: Now
use <code>raptor_bnodeid_ntriples_write()</code> to always write
legal blank node IDs.
</p>
<h3>WWW class changes</h3>
<p>Added support for <code>raptor_www</code> to handle setting SSL
client certificate options during WWW retrieval.
</p>
<p>Added <code>raptor_www_set_ssl_cert_options()</code> method to set
the SSL client certificates on a WWW object.
</p>
<h3>Other changes</h3>
<p>Make Raptor build against Curl 7.21.7 which removed a header file
that was made an empty file in the libcurl source code on April 26
2004 around version 7.12.0 which is now the minimum version Raptor
supports..
</p>
<p>Fixed an AVL Tree issue during deletion that messes up some pointers.
Patch from 'v-for-vandal'. Thanks.
</p>
<p>Added a utility function
<code>raptor_bnodeid_ntriples_write()</code> to write a N-Triples
blank node ID in legal form, replacing any letters not in the allowed
set.</p>
<p>Expanded GCC warnings and corrected a few internal uses
of <code>int</code> when <code>size_t</code> was meant. Others
remain.
</p>
<p>Reduced stack use of <code>raptor_www_file_handle_fetch()</code>
and <code>raptor_parser_parse_iostream()</code> by moving I/O buffer
to the www or parser objects respectively.
</p>
<h2 id="rel2_0_3"><a name="rel2_0_3">Raptor2 2.0.3 changes</a></h2>
<p>The main change is to add the new main header file
<code>raptor2.h</code>. The new header has been added to allow
applications to be sure they have got the raptor V2 header
(with <code>#include <raptor2.h></code> and not the raptor V1
header file (<code>#include <raptor.h></code>).
The <code>raptor.h</code> header will NOT be removed until the next
major raptor release (V3).
</p>
<h3>Turtle / TRiG parser changes</h3>
<p>Alter the parser to not use a large token stack when parsing TRiG
graphs, enabling the parser to handle much larger files. The parser
still gathers all input into a single memory segment so the maximum
amount of input is probably memory size/3.
</p>
<p>TRiG parser now allows a QName for the graph name.
</p>
<p>Attempted to make the parser handle streaming lexing and parsing
but only partially successful; bison could be made to stream parse
but flex could not be made to stream lex. This meant it could not
be convinced to return a "need more input" response at the end of a
chunk of data and continue lexing later.
</p>
<p>Fix value ownership fix graph name.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=437">Issue #0000437</a>
</p>
<h3>Other Changes</h3>
<p>Raptor was ran through the
LLVM <a href="http://clang-analyzer.llvm.org/">clang</a> static code
analyzer and several issues fixed, mostly in unused variables and in
unlikely error recovery conditions. Some actual potential crash bugs
were found:</p>
<ol>
<li>The workaround for
ancient <a href="http://xmlsoft.org/">libxml2</a> error handling
in <code>raptor_libxml_xmlStructuredError_handler_parsing()</code>
was broken for some time, so that probably means nobody uses old
libxml2.</li>
<li><a href="https://github.com/msporny/librdfa/">librdfa</a> URI
resolving in <code>rdfa_resolve_uri()</code> used unallocated
memory in some relative URI cases.</li>
</ol>
<p>Bison 2.4 is required to build Raptor from GIT source with
no pregenerated files.
</p>
<h2 id="rel2_0_2"><a name="rel2_0_2">Raptor2 2.0.2 changes</a></h2>
<p>Fixed a too strict version checking bug in <code>raptor_new_world()</code>
</p>
<h2 id="rel2_0_1"><a name="rel2_0_1">Raptor 2.0.1 Changes</a></h2>
<p><b>DO NOT USE</b>. Use 2.0.2 which fixes a too strict version
checking bug in <code>raptor_new_world()</code>
</p>
<h3>Parser class changes</h3>
<p>The internal librdfa parser that uses Raptor internals now exports
symbols prefixed with raptor_librdfa so that Raptor can be linked
with the standard librdfa in applications without symbol clashes.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=416">Issue #0000416</a>
</p>
<h3>Serializer class changes</h3>
<p>The N-Quads serializer was fixed to output the graph name in the
fourth column, instead of repeating the object.
</p>
<h3>Internal changes</h3>
<p>Replaced all internal fatal errors that went to
an <code>abort()</code> with regular logged error.
</p>
<h2 id="rel2_0_0"><a name="rel2_0_0">Raptor 2.0.0 Changes</a></h2>
<p>Raptor V2 final release. See the release notes for 1.9.0 and
1.9.1 for the major changes in Raptor V2.</p>
<h3>API changes since 1.9.1 beta</h3>
<p>Added <code>raptor_syntax_description_validate()</code> to public
API to validate and compute counts for syntax descriptions.
Primarily this is for use by Rasqal.
</p>
<p>The <code>raptor_syntax_description</code> now has an array of URI
strings instead of a single one, to allow URI aliasing. This is
primarily for use by Rasqal.</p>
<p>Fixed guessing by URI in
<code>raptor_world_guess_parser_name()</code> which was not
working.</p>
<p>Fixed Issues:</p>
<ul>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=405">0000405</a>: RDFa parser does not handle base href with single quoted value</li>
</ul>
<h2 id="rel1_9_1"><a name="rel1_9_1">Raptor 1.9.1 Changes</a></h2>
<p>1.9.1 is the second beta release of Raptor 2 and intended to be
the last release before 2.0.0.
</p>
<h3>Raptor V1 to V2 upgrading changes</h3>
<p>Improved the <code>upgrade-script.pl</code> raptor V1 to V2
upgrade script to handle changes to enums and macros as well as
handle statement field renaming. Updated the generated documentation
to also include enum and macro changes.
</p>
<p>Added defensive code in each constructor to check the passed-in
raptor world object is a valid Raptor V2 world rather than V1. It
generates a warning once per run of the program.
</p>
<p>The <code>raptor_new_world()</code> function is now a macro that
calls an internal function <code>raptor_check_world_internal()</code>
with a version macro argument to detect when Raptor V2 is invoked with
an inconsistent header and library.
</p>
<h3>AVLTree class changes</h3>
<p>Free the iterator at the end of debug method
<code>raptor_avltree_print()</code>.
</p>
<h3>I/O Stream class changes</h3>
<p>Fix major copying too much error in the internal
<code>raptor_read_string_iostream_read_bytes()</code> memcpy that
could cause crashes - the function always copied the maximum amount
the user requested in the read method even if the string was
smaller.</p>
<h3>Parser class changes</h3>
<p>JSON parser: Made relative URIs option work.
</p>
<p>N-Quads parser: Added. The serializer already existed.</p>
<p>librdfa parser: Updated to latest librdfa GIT
1a1a08c790b7649a7f6c12fb9e40c0d3dbe70481</p>
<h3>Serializer class changes</h3>
<p>Fix <code>raptor_serializer_start_to_iostream()</code> to prevent
crash when this method is used more than once on the same
serializer.</p>
<p>RSS/Atom serializer: Fix crashes with feeds containing entries
with blank node items.
</p>
<h3>Stringbuffer class changes</h3>
<p>Added utility methods
<code>raptor_stringbuffer_append_uri_escaped_counted_string()</code>
and <code>raptor_stringbuffer_append_hexadecimal()</code>.
</p>
<h3>Term class changes</h3>
<p>Deleted <code>raptor_term_as_counted_string()</code> and
<code>raptor_term_as_string()</code>. Since 1.9.0 was an unstable
API, this is allowed.
</p>
<p>Added <code>raptor_term_to_counted_string()</code> replacing
deleted <code>raptor_term_as_counted_string()</code>.</p>
<p>Added <code>raptor_term_to_string()</code> replacing
deleted <code>raptor_term_as_string()</code>.</p>
<h3>URI class changes</h3>
<p>Added convenience methods for constructing URI terms from strings:
<code>raptor_new_term_from_counted_uri_string()</code> and
<code>raptor_new_term_from_uri_string()</code>.
</p>
<p>Use string lengths in equals and comparisons for faster checking.
Use <code>memcmp()</code> instead of <code>strncmp()</code> when
lengths are known and the same.
</p>
<h3>WWW class changes</h3>
<p>The CURL WWW module now looks for and uses the HTTP response
<code>Content-Location:</code> header to get the base URI for content
retrievals. This allows these base URIs to be used in parsing
content retrived from URIs.
Fixes <a href="http://bugs.librdf.org/mantis/view.php?id=402">Issue #0000402</a>
</p>
<h2 id="rel1_9_0"><a name="rel1_9_0">Raptor 1.9.0 Changes</a></h2>
<p>1.9.0 is the first beta release of Raptor 2. There may be changes
and additional releases before version 2.0.0 with the final stable API.
</p>
<p>This is a major update and cleanup to the Raptor API and ABI with
additions, removals and changes. There are also major restructurings
of the internal code and cleanups. There are also some new features
in the form of additional APIs, new serializers and parsers.
</p>
<p>The details of the additions, removals and changes of functions,
structures, typedefs and enums are listed in the
<a href="http://librdf.org/raptor/api/">Raptor 2 API reference manual</a>
section on
<a href="http://librdf.org/raptor/api/raptor-changes.html">Changes between raptor 1.4.21 and 1.9.0</a>.
The <a href="UPGRADING.html">upgrading document</a>
explains how to upgrade existing code that uses the V1 APIs to use
the new APIs.
</p>
<p>The major changes in this release are:</p>
<ul>
<li>Removed all deprecated functions and typedefs.</li>
<li>Renamed all functions to the standard <code>raptor_</code><em>class</em><code>_</code><em>method</em> form.</li>
<li>All constructors take a <code>raptor_world</code> argument.</li>
<li>URIs are interned and there is no longer a swappable implementation.</li>
<li>Statement is now an array of 3-4 RDF Terms to support triples and quads.</li>
<li>World object owns logging, blank node ID generation and describing syntaxes.</li>
<li>Features are now called options and have typed values.</li>
<li>GRDDL parser now saves and restores shared libxslt state.</li>
<li>Added serializers for HTML 'html' and N-Quads 'nquads'.</li>
<li>Added parser 'json' for JSON-Resource centric and JSON-Triples.</li>
<li>Switched to GIT version control <a href="https://github.com/dajobe/raptor">hosted by GitHub</a>.</li>
<li>Added memory-based AVL-Tree to the public API.</li>
</ul>
<p>Fixed Issues:</p>
<ul>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=357">0000357</a>: raptor_term_as_string does not return N-Triples escaped string, although API says so</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=361">0000361</a>: HTML Table serializer</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=369">0000369</a>: Unescaped quotes in long literals (Turtle/N3) cause parser failure if at the end of the literal</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=370">0000370</a>: Odd behaviour regarding the parsing of Trig files</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=373">0000373</a>: Remove deprecated GTK symbols</li>
<li><a href="http://bugs.librdf.org/mantis/view.php?id=379">0000379</a>: raptor libxslt security policy conflicts with apps that also use libxslt and set security policy</li>
</ul>
<!-- updated to 2010-08-15 ChangeLog changes -->
<h3>General changes</h3>
<p>Renamed the library name and package tarball name to a new
separate names (libraptor2, raptor2-X.tar.gz) so they can be
distinguished and installed into the same system as raptor 1 without
file clashes. Note: This does not apply to the
<code>rapper(1)</code> utility and it's manual page which are in both
packages. Packagers should stop packaging the <code>rapper(1)</code>
binary and the rapper manual page from raptor 1, in preference to the
raptor 2 version.
</p>
<p>Nicholas J Humfrey is a new committer.
</p>
<p>A utility script <code>docs/upgrade-script.pl</code> is
automatically generated from the changes data to aid migrating from
Raptor 1 to Raptor 2 APIs. If it is not a simple rename, the script
annotates the change as a comment near the code.
</p>
<p>Raptor's Statement, Term and URI classes can fully replace
librdf's <code>librdf_statement</code>, <code>librdf_node</code> and
<code>librdf_uri</code> classes. This has been tested with GIT
versions when both Rasqal and librdf are configured with
<code>--with-raptor2</code>. When raptor 2 is stable, Rasqal and
librdf will default to use these..
</p>
<h3>Documentation changes</h3>
<p>The API reference manual now includes an automatically generated
reference section on the
<a href="http://librdf.org/raptor/api/raptor-formats.html">functions and types that were added, removed and changed between raptor 1 and raptor 2 APIs</a>.
It also includes an automatically generated section on the
<a href="http://librdf.org/raptor/api/raptor-formats.html">parser and serializers with their names, mime types and Q values.</a>
</p>
<p>The tutorial examples were updated to the Raptor 2 APIs.
</p>
<p>NOTE: At this time, the descriptive parts of the tutorial have NOT
been updated to use the Raptor 2 API.
</p>
<h3>World class changes</h3>
<p>A log handler function for receiving warnings and errors (fatal or
other) are now all sent to a single log handler of type
<code>raptor_log_handler</code> registered to the world class with
<code>raptor_world_set_log_handler()</code>, rather than handlers set
for each parser, sax2, serializer or www instance. Several
constructors lose error handler and error data parameters
consequently.
</p>
<p>The enumerating approach for listing the known parsers and
serializers and writing into variables passed in, was replaced with
methods that return pointers to static
<code>raptor_syntax_description</code> objects to allow more
parameters to be returned. This allowed the removal of multiple
older calls that kept having to gain new return arguments.
The description also returns a list of (mime type, qname) pairs
using a new typedef <code>raptor_type_q</code>. It includes a set
of bitflags for some simple information such as
<code>RAPTOR_SYNTAX_NEED_BASE_URI</code> to describe when
a syntax requires a base URI passed in, otherwise is not needed
or optional.
</p>
<p><code>raptor_world_set_libxml_flags()</code> is replaced with
<code>raptor_world_set_flag()</code> which are simple flags that
require no initialisation of the world since they are used before it
is opened. This means that it cannot use the Options module for
world flags. New flag
<code>RAPTOR_WORLD_FLAGS_URI_INTERNING</code> allows disabling of
the URI interning using an AVL-Tree which can use up memory.
</p>
<p><code>raptor_world_set_libxslt_security_preferences()</code> and
<code>raptor_world_set_log_handler()</code> gains an int return value
to report failure if world is already opened.
</p>
<p>Moved the generation of blank node IDs from the parsers (many
objects) to the world class (1 object). Cannot think of good reasons
why the blank node ID generation policy needs to be different
per-parser. Enumeration <code>raptor_genid_type</code> was deleted
since only the blank node type was ever used.
</p>
<h3>AVL Tree changes</h3>
<p>The internal memory-based AVL Tree implementation is exposed as a
public API.
</p>
<h3>Features changes</h3>
<p>Replaced with <code>raptor_options</code></p>
<h3>Identifier class changes</h3>
<p>Replaced with Term class.
</p>
<p><code>raptor_identifier_type</code> enum was removed and replaced
with enum <code>raptor_term_type</code> and a smaller set of 3
possible term types. The enum values match the int values used
in <code>librdf_node_type</code>.
</p>
<h3>I/O Stream class changes</h3>
<p>Constructors all gain a world argument.
</p>
<p>Some methods now return an int error status such as
<code>raptor_iostream_write_end()</code>
</p>
<p>Many classes iostream writing methods and methods of the iostream
class itself were changed to follow the standard
<code>raptor_</code><em>CLASS</em><code>_write</code> naming
convention and to put the iostream argument at the end.
</p>
<p>Deprecated typedef <code>raptor_iostream_handler</code> was removed</p>
<p>Deprecated functions were removed:
<code>raptor_new_iostream_from_handler()</code>,
<code>raptor_iostream_get_bytes_written_count()</code> and
<code>raptor_iostream_write_string_turtle()</code>
</p>
<h3>Locator changes</h3>
<p>Renamed some methods to follow the
<code>raptor_locator_</code><em>method</em> standard.
</p>
<h3>Namespaces and namespace stack classes changes</h3>
<p>Constructors all gain a world argument and lose error handler,
error data arguments.
</p>
<h3>Options</h3>
<p>A new name for what were called features in Raptor 1 and this was
expanded to allow use of values types string, integer and boolean.
Options can be set on multiple classes such as parser, serializer but
are centrally described using the new
<code>raptor_option_description</code> structure.
</p>
<p>The option get / set operations were reduced from multiple methods
per class for getting / setting an int, int / string to just one get
and one set, with optional parameters. It can also handle adding new
types later, which will be passed in as strings and converted
internally.
</p>
<p>The options code
introduces a new enum <code>raptor_domain</code> which essentially is
for describing a class such as parser.
For example options listed
for domain <code>RAPTOR_DOMAIN_PARSER</code> will be usable with the
parser option get and set methods
<code>raptor_parser_get_option(parser, ...)</code> and
<code>raptor_parser_set_option(parser, ...)</code>.
</p>
<h3>Parser class changes</h3>
<p><code>raptor_parser_set_strict()</code> was removed and replaced
with a new parser option <code>RAPTOR_OPTION_STRICT</code>.
</p>
<p>Parser object methods to return information about the parser class
were removed since they can be done instead via fields of the static
object returned from
<code>raptor_world_get_parser_description()</code>. Deleted
functions include <code>raptor_parser_get_label()</code>,
<code>raptor_parser_get_mime_type()</code>, and
<code>raptor_parser_get_need_base_uri()</code>.
</p>
<p>Parsing may generate start graph and end graph events for syntaxes
that return graph names such as TRiG. These are returned by the handler
of typedef <code>raptor_graph_mark_handler</code>
set by new function <code>raptor_parser_set_graph_mark_handler()</code>
which returns a start or end event of type enum
<code>raptor_graph_mark_flags</code>.
</p>
<p><code>raptor_parser_get_accept_header()</code> fixed length of
static string to ensure NUL is copied.
</p>
<p>Many functions were renamed to match the
<code>raptor_parser_</code><em>method</em> naming standard. Some of
these get a long longer, but are at least consistent. For example
<code>raptor_parse_uri()</code> becomes
<code>raptor_parser_parse_uri()</code>.
</p>
<p>Deprecated typedef <code>raptor_ntriples_parser</code> was removed.
</p>
<p>Deprecated functions were removed:
<code>raptor_ntriples_term_as_string()</code>, and
<code>raptor_ntriples_string_as_utf8_string()</code>
</p>
<p>The librdfa parser was updated with the latest updates to the RDFa
syntax (first, rel/rev, whitespace, xml:lang) and fixes issues with
non-terminated strings.
</p>
<p>The GRDDL parser now saves and restores the libxslt global state
(handlers, security preferences) so that it does not affect other
applications in the same memory space. Part of this can be
overridden with
<code>raptor_world_set_libxslt_security_preferences()</code> which
allows user code to disable raptor touching the security preferences
entirely.
Fixes
<a href="http://bugs.librdf.org/mantis/view.php?id=379">Issue #0000379</a>
</p>
<p>The RDF/XML parser never generated special names for bag IDs
(bagidNNN), so all support for that has been removed.
</p>
<p>The RDF/XML parser uses the new reference-counted URIs and raptor
terms to prevent a lot of malloc/free for temporary uses.
</p>
<p>Removed RDF/XML parser feature
<code>RAPTOR_FEATURE_ASSUME_IS_RDF</code> since it did nothing since
at least 2003, maybe earlier.
</p>
<p>Added a JSON parser (name 'json') that can read both the
resource-centric and triples JSON RDF formats. Requires the YAJL
JSON parser library. Contributed by Nicholas J Humfrey.
</p>
<p>Moved the generation of blank node IDs from the parsers (many
objects) to the world class (1 object). Cannot think of good reasons
why the blank node ID generation policy needs to be different
per-parser.
</p>
<h3>QName class changes</h3>
<p>Constructors all gain a world argument and lose error handler,
error data arguments.
</p>
<h3>Sequence changes</h3>
<p>Use new generic <code>raptor_data_free_handler</code>,
<code>raptor_data_print_handler</code>,
<code>raptor_data_context_free_handler</code>,
<code>raptor_data_context_print_handler</code>
data-focused handlers which are shared with the AVL Tree.
</p>
<h3>Serializer class changes</h3>
<p>Added <code>raptor_serializer_flush()</code> for user code to
indicate to a serializer to flush state since the application knows a
block has been ended, or it needs to save memory. No serializer
currently implements this, but it is expected the abbreviated
serializers that use a lot of state - Turtle, RDF/XML-Abbrev - would
benefit from this.
</p>
<p>Added an HTML Table serializer with name 'table' contributed by
Nicholas J Humfrey.
</p>
<p>Removed the obsolete 'simple' serializer from the source code.
N-Triples is an appropriate simple (and well-defined) replacement
syntax.
</p>
<h3>Statement class changes</h3>