forked from dajobe/raptor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog.5
2424 lines (1664 loc) · 80.4 KB
/
ChangeLog.5
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
2004-12-31 Dave Beckett <[email protected]>
* raptor_rss.c (raptor_rss10_serialize_terminate):
Free all namespaces, now they are
not stacked explicitly. Free namespace stack.
(raptor_rss10_build_xml_names): Use raptor_new_namespace and don't
start the rdf namespace.
(raptor_rss10_build_xml_names): Use raptor_new_namespace and don't
start the namespaces
((raptor_rss10_serialize_end): Make a namespace stack here, with
only xml: defined.
* raptor_xml_writer.c (raptor_xml_writer_start_namespace_full):
Deleted.
(main): Declare the foo namespace but don't start it, so that the xml
writer will do that.
* raptor_xml_writer.c: Optionally declare a namespace stack internally.
(raptor_new_xml_writer): Add optional raptor_namespace_stack
parameter, if NULL declare one internally.
* turtle_lexer.l, turtle_parser.y: Delete unused WS token
* raptor_xml_writer.c, raptor_sax2.c, raptor_rss.c,
raptor_rdfxml.c, raptor_internal.h, raptor.h, libraptor.3:
Rename raptor_sax2_element to raptor_xml_element throughout.
* raptor_internal.h: Added feature_start_uri to raptor_serializer
* raptor_serialize.c (raptor_free_serializer):
Tidy up any feature_start_uri set.
(raptor_serializer_set_feature_string): Added, handling
feature_start_uri created from a passed in string.
(raptor_serializer_get_feature_string): Added, handling
feature_start_uri as a returned shared string.
* raptor_parse.c (raptor_parser_set_feature_string):
Added, always failing.
(raptor_parser_get_feature_string): Added, always failing.
* raptor.h: Added feature RAPTOR_FEATURE_START_URI
Added prototypes for raptor_parser_set_feature_string,
raptor_parser_get_feature_string,
raptor_serializer_set_feature_string,
raptor_serializer_get_feature_string and
raptor_feature_value_type
* raptor_feature.c: Added flag bits for string valued features.
Added startUri (RAPTOR_FEATURE_START_URI) with a string value.
(raptor_feature_value_type): Added, to return value of a feature.
2004-12-30 Dave Beckett <[email protected]>
* libraptor.3: Added SAX2 XML Element and XML Writer classes.
* raptor_internal.h, raptor.h:
Moved raptor_sax2_element and raptor_xml_writer to public API.
* libraptor.3: Added rss-1.0 to raptor_new_serializer description.
* libraptor.3: More updates for 1.4.3
2004-12-25 Dave Beckett <[email protected]>
* raptor_rss.c (raptor_rss_parser_processNode):
Turn <guid isPermaLink="true">val</guid>
into <guid rdf:resource="val"/>
(raptor_rss10_emit_item): Always serialize rss:items at the end of
an rss channel.
* raptor_xml_writer.c, raptor_xml.c, raptor_utf8.c, raptor_sax2.c,
raptor_rss.c, raptor_general.c: Casts for c++. Rename variables
namespace to nspace.
2004-12-24 Dave Beckett <[email protected]>
* raptor_www_test.c (main): Cast for size_t
2004-12-23 Dave Beckett <[email protected]>
* raptor_rss.c (raptor_rss10_serialize_statement): Fix item URI
check to use correct URI. In debugging unknown typed node, print
type URI.
* raptor_rss.c (raptor_rss10_serialize_statement): Do not look in
items with no URI.
(raptor_rss10_build_xml_names): Do not make qnames for types with
no namespace.
* raptor_rss.c (raptor_rss10_build_items): Do nothing if there is
no seq_uri
* raptor_rss.c (raptor_init_serializer_rss10): Give rss 1.0 a URI
* raptor_serialize.c (raptor_iostream_write_string_ntriples):
Renamed from raptor_serialize_ntriples_print_string and made public.
Handle delimiters that aren't ' or " such as >, and if found
\uHHHH escape it.
(raptor_iostream_write_statement_part_ntriples): Renamed from
raptor_serialize_ntriples_print_statement_part and made public.
(raptor_iostream_write_statement_ntriples): Added and made public.
(raptor_ntriples_serialize_statement): Moved most code to
raptor_iostream_write_statement_ntriples
* raptor.h: Add and export raptor_iostream_write_ntriples_string
and raptor_iostream_write_statement_ntriples
* tests/turtle/test-13.ttl, tests/turtle/test-13.out: Use a
namespace URI that gives a predicate which could be serialized to
rdf/xml.
* raptor_rss.c (raptor_rss_insert_identifiers): For channel type,
check both the link field and the atom:id field.
* raptor_rss.c (raptor_rss10_emit_item): Emit the
<rss:items><rdf:Seq><rdf:li /> .... </rdf:Seq></rss:items> here.
(raptor_rss10_serialize_end): Moved items code above.
* raptor_parse.c (raptor_guess_parser_name): Don't emit debug
messages about scores unless very debuggy.
* n3_lexer.l, turtle_lexer.l: In <PREF> state, accept remaining
characters so -s is true.
* raptor.h: Export raptor_xml_name_check
* raptor_xml.c (raptor_valid_xml_ID): Use raptor_xml_name_check
with appropriate XML version.
(raptor_xml_name_check): Added to check for a legal XML name.
* raptor_utf8.c (raptor_utf8_check): Added, to just check a string
is good UTF-8 and all the Unicode characters are 0 <= char <=
0x10ffff
* raptor.h: Export raptor_utf8_check
* raptor_nfc_test.c (main): Use raptor_utf8_check
* raptor_xml_writer.c (main): Update tests for changed xml_writer api
* raptor.h: Export raptor_unicode_is_xml11_namestartchar,
raptor_unicode_is_xml10_namestartchar
raptor_unicode_is_xml11_namechar and
raptor_unicode_is_xml10_namechar
* raptor_utf8.c: (raptor_unicode_is_xml10_namestartchar,
raptor_unicode_is_xml11_namestartchar,
raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml10_namechar):
Added, as public functions called by raptor_unicode_is_namestartchar
and raptor_unicode_is_namechar respectively.
* raptor_rss.c (raptor_clear_rss_items): Renamed from
raptor_free_rss_items. Use raptor_free_rss_item.
(raptor_rss_context_terminate): Rename call to raptor_clear_rss_items
* raptor_rss.c (raptor_clear_rss_item): Renamed from
raptor_free_rss_item to empty a static raptor_rss_item.
(raptor_free_rss_item): Same as above but deallocates the item too.
(raptor_free_rss_items, raptor_rss_context_terminate): Use
raptor_clear_rss_item.
* raptor_rss.c (raptor_rss10_move_statements): Add item arg.
Remove auto-fail with type RAPTOR_RSS_ITEM, and now look in the
sequence of items for instances of this type.
Count and report moved statements counts when debugging.
(raptor_rss10_store_statement): Only print out individal statement
moves when debugging.
(raptor_rss10_serialize_statement): When typed node is an item, get
the URI from the entry in the sequence if it exists, maybe move the
statements then.
(raptor_rss10_build_items): Move any item statements once the item
URIs have been made.
(raptor_rss10_serialize_end): Report triples remaining when
debugging.
Remove last raw use of raptor_iostream*
2004-12-22 Dave Beckett <[email protected]>
* raptor_rss.c: Fix 'enc' prefix.
Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context.
(raptor_rss10_serialize_init): No need for nstack here.
(raptor_rss10_serialize_terminate): Delete nstack tidy.
Tidy up xml_writer and type qnames.
(raptor_rss10_move_statements): Note don't do rss items.
(raptor_rss10_build_items): Build list of raptor_rss_item* in
rss_serializer->items.
(raptor_rss10_build_xml_names): Added to make namespaces and qnames
for fields and types; pulled out of raptor_rss10_build_items.
(raptor_rss10_emit_item): Delete xml-writer, iostr args.
Replace more raptor_iostream* functions with raptor_xml_writer*
equivalents.
(raptor_rss10_serialize_end): Extra nl at end
* raptor_rss.c: Fix 'enc' prefix.
Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context.
(raptor_rss10_serialize_init): No need for nstack here.
(raptor_rss10_serialize_terminate): Delete nstack tidy.
Tidy up xml_writer and type qnames.
(raptor_rss10_move_statements): Note don't do rss items.
(raptor_rss10_build_items): Build list of raptor_rss_item* in
rss_serializer->items.
(raptor_rss10_build_xml_names): Added to make namespaces and qnames
for fields and types; pulled out of raptor_rss10_build_items.
(raptor_rss10_emit_item): Delete xml-writer, iostr args.
Replace more raptor_iostream* functions with raptor_xml_writer*
equivalents.
(raptor_rss10_serialize_end): Move rdf_RDF qname stuff to new
raptor_rss10_build_xml_names
Move bits around so that rdf:RDF is declared with all namespaces
known and using raptor_xml_writer_start_element.
Emit rdf:Seq and rdf:li elements using_xml_writer_start_element with
attributes as needed.
Attempt to emit channel items.
* raptor_internal.h: Remove
raptor_xml_writer_element_declare_namespace_full
* raptor_xml_writer.c: Renamed content_cdata_namespaces to nstack,
content_cdata_namespaces_depth to nstack_depth.
(raptor_xml_writer_start_namespace_full): Added, to start a new
namespace in the xml_writer at the current element.
(raptor_xml_writer_cdata_counted, raptor_xml_writer_raw_counted,
raptor_xml_writer_comment_counted): Added.counted string versions.
* raptor_sax2.c (raptor_new_sax2_element, raptor_free_sax2_element):
Init/tidy declared_namespaces.
(raptor_sax2_declare_namespace): Added to declare the given namespace
on the element.
(raptor_iostream_write_sax2_element): Handle declared_namespaces;
boost the nspace_declarations by size of the sequence.
Declare all the namespaces in the declared_nspaces sequence.
* raptor_rdfxml.c (raptor_xml_comment_handler):
Use raptor_xml_writer_comment (uncounted).
(raptor_cdata_grammar): Use raptor_xml_writer_cdata_counted
* raptor_internal.h: raptor_sax2_element added declared_nspaces field
Added prototype for raptor_sax2_declare_namespace.
Added prototypes for raptor_xml_writer_start_namespace_full and
raptor_xml_writer_element_declare_namespace_full
Split raptor_xml_writer_cdata / raptor_xml_writer_raw /
raptor_xml_writer_comment into uncounted and
raptor_xml_writer_cdata_counted / raw_counted / comment_counted
2004-12-21 Dave Beckett <[email protected]>
* raptor_rss.c: Made rss1.0 the default namespace for writing;
added prefixes for others.
(raptor_rss10_serialize_end): Removed unused commented code.
* raptor_qname.c (raptor_qname_copy): Added.
* raptor.h: Added raptor_qname_copy.
* raptor_rss.c: raptor_rss_item field node_type is now a pointer to the
raptor_rss_info* for that node type.
(raptor_rss_insert_identifiers, raptor_rss_emit_item): Update for new
node_type definition.
raptor_rss10_serializer_context now has rdf_nspace
(raptor_rss10_build_items): Declare rdf namespace and store in
rss_serializer->rdf_nspace - freed when namespace stack is destroyed.
Declare all raptor_namespace* for the
raptor_rss_namespaces_info[].nspace
Declare all raptor_qname* for the raptor_rss_fields_info[].qname
Declare all raptor_qname* raptor_rss_types_info[].qname
Insert node_type pointers for all items.
(raptor_rss10_emit_item): Add xml_writer argument.
Use more of xml_writer to emit main type element and predicate names.
Incomplete.
(raptor_rss10_serialize_end): Declare and use mxl_writer and qname,
element for rdf:RDF.
Incomplete.
* raptor_rss.c: Do not init all NULL fields for
raptor_rss_namespaces_info
* raptor_rss.c: Added raptor_rss_namespace_info typedef and
raptor_rss_namespaces_info merging uri_strings and prefixes for
namespaces. Made all rss info static.
(raptor_rss_common_init, raptor_rss_parser_processNode,
raptor_rss10_serialize_end): Update for namespace URIs struct
change.
* raptor_rss.c: Added rss_namespace_prefix_strings to list
namespaces to declare. raptor_rss10_serializer_context gains
raptor_namespace_stack nstack field.
(raptor_rss10_serialize_init): Init the namespace stack.
(raptor_rss10_serialize_terminate): Clean namespace stack and any
defined qnames.
(raptor_rss10_emit_item): Padding.
(raptor_rss10_serialize_end): Write namespace decls using stack.
* raptor_rss.c: Rename some destructors more normally:
(raptor_free_rss_item): Renamed from raptor_item_free.
(raptor_free_rss_items): Renamed from raptor_rss_items_free.
(raptor_rss10_move_statements, raptor_rss10_store_statement): Record
field counts per item.
(raptor_rss10_build_items): Find the rdf:_<n> items and put them
into a raptor sequence.
(raptor_rss10_emit_item): Skeleton rss item writer.
(raptor_rss10_serialize_end): Make the final structures and do the
serializing in skeleton form.
2004-12-20 Dave Beckett <[email protected]>
* raptor_rss.c: Added seq_uri to raptor_rss10_serializer_context
(raptor_rss10_serialize_terminate): Tidy seq_uri
(raptor_rss10_move_statements, raptor_rss10_store_statement): Ignore
checking fields with no URI.
(raptor_rss10_serialize_statement): For rdf:Seq node, store the URI
or blank node - as fake URI.
Make fake object node correctly for general statements.
* raptor_rss.c (raptor_rss_common_init): Prevent 2x initialising.
(raptor_item_free): Free type URI
(raptor_rss10_serialize_terminate): Call raptor_rss_common_terminate.
(raptor_rss10_move_statements): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE
set raptor_sequence_set_at destroy overwritten object.
(raptor_rss10_store_statement): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE
Make fake URIs from blank node strings and free them.
* raptor_general.c (raptor_free_statement):
Handle more statement part types.
* raptor_rss.c:
RAPTOR_RSS_FIELDS_SIZE now stops before UNKNOWN for real field names.
(raptor_rss10_move_statements): Added, to move statements from
the sequence of triples to below a typed node once a new typed node
of the given type appears.
(raptor_rss10_store_statement): Added, to store a given statement
either below an existing typed node or in a sequence of triples if
it can't be found one.
* raptor_rss.c (raptor_rss10_serialize_statement):
iostream write turned into debug.
2004-12-19 Dave Beckett <[email protected]>
* raptor_uri.c (raptor_uri_print): Cast for gcc
* raptor_rss.c: Use raptor_uri in raptor_rss_item.
(raptor_rss_context_init, raptor_rss_context_terminate): Added and
used in parser and serializer init and terminate.
(raptor_rss10_serialize_init): Initialise list of triples, items.
(raptor_rss10_serialize_terminate): Tidy up triples, items.
(raptor_rss10_serialize_statement): Look for known typed nodes,
identify ones matching rss 1.0 model and also look for the
rdf:Seq. Store other triples for later.
(raptor_rss10_serialize_end): Added skeleton.
2004-12-18 Dave Beckett <[email protected]>
* raptor_uri.c (raptor_uri_print): Added.
* raptor.h: Added raptor_uri_print
* raptor_general.c (raptor_statement_copy):
Added statement copy constructor
(raptor_free_statement): Added statement destructor.
* raptor_internal.h:
Added raptor_statement_copy and raptor_free_statement
* raptor_rss.c:
Moved parser namespace URIs to common code rss_namespace_uris.
(raptor_rss_common_init, raptor_rss_common_terminate): Added to
initialise and free up common rss items - namespace URIs, URIs for
types and uris for properties.
Added skeleton RSS 1.0 serializer
(raptor_rss10_serialize_init, raptor_rss10_serialize_terminate,
raptor_rss10_serialize_statement,
raptor_rss10_serialize_finish_factory,
raptor_rss10_serializer_register_factory,
raptor_init_serializer_rss10): Added skeleton RSS 1.0 serializer
factory and methods.
* raptor_general.c (raptor_init):
Added call to raptor_init_serializer_rss10
* raptor_internal.h: Added raptor_init_serializer_rss10
* raptor_rss.c (raptor_rss_parse_recognise_syntax): Add atom checks.
2004-12-17 Dave Beckett <[email protected]>
* tests/Makefile.am: Added
RDF_MAYFAIL_XML_TEST_FILES,RDF_MAYFAIL_XML_OUT_FILES and rule
check-mayfail-xml-rdf to run checks that may fail due to XML
parser bugs.
* raptor_sax2.c, raptor_serialize.c, raptor_iostream.c,
raptor_nfc.c, raptor_rdfxml.c: Initialise possibly used but
uninitialised vars to remove gcc warning with -O.
* raptor_namespace.c, raptor_rdfxml.c, raptor_serialize.c,
raptor_xml_writer.c, rdfdump.c, raptor.h, raptor_internal.h,
raptor_iostream.c: Casts for c++
* raptor_rdfxml.c: Fix using wrong element name in warnings.
* raptor_rdfxml.c (raptor_xml_start_element_handler):
Use raptor_sax2_element_set_attributes.
* raptor_xml_writer.c (raptor_xml_writer_empty_element): Added.
(raptor_xml_writer_start_element, raptor_xml_writer_end_element):
Updated raptor_iostream_write_sax2_element calls
(main): Add attributes and test writing empty element.
* raptor_internal.h: Added raptor_sax2_element_set_attributes
Added is_empty arg to raptor_iostream_write_sax2_element
Added raptor_xml_writer_empty_element
* raptor_sax2.c (raptor_sax2_element_set_attributes): Added.
(raptor_print_sax2_element): tidy
(raptor_iostream_write_sax2_element): Added is_empty arg
and use it for <foo... /> form.
2004-12-14 Dave Beckett <[email protected]>
* libraptor.3: Actaully updated for 1.4.3 so far
* libraptor.3: Updated for 1.4.2 so far.
* tests/turtle/README.txt, tests/turtle/rdfq-results.out,
tests/turtle/test-00.out, tests/turtle/Makefile.am: Switch to base
URI http://www.w3.org/2001/sw/DataAccess/df1/tests/
* tests/turtle/test-13.out, tests/turtle/test-13.ttl,
tests/turtle/manifest.ttl, tests/turtle/bad-12.ttl,
tests/turtle/bad-13.ttl, tests/turtle/manifest-bad.ttl,
tests/turtle/bad-10.ttl, tests/turtle/bad-11.ttl,
tests/turtle/bad-08.ttl, tests/turtle/bad-09.ttl,
tests/turtle/bad-04.ttl, tests/turtle/bad-05.ttl,
tests/turtle/bad-06.ttl, tests/turtle/bad-07.ttl,
tests/turtle/Makefile.am: Import more bad turtle tests, initial
manifest files
* raptor_namespace.c (raptor_iostream_write_namespace): Handle
ns->uri is NULL and no prefix, i.e. emitting xmlns=""
* raptor_namespace.c (raptor_namespaces_format):
Handle ns->uri is NULL and no prefix, i.e. emitting xmlns=""
2004-12-08 Dave Beckett <[email protected]>
* raptor_uri.c (raptor_default_new_uri_relative_to_base): Ask for
1 more char for new URI to allow inserting of a missing "/" path.
* raptor_rfc2396.c (raptor_uri_resolve_uri_reference): Add debug
message. When adding a missing path "/", set the path_len and the
uri_len to match.
(main): Added test when a missing abs / path is added.
* raptor_sequence.c (raptor_sequence_set_at,
raptor_sequence_get_at): Check for non-negative idx
* raptor_sequence.c (raptor_sequence_get_at): Fix index offset check
2004-12-02 Dave Beckett <[email protected]>
* rdfdump.c: Make a raptor_sequence of namespace declarations
declared by '-f xmlns:foo="bar"' and then add them to the
serializer when initialised.
(rdfdump_free_namespace_decl): Added, to provide a helper to
cleanup.
* raptor_serialize.c (raptor_serialize_set_namespace): Call
factory method declare_namespace.
(raptor_rdfxml_serialize_declare_namespace): Copy the passed in
namespace prefix, URI before storing the namespace.
(raptor_rdfxml_serialize_start): Delete the namespace sequence
contents as the namespaces are declared on the namespace stack,
which is the new owner of the namespaces.
* raptor_namespace.c (raptor_new_namespace_parts_from_string):
Added, to decode things like "xmlns:foo='bar'" into prefix, uri
strings.
* raptor.h: Added prototype for raptor_new_namespace_parts_from_string.
raptor_sequence_free_handler prototype changed to return void
2004-11-30 Dave Beckett <[email protected]>
* raptor_serialize.c (raptor_rdfxml_serialize_init):
Add a sequence of user-declared namespaces.
(raptor_rdfxml_serialize_terminate): Tidy sequence.
(raptor_rdfxml_serialize_declare_namespace): Use sequence to store
declared namespaces.
(raptor_rdfxml_serialize_start): Declare used-defined namespaces
and start them in the namespace stack.
* raptor_namespace.c (raptor_new_namespace_from_uri):
Added with raptor_new_namespace code.
(raptor_new_namespace): Now a wrapper around
raptor_new_namespace_from_uri.
(raptor_namespace_copy): Use raptor_new_namespace_from_uri.
* raptor_qname.c (raptor_iostream_write_qname):
Added to write a qname to an iostream.
* raptor.h: Add prototypes for raptor_iostream_write_qname,
raptor_new_namespace_from_uri
* raptor_rdfxml.c (raptor_xml_start_element_handler,
raptor_xml_end_element_handler, raptor_xml_comment_handler,
raptor_start_element_grammar, raptor_end_element_grammar,
raptor_cdata_grammar): Update the use of xml_writer for building
parseType="Literal" content to use an iostream. Use more sax2
methods rather than direct access to internals - still some left.
(raptor_xml_parse_init, raptor_xml_parse_start,
raptor_xml_parse_terminate, raptor_inscope_xml_language,
raptor_inscope_base_uri): Move expat/libxml details to
raptor_new_sax2, raptor_sax2_parse_start, raptor_free_sax2,
raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri
respectively.
(raptor_xml_parse_chunk_): Deleted, moved to raptor_sax2_parse_chunk
* raptor_xml_writer.c: Change to output to an iostream not build
up a stringbuffer.
(raptor_new_xml_writer): Add iostream arg, delete never-used
canonicalize.
(raptor_free_xml_writer): Remove stringbuffer.
(raptor_xml_writer_start_element, raptor_xml_writer_end_element):
Delete stringbuffer and use raptor_iostream_write_sax2_element.
(raptor_xml_writer_cdata): Delete stringbuffer and use
raptor_iostream_write_xml_escaped_string.
(raptor_xml_writer_raw): Added to write just the bytes.
(raptor_xml_writer_comment): Fixed to emit <!-- and -->
(raptor_xml_writer_as_string): Deleted.
(main): Added with test case.
* raptor_sax2.c (raptor_new_sax2, raptor_free_sax2,
raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri,
raptor_sax2_get_depth, raptor_sax2_inc_depth,
raptor_sax2_dec_depth, raptor_sax2_parse_start,
raptor_sax2_parse_chunk, raptor_sax2_element_get_element): Added.
(raptor_iostream_write_sax2_element): Renamed from
raptor_format_sax2_element and now writing to a raptor_iostream
with no allocing/freeing buffers.
* raptor_xml.c (raptor_iostream_write_xml_escaped_string): Added,
to write an XML-escaped version of a string to an iostream
2004-11-29 Dave Beckett <[email protected]>
* raptor_namespace.c (raptor_iostream_write_namespace): Added to
write a namespace to a raptor_iostream
* raptor.h: Added raptor_iostream_write_namespace
* Makefile.am: Added raptor_xml_writer_test
* raptor_expat.c (raptor_expat_init): Take void* user data
* raptor_internal.h: raptor_exp_init takes void*
Add user_data to raptor_sax2
Added prototypes or raptor_new_sax2, raptor_free_sax2,
raptor_sax2_parse_start, raptor_sax2_parse_chunk,
raptor_sax2_parse_handle_errors, raptor_sax2_get_depth,
raptor_sax2_inc_depth, raptor_sax2_dec_depth,
raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri,
raptor_sax2_element_get_element, raptor_iostream_write_sax2_element
Deleted raptor_format_sax2_element, raptor_xml_writer_as_string and
raptor_xml_writer_write_to_iostream
Changed raptor_new_xml_writer to write to a raptor_iostream
* raptor.h: Added raptor_iostream_write_xml_escaped_string and
raptor_namespace_write
2004-11-26 Dave Beckett <[email protected]>
* raptor_internal.h: Added prototype for
raptor_xml_writer_write_to_iostream
* raptor_xml_writer.c (raptor_xml_writer_write_to_iostream): Added
* raptor.h: Added prototype for raptor_iostream_write_stringbuffer
* raptor_iostream.c: (raptor_iostream_write_stringbuffer) Added
* configure.ac: --with-dmalloc default is now no
2004-11-25 Dave Beckett <[email protected]>
* configure.ac:
If expat_source is empty, set it to auto so no path-to-source is
added to libs, includes
2004-11-23 Dave Beckett <[email protected]>
* tests/ex-55.out, tests/ex-55.rdf: ex-55
* tests/Makefile.am: Added ex-55
2004-11-17 Dave Beckett <[email protected]>
* examples/grapper.c:
Extensively updated to use GTK 2.4, 2.5 features when available.
Triples/Errors windows have a scalable pane between them
Triple columns can be sorted by clicking, width resized.
All known parser features are available on the preferences menu.
Added parser guessing button.
Moved syntax menu to top of display.
Updated about box fields to include more info when possible to
display.
2004-11-12 Dave Beckett <[email protected]>
* rapper.1: Updated -f for serializer features
2004-11-10 Dave Beckett <[email protected]>
* raptor_sequence.c (raptor_sequence_join): Copy pointers correctly
* raptor_sequence.c (raptor_sequence_join): Added, to move all
items between two sequences leaving one empty.
* raptor.h: Added raptor_sequence_join
* raptor.h: Added raptor_serialize_set_namespace
* raptor_serialize.c (raptor_serialize_set_namespace):
Added, not implemented.
* raptor_rss.c (raptor_rss_parse_recognise_syntax):
Boost in recognising xml rss
2004-11-08 Dave Beckett <[email protected]>
* rdfdump.c: allow -f to set serializer features
* raptor_feature.c (raptor_features_enumerate_common): return -1
2004-11-07 Dave Beckett <[email protected]>
* raptor_uri.c: C style, indenting. const unsigned char.
(raptor_uri_path_make_relative_path): Remove a small memcpy.
(raptor_uri_to_relative_counted_uri_string) Docs edit.
Remove a large if {} block. Rename 'reference' var since libxml2
defines it (SEP). Use buildresult to make empty string result.
* raptor_serialize.c (raptor_rdfxml_serialize_statement): Use
feature feature_relative_uris to decide when to emit an absolute
or relative URI, the latter using raptor_uri_to_relative_uri_string.
* raptor_uri.c: Added raptor relative URI generating code patch
from René Puls
(raptor_uri_path_common_base_length): Added. Helper to return the
common base length of two paths
(raptor_uri_path_make_relative_path): Added. Helper to build the
result relative URI string from already analysed parts.
(raptor_uri_to_relative_counted_uri_string): Added. Get the
relative URI string between a base and reference URI.
(raptor_uri_to_relative_uri_string): Added. Wrapper about the above.
(assert_uri_to_relative): Added. Helper for tests for above.
(main): Added relative URI string generation tests.
* raptor.h: Added prototypes for
raptor_uri_to_relative_counted_uri_string and
raptor_uri_to_relative_uri_string
* raptor_rss.c (raptor_rss_parser_processNode): Add cast for name
when returned from xmlTextReaderConstLocalName.
* raptor_rss.c (raptor_rss_parser_processNode): Always declare
name as xmlChar*
2004-11-06 Dave Beckett <[email protected]>
* rdfdump.c: Tidy help messages about features, other words.
* raptor_parse.c (raptor_feature_from_uri): Moved to raptor_feature.c
* raptor.h: Moved raptor_feature_from_uri to separate section, not
just parsers
* raptor_internal.h: Deleted raptor_feature_from_uri_common
* raptor_feature.c (raptor_feature_from_uri): Defined here, no need for
raptor_feature_from_uri_common
* rdfdump.c: In feature help code, list parser and serializer features
separately, using new raptor_features_enumerate.
* raptor_serialize.c (raptor_serializer_features_enumerate):
Added, a wrapper around raptor_features_enumerate_common.
(raptor_serializer_set_feature): Added.
(raptor_serializer_get_feature): Added.
* raptor_parse.c: Moved raptor_features_list to raptor_feature.c
(raptor_features_enumerate): Changed to be a wrapper around
raptor_features_enumerate_common now containing the body of the code.
(raptor_feature_from_uri): Changed to be a wraper around
raptor_feature_from_uri_common now containing the body of the code.
* raptor_internal.h: Added feature_relative_uris for raptor_serializer.
Added prototypes for raptor_features_enumerate_common and
raptor_feature_from_uri_common
* raptor.h: Added RAPTOR_FEATURE_RELATIVE_URIS for serializing.
Added prototypes for raptor_serializer_features_enumerate,
raptor_serializer_set_feature and raptor_serializer_get_feature
* Makefile.am: Added raptor_feature.c
* raptor_feature.c:
Moved common raptor_feature code from raptor_parse.c
* raptor_rss.c:
Added <none> entry to raptor_rss_fields_info so that when indexed
with RAPTOR_RSS_FIELDS_NONE, does not access invalid data.
Fixes for xmlReader API for older libxml2s:
Added node type defines for <2.5.9
Use xmlTextReaderLocalName, xmlTextReaderNamespaceUri instead of the
Const versions with additional corresponding xmlFree()s for <2.6.0
2004-11-01 Dave Beckett <[email protected]>
* Snapshotted raptor_1_4_2 for 1.4.2 release
* win32_raptor_config.h, configure.ac:
Bumped version to 1.4.2
* raptor_xml_writer.c (raptor_xml_writer_cdata):
Return when raptor_xml_escape_string fails.
* raptor_xml.c (raptor_xml_escape_string):
Return -1 on UTF-8 encoding failure
* raptor_xml.c: docs
2004-10-28 Dave Beckett <[email protected]>
* Snapshotted raptor_1_4_1 for 1.4.1 release
* raptor_xml.c (raptor_xml_escape_string): Ensure an empty string
is copied out; write a NUL.
2004-10-28 Dave Beckett <[email protected]>
* libraptor.3: 1.4.1 raptor_xml_escape_string return value now
int, <0 on failure.
* raptor_xml_writer.c (raptor_xml_writer_cdata): Use int for
raptor_xml_escape_string return variables and use error return <0
* raptor_serialize.c: (raptor_rdfxml_serialize_write_xml_attribute,
raptor_rdfxml_serialize_statement) Use int for
raptor_xml_escape_string return variables. Handle empty string
attribute when len=0.
* raptor_sax2.c (raptor_format_sax2_element):
Use int for raptor_xml_escape_string return.
* raptor.h: raptor_xml_escape_string changed return value to int
* raptor_xml.c (raptor_xml_escape_string): Return value now int,
<0 on failure to allow escaping an empty string to return 0 bytes
required.
(main): Add empty string escaping test. Check for failure of
first raptor_xml_escape_string call.
* raptor_rss.c (raptor_rss_parser_processNode): Fix url attribute
failing for non-enclosure.
2004-10-27 Dave Beckett <[email protected]>
* raptor_rfc2396.c (raptor_new_uri_detail): Do not add schema_len
twice to dest pointer; stop buffer overrun
2004-10-26 Dave Beckett <[email protected]>
* raptor_locator.c (raptor_format_locator): Only print line if > 0
* raptor-config.1: Fix --libtool-libs desc
2004-10-24 Dave Beckett <[email protected]>
* win32_raptor_config.h, configure.ac, NEWS.html:
Bumped version to 1.4.1
* Snapshotted raptor_1_4_0 for 1.4.0 release
* raptor_rss.c: Added generation of triples for RSS enclosures
based on a patch from Suzan Foster. Changes made include
correcting the enclosures namespace, tidying some memory leaks and
printing some debug information.
* raptor_serialize.c (raptor_rdfxml_serialize_statement):
Make rdf:_<n> 'ordinal' properties serialize correctly.
* raptor_www_test.c (main): Use raptor_www_fetch_to_string for testing.
* raptor_iostream.c (raptor_string_iostream_finish): Code tidy.
* libraptor.3, raptor.h: Added raptor_www_fetch_to_string
* raptor_www.c (raptor_www_fetch_to_string_write_bytes):
Added handler for the following function.
(raptor_www_fetch_to_string): Added, to get content back as a string.
2004-10-23 Dave Beckett <[email protected]>
* libraptor.3: Updates for 1.4.0
* raptor.h, raptor_iostream.c: s/fh/handle/ for clarity.
* raptor.rdf.in: Add Raptor to the desc
* raptor.rdf.in, raptor.spec.in:
Update descriptions to include serializers
2004-10-21 Dave Beckett <[email protected]>
* raptor_namespace.c: less namespace debugs
* raptor_xml_writer.c: less cdata debugs
* raptor_namespace.c: Make most namespace debug messages appear
only if #ifdef RAPTOR_DEBUG_VERBOSE
* raptor_rdfxml.c: Make most rdf/xml parsing debug messages appear
only if #ifdef RAPTOR_DEBUG_VERBOSE
* raptor_serialize.c:
(raptor_serialize_start, raptor_serialize_start_to_filename,
raptor_serialize_start_to_string,
raptor_serialize_start_to_file_handle,
raptor_serialize_statement, raptor_serialize_end):
Fail if no iostream is made or available.
* raptor_iostream.c (raptor_new_iostream_to_string):
Docs, zap string and length before starting.
* raptor_serialize.c (raptor_rdfxml_serialize_statement):
Print datatype URIs correctly.
2004-10-20 Dave Beckett <[email protected]>
* configure.ac, win32_raptor_config.h: 1.4.0
* raptor_internal.h:
Added warning_user_data, warning_handler to serializer
Added prototypes for raptor_serializer_warning and
raptor_serializer_warning_varargs
* raptor_serialize.c (raptor_serializer_warning,
raptor_serializer_warning_varargs): Added
(raptor_serializer_set_warning_handler): Added
* raptor.h: Added raptor_serializer_set_warning_handler
* configure.ac: autoconf mode
* rdfdump.c: default serializer simple
* raptor_serialize.c (raptor_rdfxml_serialize_statement): Handle
URI subject, object right.
* raptor_serialize.c (raptor_serialize_start_to_filename,
raptor_serialize_start_to_string,
raptor_serialize_start_to_file_handle): Don't enforce base URI is
required.
2004-10-19 Dave Beckett <[email protected]>
* raptor.h:
Updated raptor_new_iostream_to_string with malloc_handler argument
* raptor_serialize.c (raptor_serialize_start_to_string): Update
raptor_new_iostream_to_string for malloc_handler argument
* raptor_iostream.c (raptor_string_iostream_finish):
Use passed-in malloc_handler to
make string, raptor_stringbuffer_copy_to_string to copy directly in.
(raptor_new_iostream_to_string): Add optional malloc_handler argument
so caller can control allocation.
(main): Update tests for above.
* raptor.h: Added raptor_stringbuffer_copy_to_string
* raptor_stringbuffer.c (raptor_stringbuffer_copy_to_string):
Added to allow exporting to
externally alloced buffers - handy for cross-library/heap work.
(main): Added test for above.
* raptor_general.c (raptor_init): Don't register 'simple' type.
* raptor_iostream.c, raptor_namespace.c, raptor_serialize.c,
raptor_iostream.c: Casts for C++
* tests/Makefile.am, tests/turtle/Makefile.am:
Replace direct dependency on $(top_builddir)/rapper with build-rapper
so re-compile check is forced before testing.
* raptor.h, raptor_namespace.c, raptor_serialize.c:
Fix a bunch of constitency typos in namespace URIs
* raptor_internal.h:
Add locator, error_user_data and error_handler to raptor_serializer.
Add raptor_init_serializer_rdfxml, raptor_serializer_error,
raptor_serializer_simple_error and raptor_serializer_error_varargs.
* raptor_namespace.c:
Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri,
raptor_rdf_namespace_schema_uri,
raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri,
raptor_rdf_namespace_ms_uri_len
* raptor_general.c (raptor_init): Call raptor_init_serializer_rdfxml
* raptor.h:
Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri,
raptor_rdf_namespace_schema_uri,
raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri,
raptor_rdf_namespace_ms_uri_len
Add raptor_serializer_set_error_handler,
raptor_serializer_get_locator
* raptor_serialize.c: Added RDF/XML serializer.
Added locator to serializer.
(raptor_serializer_error, raptor_serializer_simple_error,
raptor_serializer_error_varargs): Added internal support for errors.
(raptor_serializer_set_error_handler, raptor_serializer_get_locator):
Added public methods
2004-10-18 Dave Beckett <[email protected]>
* raptor_iostream.c: (main) casts for fprintf
* rdfdump.c: Remove ad-hoc serializing code and use raptor_serializer.
Update help and usage messages to use raptor_serializers_enumerate
* raptor_internal.h:
Added raptor_serializer_factory and declarations for factories
raptor_init_serializer_ntriples, raptor_init_serializer_simple and
raptor_delete_serializer_factories
* raptor_general.c (raptor_init):
Call raptor_init_serializer_ntriples and
raptor_init_serializer_simple
* raptor.h: Added raptor_serializer class and methods:
raptor_serializers_enumerate, raptor_serializer_syntax_name_check,
raptor_new_serializer, raptor_free_serializer,
raptor_serialize_start, raptor_serialize_start_to_filename,
raptor_serialize_start_to_string,
raptor_serialize_start_to_file_handle, raptor_serialize_statement,
raptor_serialize_end, raptor_serializer_get_iostream. Added new
raptor_iostream class constructor raptor_new_iostream_to_sink and
methods: raptor_iostream_write_end, raptor_iostream_write_string,
raptor_iostream_write_counted_string,
raptor_iostream_get_bytes_written_count,
raptor_iostream_write_decimal, raptor_iostream_format_hexadecimal
* Makefile.am: Added raptor_serialize.c
Added $(LIBS) to rfc2396 tests for -ldmalloc when present
* raptor_serialize.c: Serializers
* raptor_iostream.c (raptor_iostream_write_counted_string):
Added as a wrapper.
* raptor_iostream.c (raptor_iostream_format_hexadecimal):
Added for writing field-formatted hex.
* raptor_iostream.c (raptor_iostream_get_bytes_written_count):
Renamed from raptor_get_bytes_written_count
(raptor_iostream_write_decimal): Added to print a decimal to the
iostream.
* raptor_iostream.c (raptor_new_iostream_to_file_handle):
Do not fclose at end.
(raptor_string_iostream_finish): Free malloced context.
(raptor_iostream_write_string): Helper to write C string.
* raptor_iostream.c: Added sink iostream
(raptor_sink_iostream_write_byte, raptor_sink_iostream_write_bytes):
Added.
(raptor_new_iostream_to_sink): Added to create a throwaway data
iostream.
(raptor_free_iostream): Ensure write_end is always called once only.
(main): Test sink.
* raptor_iostream.c:
Added ended flag, once write_end is done, all further calls fail.
(raptor_filename_iostream_finish): Removed; write_end does this.
(raptor_filename_iostream_write_end): Added to fclose() on end
(raptor_string_iostream_finish): More checks when stringbuffer is
empty.
(raptor_new_iostream_to_string): Handle error tidy up better.
(raptor_iostream_write_end): Added.
(main): Code tidy.
* raptor_iostream.c: casts for c++
* raptor.h: Added raptor_iostream class and methods.
* Makefile.am: Added raptor_iostream.c and raptor_iostream_test