forked from dajobe/raptor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog.4
2809 lines (1877 loc) · 87.7 KB
/
ChangeLog.4
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
2003-12-31 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_rss.c, raptor_parse.c, ntriples_parse.c, n3_parser.y:
Use expanded raptor_parser_register_factory with mime_type and
uri_string args where appropriate.
* libraptor.3, raptor.h: Added raptor_syntaxes_enumerate
* raptor_general.c (raptor_parser_register_factory):
Add mime_type and uri_string args, both optional.
(raptor_syntaxes_enumerate): Added to get syntax name, label,
mime_type or uri_string - all optional.
(raptor_parsers_enumerate): Uses raptor_syntaxes_enumerate.
* raptor_internal.h:
Store parser mime_type, URI in raptor_parser_factory
Update raptor_parser_register_factory to take mime_type,
uri_string args.
* configure.ac: Bumped version to 1.2.0
* Snapshotted raptor_1_1_0 for 1.1.0 release
* configure.ac:
Update RAPTOR_LIBTOOL_VERSION to reflect interfaces added,
none removed giving current 2:0:1
* NEWS.html: 1.1.0 released 2003-12-31
* libraptor.3: nroff/man style tweaks
2003-12-31 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* libraptor.3: nroff/man style tweaks
2003-12-30 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* NEWS.html: Link to W3C docs for 1.1.0
* configure.ac: words
* configure.ac: Make flex version warnings mention N-Triples Plus more
2003-12-30 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* NEWS.html: Link to W3C docs for 1.1.0
* configure.ac: Make flex version warnings mention N-Triples Plus more
2003-12-29 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html, README.html, NEWS.html, LICENSE.html, INSTALL.html:
XHTML 1 strict
* NEWS.html: Prepare for 1.1.0
* libraptor.3: bump date
* raptor_stringbuffer.c (main): Do not free as_string returned strings
* raptor_stringbuffer.c: brackets
* raptor_stringbuffer.c (raptor_free_stringbuffer):
Free any constructed string.
* raptor_xml_writer.c:
Use raptor_stringbuffer to better grow the output cdata.
* raptor_stringbuffer.c: stringbuffer now uses unsigned char
Removed raptor_new|free_stringbuffer_node - used once, now inlined.
(raptor_stringbuffer_append_string_common): Added with
common append code merged here.
(raptor_stringbuffer_append_counted_string,
raptor_stringbuffer_append_string): Added do_copy arg.
(main): Test code updated for api changes.
* raptor_internal.h:
Added prototypes for raptor_stringbuffer class to internal API
* Makefile.am:
Re-added raptor_stringbuffer.c and raptor_stringbuffer_test
2003-12-23 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* rapper.1: Updated for 1.1.0, -a is gone. Added ntriples-plus
* libraptor.3: parser name is ntriples-plus
* libraptor.3: Updated for 1.1.0
* raptor.h: remove raptor_namespaces_end_namespace - does not exist.
2003-12-22 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* Makefile.am:
Remove raptor_stringbuffer.c/test from dist - not used at present.
* configure.ac:
Added --with-xml-names to choose XML 1.0 name checking (default) or 1.1
* TODO.html: Added --enable-xml-1-1-names and updated to XML 1.1 PRs
* raptor_utf8.c (raptor_unicode_is_namestartchar):
Update to Namespaces in XML 1.1 WD
http://www.w3.org/TR/2003/PR-xml-names11-20031105/#NT-NCNameStartChar
and Extensible Markup Language (XML) 1.1 PR
http://www.w3.org/TR/2003/PR-xml11-20031105/#NT-NameStartChar
(raptor_unicode_is_namechar): Updated comment, no code changes
needed.
* tests/ntriplesplus/Makefile.am: No check-warn-rdf tests yet
* TODO.html: Added --disable-nfc-check to disable Unicode NFC checking.
* raptor_utf8.c:
Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize.
* configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed
* configure.ac:
Added --disable-nfc-check to disable Unicode NFC checking even if a
suitable glib is present and providing it. Otherwise, autodetects
as before.
* TODO.html: I claim the CDATA counting problem with libxml is a
libxml bug.
* TODO.html: Record win32 file://c: somewhat handled.
* TODO.html: Added --disable-nfc-check to disable Unicode NFC checking.
* raptor_utf8.c:
Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize.
* configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed
* configure.ac:
Added --disable-nfc-check to disable Unicode NFC checking even if a
suitable glib is present and providing it. Otherwise, autodetects
as before.
* TODO.html:
I claim the CDATA counting problem with libxml is a libxml bug.
* TODO.html: Record win32 file://c: somewhat handled.
2003-12-19 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: updates, note bug or feature
* examples/Makefile.am: Removed REDLAND_LIBS
2003-12-17 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_parse.c:
Update for changed raptor_generate_id handler calls - no const.
* raptor_general.c, raptor.h, raptor_internal.h:
raptor_generate_id handler does not take const string
* raptor_general.c, raptor.h, raptor_internal.h:
raptor_generate_id returns non const
* ntriples_parse.c (raptor_ntriples_parse_line):
Casts, unsigned char* for blank node IDs.
* ntriples_parse.c (raptor_ntriples_parse_line):
Enforce predicate must be URIref
2003-12-16 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* ntriples_parse.c (raptor_ntriples_parse_line):
Pass blank node identifier generation
through raptor_generate_id. Rewrite returns into setting rc and jump
to cleanup to ensure allocated blank node IDs are freed.
* raptor.pc.in: Restore LDFLAGS, LIBS
* raptor-src-config.in: Removed --static-libs
2003-12-15 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor.pc.in: Just link -lraptor
* configure.ac:
Remove use of have_redland for expat sources (no longer shipped with
redland anyway)
* configure.ac: Remove redland source check.
* Makefile.am: No need for librdf.la rule
* rdfdump.c, raptor_stringbuffer.c, raptor_set.c,
raptor_namespace.c, Makefile.am: Remove all RAPTOR_IN_REDLAND code
use of REDLAND_LIBS, REDLAND_CFLAGS. Now the test and rdfdump
programs always just use raptor alone.
2003-12-14 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html:
CDATA sections do not count line numbers at all (seen with libxml)
* raptor_general.c (raptor_print_statement_part_as_ntriples):
Update call of raptor_print_ntriples_string
* raptor.h: Update raptor_print_ntriples_string prototype
* raptor_general.c (raptor_print_ntriples_string):
Take unsigned const char*
2003-12-08 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: libxml2.6.0 SAX API support done
2003-12-06 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* Makefile.am:
Narrower yyerrlabl fix since bison 1.875a no longer requires it
* examples/grapper.c:
Casts and updates to use URI strings from raptor as unsigned char*
and converting to/from gchar*
* rdfdump.c, raptor_xml_writer.c, raptor_xml.c,
raptor_www_libxml.c, raptor_www.c, raptor_uri.c, raptor_sax2.c,
raptor_rss.c, raptor_parse.c, raptor_namespace.c, n3_parser.y,
n3_lexer.l:
Lots of casts for str* function args, return values between
unsigned char* as used for UTF8 and URI strings and char* used by
str* functions.
Some further casts for strings from XML.
* raptor_www_test.c (write_bytes_fh): No return value.
(main) Test code casts unsigned char* for URI strings
Fix write_content_type and write_bytes_fh set handler methods.
* raptor_utf8.c (raptor_unicode_char_to_utf8): unsigned char* arg.
(raptor_utf8_is_nfc): unsigned int, cast for unsigned char*
* raptor_sequence.c (raptor_sequence_ensure):
Use void** not void*. C++ cares.
(main): Test code casts to void* for args.
* raptor_qname.c (raptor_qname_string_to_uri):
cast for signed/unsigned int
comparison.
* raptor_locator.c (raptor_format_locator):
Use raptor_uri_as_counted_string to save a strlen.
* raptor_identifier.c:
(raptor_identifier_print) fputs arg cast [function for
RAPTOR_DEBUG only]
* raptor_general.c (raptor_parsers_enumerate): Unsigned int.
(raptor_parse_uri_write_bytes): unsigned char* cast.
Declare raptor_xml_literal_datatype_uri_string.
(raptor_print_statement_detailed): Replace several fprintf with fputs
and fputc.
(raptor_print_ntriples_string): Use unsigned long/size_t for counts.
(raptor_statement_part_as_counted_string): unsigned char*
Use raptor_xml_literal_datatype_uri_string.
(raptor_statement_part_as_string): unsigned char*
(raptor_print_statement_part_as_ntriples): unsigned char*. Replace
several fprintf with fputs and fputc.
Use raptor_xml_literal_datatype_uri_string
(raptor_default_generate_id_handler): Casts for str* functions
(raptor_check_ordinal): unsigned char*
* ntriples_parse.c:
(raptor_ntriples_generate_statement,
raptor_ntriples_string_as_utf8_string, raptor_ntriples_parse_line):
Updated to take/return unsigned char* args and internals. Update
raptor_uri calls for similar changes.
Use raptor_xml_literal_datatype_uri_string
Lots of casts for str* functions char* arguments.
* Makefile.am: Remove maintainer only n3 lex/yacc rules (flex/bison)
Post process the bison output to remove unused label to make g++
happier.
* raptor_internal.h:
Added raptor_xml_literal_datatype_uri_string for the RDF datatype
literal URI string, used several times.
raptor_check_ordinal takes unsigned char*
A couple of lengths, counts become unsigned int.
raptor_unicode_char_to_utf8, raptor_format_sax2_element,
raptor_xml_writer_cdata, raptor_xml_writer_comment,
raptor_xml_writer_as_string changed to
take/return unsigned char* for UTF8 strings.
* raptor.h: raptor_new_uri_func, raptor_new_uri_from_local_name_func,
raptor_new_uri_relative_to_base_func, raptor_uri_as_string_func,
raptor_uri_as_counted_string_func URI factory methods
changed to all take/return unsigned char* for URI strings
raptor_statement_part_as_counted_string,
raptor_statement_part_as_string,
raptor_new_uri, raptor_new_uri_from_uri_local_name,
raptor_new_uri_relative_to_base, raptor_uri_as_string,
raptor_uri_as_counted_string
URI methods changed to take/return unsigned char* for URI strings
raptor_ntriples_string_as_utf8_string changed to return unsigned
char* for UTF8 string
raptor_uri_resolve_uri_reference, raptor_uri_filename_to_uri_string,
raptor_uri_uri_string_to_filename,
raptor_uri_uri_string_to_filename_fragment, raptor_uri_is_file_uri
Changed to use unsigned char* for URI strings, char* for filenames
2003-12-03 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: ntriples parser should use raptor_generate_id for bnodes
2003-12-01 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_set.c (raptor_set_stats_print): Debug printing tweak.
2003-11-28 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_internal.h: raptor_check_ordinal with now unsigned char* arg
raptor_sax2 content_cdata now unsigned char*
* raptor_general.c (raptor_check_ordinal): unsigned char *name
* raptor_parse.c: Lots of char/unsigned char casting.
* n3_common.h: Undo n3_syntax_error back to raptor_parser arg.
* n3_parser.y: (n3_parser_error) aka yyerror; take a void arg.
* n3_common.h:
The n3_syntax_error aka yyerror function takes a void arg.
* n3_parser.y: Casts for rdf_parser, strings.
* n3_lexer.l: Define INPUT_FN as yyinput (C++) or input (otherwise)
Add more casts for C++ near rdf_parser, yytext.
(copy_token): More casts for malloc and string functions.
(copy_string_token): More size_t, casts.
* ntriples_parse.c (raptor_ntriples_term): Use a size_t; cast for C++.
* ntriples_parse.c (raptor_ntriples_term_valid,raptor_ntriples_term):
Change argument names from class to term_class to avoid C++ keyword.
* raptor_getopt.h: Protect prototypes for C++
* raptor_stringbuffer.c: casts for RAPTOR_*ALLOC returns
* n3_parser.y: oops, raptort -> raptor
* n3_parser.y: another cast for RAPTOR_MALLOC return
* n3_parser.y: casts for RAPTOR_CALLOC returns
* configure.ac:
Move adding pkg-config glib2.0 cppflags/libs till after the other
libraries since that's more likely to be system wide and least
effect libxml2, other libraries that might be elsewhere. Mostly
affects OSX which is more sensitive to link order.
* raptor_stringbuffer.c (main): declare at start of block
* configure.ac: Check for libxml/SAX2.h - the new SAX2 API
* raptor_libxml.c:
Added a pile of libxml2_* macros to use the libxml2 SAX2 functions
when they are present, otherwise the SAX1. Not using the SAX2 parts
of the libxml2 API at present.
* strcasecmp.c: Add debug message arg casts.
* configure.ac:
Include libxml/parser.h when checking for other libxml2 headers
* ntriples_parse.c: Add some debug message arg casts.
(raptor_ntriples_parse_chunk): At end of input, check that there is
no remaining junk.
* ntriples_parse.c (raptor_ntriples_parse_chunk):
Fix line counting problems when \r\n
crosses a buffer or when a line ends at the end of a buffer.
last_char recorded in state.
* TODO.html: N-Triples Plus parser
More line counting fixes.
* README.html: Added N-Triples Plus parser
* raptor_stringbuffer.c (main): Free returned strings.
* Makefile.am:
Added raptor_stringbuffer.c raptor_stringbuffer_test code
* raptor.h: Added raptor_stringbuffer.
* raptor_stringbuffer.c: Stringbuffer class for growing strings
* raptor_libxml.c (raptor_libxml_init): With libxml2 use
raptor_xml_characters_handler for sax->characters.
* raptor_parse.c (raptor_cdata_grammar): Added is_cdata arg.
(raptor_xml_characters_handler): Added, calling raptor_cdata_grammar.
(raptor_xml_cdata_handler): Updated to call raptor_cdata_grammar with
is_cdata=1.
(raptor_xml_parse_init): With expat use raptor_xml_characters_handler
with XML_SetCharacterDataHandler.
(raptor_cdata_grammar): Tidy error reporting; do not use
raptor_xml_writer_as_string for a simple print.
* raptor_internal.h: Added raptor_xml_characters_handler prototype.
2003-11-25 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* manifest.pl: Add withdrawn tests check
2003-11-23 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* tests/ntriplesplus/Makefile.am:
Added more N-Triples Plus tests (1-7) and bad (0-3)
* tests/ntriplesplus/test-07.out, tests/ntriplesplus/test-07.ntp,
tests/ntriplesplus/test-06.out, tests/ntriplesplus/test-06.ntp,
tests/ntriplesplus/test-05.out, tests/ntriplesplus/test-05.ntp,
tests/ntriplesplus/test-04.out, tests/ntriplesplus/test-04.ntp,
tests/ntriplesplus/test-03.out, tests/ntriplesplus/test-03.ntp,
tests/ntriplesplus/test-02.out, tests/ntriplesplus/test-02.ntp,
tests/ntriplesplus/test-01.out, tests/ntriplesplus/test-01.ntp:
More N-Triples Plus tests
* tests/ntriplesplus/bad-00.ntp, tests/ntriplesplus/bad-01.ntp,
tests/ntriplesplus/bad-02.ntp, tests/ntriplesplus/bad-03.ntp:
N-Triples Plus bad tests
* n3_lexer.l: In prefix state, always return to initial on
matching '.', then error out.
(n3_syntax_error): Copy removed here.
(main): Init enough more of parser/locator so that n3_syntax_error
in main library can be used.
2003-11-21 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* rdfdump.c: extra newline in version
* rdfdump.c: extra newline in help
2003-11-19 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* tests/Makefile.am:
Added check-ntriples-plus to check N-Triples Plus with the N-Triples
tests.
* n3_parser.y, n3_lexer.l, n3_common.h:
Added lineno to raptor_n3_parser context to track newlines for dos,
unix, mac since flex doesn't do that by default with yylineno.
* rdfdump.c: tidy help messages
* TODO.html: line counting for dos files
* ntriples_parse.c:
Track newlines correctly for \r\n across chunks; move last_nl into
ntriples parser context.
(raptor_ntriples_parse_chunk,raptor_ntriples_parse_start): Use and
init last_nl in ntriples parser context.
2003-11-16 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor.h: Added raptor_ntriples_string_as_utf8_string
* ntriples_parse.c (raptor_ntriples_term):
Added allow_utf8 argument and new class
RAPTOR_TERM_CLASS_FULL which uses all the passed in string.
(raptor_ntriples_string_as_utf8_string): Added, using
raptor_ntriples_term as above.
(raptor_ntriples_parse_line): Use size_t len args.
* rdfdump.c: Use f/puts instead of print/fprintf when there are no %s
* raptor_uri.c (raptor_default_new_uri_for_rdf_concept):
Remove duplicate strlen(base_uri)
2003-11-15 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_lexer.l: Document more ntriples plus
Error out if @prefix's name doesn't match name
* TODO.html: todos near xml1.1 names
* raptor_utf8.c (raptor_unicode_is_namestartchar):
Two | changed to ||. Likely worked anyway
2003-11-11 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* libraptor.3: Noted raptor_set_feature with non_nfc_fatal
* raptor.h: Added RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC
errors or warnings.
* raptor_general.c (raptor_set_feature): Added
RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC errors or warnings.
(raptor_set_parser_strict): Set feature_non_nfc_fatal default off.
* raptor_internal.h:
Added feature_non_nfc_fatal to pick between NFC errors or warnings.
* raptor_parse.c:
Put 'quotes' around element/attribute names in messages.
Use feature_non_nfc_fatal to pick between NFC errors or warnings.
* tests/Makefile.am: check-bad-nfc-rdf - use strict mode
* rdfdump.c: Document -m/--mode arg
* TODO.html: gzip2/bzip2 api
2003-11-10 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: Note libxml2 2.6.0 SAX2 issues
* configure.ac: Added tests/ntriplesplus
* tests/ntriplesplus/Makefile.am: N-Triples plus tests
* tests/ntriplesplus/test-00.ntp, tests/ntriplesplus/test-00.out:
N-Triples Plus default namespace test
* tests/Makefile.am: added ntriplesplus dir
* raptor_qname.c (raptor_qname_string_to_uri):
Keep original name around for error reporting.
* rdfdump.c, n3_parser.y: parser now called ntriples-plus
* n3_parser.y: parser called ntriplesplus
* n3_parser.y (production directive):
Fix declaring default namespace prefix
2003-11-09 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* tests/Makefile.am: added bad-20.rdf
* tests/bad-20.rdf: check non-namespaced element does not crash parser
* raptor_qname.c (raptor_new_qname,
raptor_new_qname_from_namespace_local_name): Do not die if no URI
for qname is available. It might be <a xmlns=""> which is at
least needed for some error reports or for embedded qnames.
Caused unnecessary crashes when parsing failed.
2003-11-03 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_xml.c (main): Make tests less chatty on success
* raptor_uri.c (main): Make it less chatty on success
* raptor_uri.c (raptor_uri_uri_string_to_filename_fragment):
Allow file://a|/ and file://a:/
(main): For WIN32, check the above works.
* autogen.sh: remove ltmain.sh libtool before libtoolize
* raptor_general.c (raptor_parse_uri_with_connection):
Fail before parsing if raptor_www_fetch failed.
* raptor_internal.h: Added raptor_www_error_varargs internal prototype.
* raptor_www_libxml.c (raptor_www_libxml_http_error):
This was just all wrong, printing to
stderr and then exit(1). Change to use the proper
raptor_www_error_varargs callback.
* raptor_www.c (raptor_www_error_varargs):
Added, with va_list signature.
* raptor_general.c (raptor_parse_file):
When uri is given and base_uri is NULL, copy
the uri and free it later - fix to match the function documentation.
2003-10-31 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_general.c (raptor_parse_file): fclose only when fh is not NULL
2003-10-21 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: Note Win32 URI code possible bug
* raptor_parse.c (raptor_xml_end_element_handler):
For RAPTOR_DEBUG, declare element_name at start of function.
2003-10-20 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor.h: raptor_namespace(s)_(new|free) renamed to
raptor_(new|free)_namespace(s)
Added raptor_new_qname_from_namespace_local_name
* raptor_qname.c (raptor_new_qname_from_namespace_local_name): Added.
* raptor_namespace.c:
raptor_namespaces_(new|free) renamed to raptor_(new|free)_namespaces
* raptor_namespace.c:
raptor_namespace_(new|free) renamed to raptor_(new|free)_namespace
* raptor_xml_writer.c:
raptor_namespaces_free renamed to raptor_namespaces_clear
* raptor_parse.c (raptor_xml_start_element_handler):
Use raptor_new_sax2_element.
raptor_namespaces_free renamed to raptor_namespaces_clear
* raptor_internal.h: Added raptor_new_sax2_element
* raptor_sax2.c (raptor_new_sax2_element): Added.
* raptor.h:
Added prototypes for raptor_namespaces_new, raptor_namespaces_clear
* raptor_namespace.c (raptor_namespaces_new,raptor_namespaces_free):
Added for constructor and destructor.
raptor_namespaces_free renamed to raptor_namespaces_clear for
emptying a statically allocated namespace stack.
* n3_parser.y:
raptor_namespaces_free renamed to raptor_namespaces_clear
2003-10-16 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_parser.y: Moved n3 lexer/parser stuff to n3_common.h
Added uri field to union.
URI_LITERAL and QNAME_LITERAL now are uri.
PREFIX now expects an IDENTIFIER to follow.
Remove all make qname/uri and free(copied token) sequences since the
lexer does it.
Added fake yy_init_globals to stop dumb warning.
* n3_lexer.l: Make raptor_uris here from lexer tokens (qnames or URIs)
For @prefix, recognise following token as an identifier specially
rather than try to make it a URI.
(n3_token_free): Free string or raptor_uri.
(main): Lots of fixups to fake enough n3 parser structure to
get it working fairly standalone.
* Makefile.am: Added n3_common.h
Fixup free of null inside flex-generated lexer.
* n3_common.h: N3 parser/lexer shared internals
* raptor_internal.h: Moved n3 lexer/parser stuff to n3_common.h
* n3_parser.y (n3_qname_to_uri): Replace with call to
raptor_qname_string_to_uri and added length parameter.
* raptor_qname.c (raptor_new_qname):
Replace raptor_namespace_local_name_to_uri
with use of raptor_new_uri_from_uri_local_name.
(raptor_qname_string_to_uri): Added, making only the URI
equivalent to the qname and handling N3/RDQL-style special
cases such as "prefix:", ":" and NULL.
* raptor_internal.h, raptor.h:
Moved raptor_qname, raptor_namespace, raptor_namespace_stack
classes into public API.
Added raptor_qname_string_to_uri
* raptor_namespace.c (raptor_namespace_local_name_to_uri):
Removed - only used once internally and was never public.
2003-10-09 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_lexer.l (n3_token_free): Added, for cleanup in debugging.
(main): Init and clear token/lval.
* tests/Makefile.am: Added ex-53
* tests/ex-53.out, tests/ex-53.rdf: Check allowing optional rdf:RDF
* rdfdump.c:
--assume/-a feature_assume_is_rdf deleted; rdf:RDF is optional.
* raptor_general.c, raptor_parse.c:
feature_assume_is_rdf deleted; rdf:RDF is optional.
* raptor_internal.h: feature_assume_is_rdf deleted
2003-10-06 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* tests/wine.out, tests/wine.rdf:
OWL Wine Ontology from http://www.w3.org/TR/owl-guide/wine.rdf
* tests/Makefile.am:
Added OWL Wine ontology from http://www.w3.org/TR/owl-guide/wine.rdf
as wine.rdf wine.out
2003-09-30 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* TODO.html: NTP lval
* n3_parser.y: Remove n3_parser_lex; re-#define yylex to call direct
* n3_lexer.l (copy_string_token):
Destroy malloced string on error return.
* n3_parser.y (n3_parse):
Don't delete buffer, pop buffer state; a successful lex does that.
* raptor_internal.h: Remove n3_token_print
* n3_parser.y: Use reentrant yacc parser.
Store the lexer lval in the n3_parser context.
Lots of #define trickery to get flex/bison to talk nicely.
Make n3_parser_error take an rdf_parser arg (this isn't configurable
by bison itself, so is likely fragile).
Remove use of extern in lineno; get it from the lexer.
Remove N3_Parser global; use rdf_parser local.
(n3_parser_error): Update for having rdf_parser arg, update locator
lineno from scanner.
(n3_syntax_error, n3_qname_to_uri): Get lineno from scanner.
(n3_parse): Remove fixmes, no need for protecting globals.
(main): Update for reentrant parser; init locator from standalone
args.
* n3_lexer.l:
Remove n3_lexer.c/.h prototypes no longer(?) needed with
re-entrant lexer.
Remove use of lineno; let lexer do it.
Change lexer call to pass in lval from reentrant parser.
(n3_token_print): Pass in lval.
(main): Update for api changes.
2003-09-29 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_internal.h: Updates for reentrant lexer.
* n3_parser.y: Use reentrant lexer API.
Define YYLEX_PARAM to be scanner arg, from current grammar.
(n3_parser_lex): Take scanner arg.
(n3_syntax_error): Add rdf_parser arg.
(n3_parse): Init and destroy reentrant lexer.
(raptor_n3_parse_terminate): Tidy up any lexer stuff.
(main): Check for file not found, report it.
* n3_lexer.l:
Switch to reentrant lexer. Pass rdf_parser into code, yyextra
internally.
(yywrap): Add scanner arg.
(copy_string_token, n3_syntax_error): Add rdf_parser arg.
(main): Use reentrant calls for lexer to set yyin, get_text. Use
yylex_init/yylex_destroy.
* Makefile.am: n3_lexer_test depends on raptor_utf8
* raptor_parse.c:
Add EXPAT_UTF8_BOM_CRASH fix updates for sax2 changes.
* configure.ac: Tweak for old flex version output
* configure.ac: Try to check flex is new enough.
2003-09-21 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_parser.y: Minor C reformatting
2003-09-20 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor.h: Added raptor_parsers_enumerate prototype
* n3_lexer.l: minor reformatting
* n3_lexer.l (copy_string_token): Make \r, \n and \t work
* raptor_general.c (raptor_init): Ensure rdf/xml is default parser.
(raptor_parsers_enumerate): Added, to enumerate parsers, returning
their name & label.
* examples/grapper.c:
Use raptor_parsers_enumerate to get parser names, labels.
* n3_lexer.l: flex archaeology for options
* examples/Makefile.am: Don't build examples by default
2003-09-19 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* raptor_www.c, raptor_general.c:
Revert to old API for raptor_uri_uri_string_to_filename
* raptor.h, raptor_uri.c (raptor_uri_uri_string_to_filename):
Restored to old API.
(raptor_uri_uri_string_to_filename_fragment): Added with fragment arg.
2003-09-17 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_parser.y (n3_qname_to_uri):
Handle NULL (":" in N3) returning the default
namespace. It's not quite clear if this is legal.
* n3_parser.y (raptor_n3_generate_statement):
Do nothing if some part of the triple
is NULL.
* raptor_internal.h: n3_syntax_error now takes varargs
* n3_parser.y (n3_syntax_error): Now takes varargs
* n3_lexer.l: n3_syntax_error now takes varargs
(copy_string_token): Added \u, \U. Fixed, \r, \n, \t
* n3_parser.y: Wrap a debugging printf
* n3_lexer.l: For blank literal "_:abc", don't include _: in the
id passed to the parser.
* n3_parser.y:
Throughout replace raptor_new_uri with raptor_copy_uri when copying
existing base URI.
* n3_parser.y:
Throughout: Handle NULL uri string meaning use the base URI
* n3_lexer.l: Handle <> (returning NULL) as well as <> with content.
(n3_token_print): Update to match.
(n3_syntax_error): Simple standalone copy here.
* n3_parser.y (n3_parser_error):
Set lineno and call raptor_parser_simple_error to
pass on the parsing error.
(n3_syntax_error): Added. Set lineno and call raptor_parser_error
to pass on a general syntax error.
(n3_qname_to_uri): Init locator line before calling raptor_new_qname
that may fail, calling raptor_parser_simple_error.
* raptor_internal.h: Add n3_syntax_error
* n3_lexer.l: Call n3_syntax_error on a syntax error
* TODO.html: uris work for ntriples+
* examples/grapper.c: Add n3 syntax
* n3_parser.y (propertyList): Handle NULL verb, two cases.
(raptor_n3_parse_start): No locator column, byte values just yet.
* n3_parser.y (n3_qname_to_uri):
Call raptor_new_qname with rdf_parser for errors
* TODO.html: +RFE to disable NFC linking/check to glib
2003-09-15 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_parser.y: Don't raptor_free_uri shared uris made from qnames
* n3_parser.y (n3_parse): Tidy up flex buffers.
(raptor_n3_parse_terminate): Destroy any flex state on exit.
* n3_parser.y (n3_parse): delete buffer after parse.
* n3_parser.y: Free uri strings returned from URI_LITERAL.
* raptor_identifier.c (raptor_new_identifier):
Note uri, literal_datatype are shared and not copied.
* n3_parser.y: Free strings returned from QNAME_LITERAL.
* raptor_sequence.c (raptor_new_sequence): Use RAPTOR_MALLOC.
(raptor_free_sequence): Free the raptor_sequence.
* raptor_identifier.c (raptor_new_identifier):
Note id, literal, literal_language are shared and not copied.
* n3_parser.y (statement): Free identifier used for subject
(propertyList): Free identifier used for verb
* n3_parser.y: Track when an identifier is copied using is_malloced
(raptor_free_triple): Actually free the triple.
* raptor_internal.h, n3_parser.y: raptor_triple now just has 3 items.
* n3_parser.y (raptor_n3_parse_terminate): Free namespaces
* n3_parser.y (n3_parse): Do not parser NULL or empty string.
(raptor_n3_parse_chunk): Do not parser empty buffer.
* rdfdump.c: (main) Don't free NULL uri
* TODO.html: More N-Triples+ todos
* TODO.html, README.html, NEWS.html, INSTALL.html:
XHTML fixes, removing align="center"
* TODO.html: Some N-Triples+ todos
* n3_parser.y: More debugging messages.
Recover from errors, don't generate partial triples.
(n3_qname_to_uri): Return NULL if raptor_new_qname does not give a
URI (some error happened).
* n3_lexer.l: Remove END token, should only use EOF
Count lines right for \r\n|\r|\n
Handle EOF in comments
* n3_parser.y: Remove END token, should only use EOF
Add more debugging statements.
Throughtout, change raptor_new_uri to raptor_new_uri_relative_to_base.
(statement): Handle empty propertyList ("[]").
(propertyList 1): Copy verb into objectList, then append
propertyList items (if not empty "[]" again).
(objectList): Add empty item for "[]", returning NULL.
(resource): For [], handle NULL and generate statements here
before returning the generated id.
(n3_parser_print_statement): Added for test code
(main): In test code, init URI module only, create fake
static rdf_parser and n3_parser and initialise enough (base URI,
and context) so that it works.
* n3_parser.y: Add error recovery at '.'
2003-09-14 Dave Beckett <Dave.Beckett@bristol.ac.uk>
* n3_parser.y: raptor_print_triple renamed to raptor_triple_print
* n3_parser.y: Only define raptor_print_triple if debugging.
* raptor_identifier.c, n3_parser.y:
raptor_print_identifier renamed to raptor_identifier_print
* n3_parser.y: Raptor N-Triples+/N3 parser
* n3_lexer.l: Raptor N-Triples+/N3 lexer
* raptor_identifier.c (raptor_identifier_print): Added for debugging
* raptor_internal.h: When debugging, raptor_identifier_print
* raptor_identifier.c (raptor_new_identifier):
Add literal, literal_datatype,
literal_language args and handle them.
(raptor_init_identifier): Deleted, not used (enough).
(raptor_copy_identifier, raptor_free_identifier): Updated for
literal, literal language and literal datatype.
* rdfdump.c:
Use the syntax name (after validation) to intialise the parser rather
than an ever-growing set of flags.
* raptor_uri.c (raptor_default_new_uri):
If the filename had a fragment, re-append
it to the file:URI after updating it to be correct.
(raptor_uri_uri_string_to_filename): Add fragment_p arg to return
the URI fragment after a discovered filename in a file:URI.
(assert_uri_to_filename): Update call to
raptor_uri_uri_string_to_filename.
* raptor_parse.c (raptor_xml_parser): Add namespaces.
Elsewhere change rdf_parser->namespaces to
rdf_xml_parser->namespaces.
(raptor_xml_parse_start): Initialise the namespaces for rdf/xml.
* raptor_sequence.c: Raptor sequence ADT
* raptor_namespace.c (raptor_namespace_init):
Add defaults arg to control which
namespaces are added by default. 0=none, 1=xml, 2=... others
(main): Update test code to give new arg.
* raptor_general.c (raptor_init): Call raptor_init_parser_n3.
(raptor_start_parser, raptor_free_parser): Remove namespace code from
here; moves into specific parser context code.
(raptor_parse_file): Update for raptor_uri_uri_string_to_filename
extra arg.
* raptor_xml_writer.c:
(raptor_new_xml_writer) Update for raptor_namespaces_init defaults
arg.
* raptor_rss.c (raptor_rss_emit): Use raptor_new_identifier rather than
raptor_init_identifier and make items dynamically allocated.
* raptor_www.c:
(raptor_www_file_fetch) Update for raptor_uri_uri_string_to_filename
extra argument.
* raptor.h:
Add literal, literal_datatype, literal_language to raptor_identifier
structure.
Add above arguments to raptor_new_identifier.
Remove raptor_init_identifier - not used.
Add fragment_p argument to raptor_uri_uri_string_to_filename.
* raptor_internal.h:
Remove namespaces from raptor_parser; now in per-syntax contexts.
Updated raptor_namespaces_init to take defaults arg.
Added N3 class prototypes, for n3_token_print, raptor_init_parser_n3,
n3_parser_lex.
Added raptor_triple structure.
Added sequence class prototypes.
* Makefile.am:
Add n3_lexer.c n3_lexer.h both generated from n3_lexer.l by flex;
add maintainer-only rules to do that.