12009-11-29 Dave Beckett <dave@dajobe.org> 2 3 * Merge from raptor 1.4.20 release SVNr15728 to trunk 4 52009-11-28 Dave Beckett <dave@dajobe.org> 6 7 * Merge RDFa changes from Raptor branch raptor1 (r15719) 8 9 * Snapshotted raptor_1_4_20 for 1.4.20 release (SVN 15727) 10 11 * tests/rdfa/0172.out, tests/rdfa/0172.xhtml, tests/rdfa/0173.out, 12 tests/rdfa/0173.xhtml, tests/rdfa/0174.out, tests/rdfa/0174.xhtml, 13 tests/rdfa/Makefile.am: 14 Added unapproved RDFa tests from librdfa upstream test suite: 15 0172: empty datatype attribute 16 0173: empty xml:lang attribute on plain literal 17 0174: single character namespace prefixes 18 19 0172 and 0173 test 20 Issue#0000306 http://bugs.librdf.org/mantis/view.php?id=306 21 22 0174 tests 23 Issue#0000310 http://bugs.librdf.org/mantis/view.php?id=310 24 25 * librdfa/rdfa.c: 26 (start_element): For raptor, turn a NULL language to "" which is 27 what librdfa expects. 28 29 * librdfa/curie.c, librdfa/language.c, librdfa/rdfa.c, 30 librdfa/triple.c: 31 Apply librdfa GIT commits up to 32 5823cb8bffe50fb1b46960f237f7274388cb5f93 33 34 commit 5823cb8bffe50fb1b46960f237f7274388cb5f93 35 Fixed @property CURIE processing unit tests to match code 36 updates. 37 38 commit a85d8e9e2e3d28452ad03d1ca64fdd98eed1c180 39 Fixed CURIE processing bug for TC 174. 40 41 The bug caused single-character prefixed CURIEs to be processed 42 incorrectly. Also fixed @property processing to not use reserved 43 words specified in a very early version of the RDFa spec. Fixed 44 a small bug related to processing CURIEs that have ':' as the 45 second character in the URI string. 46 47 commit f384b28bf916a2e0c7a7dbc99101a1a44c301965 48 Fixed plain literal bug uncovered by TC 172. 49 50 This bug caused plain literals to not be generated when 51 datatype="" was specified and when the content inside the element 52 contained XHTML child nodes. 53 54 * librdfa/language.c: 55 Apply librdfa GIT commit 56 9960791ee4beca8e52e5d3a9766aba73d33f0063 57 Fixed bug that caused unreviewed TC 173 to partially fail. 58 59 The currently active language, specified via xml:lang, was not 60 being cleared when xml:lang="" was specified. 61 62 Related to Redland Issue#0000306 63 http://bugs.librdf.org/mantis/view.php?id=306 64 652009-11-25 Dave Beckett <dave@dajobe.org> 66 67 * librdfa/rdfa.c, src/raptor_abbrev.c: Casts for C++ 68 692009-11-25 Lauri Aalto <laalto@iki.fi> 70 71 * src/raptor_abbrev.c: 72 (raptor_abbrev_subject_lookup): Free node if 73 raptor_new_abbrev_subject() ownership transfer did not succeed. 74 75 * src/raptor_abbrev.c: 76 (raptor_abbrev_subject_find): Check for failures. 77 78 * src/raptor_serialize_turtle.c: 79 (raptor_turtle_emit): Free iterators on before returning an error. 80 81 * src/raptor_abbrev.c, src/raptor_avltree.c: 82 (raptor_avltree_sprout): Always take ownership of passed in node 83 data - free it if malloc fails. Make sure free_fn is not null 84 before calling it. 85 86 (raptor_abbrev_node_lookup,raptor_abbrev_subject_add_property): 87 raptor_avltree_add() now always takes ownership of added nodes. 88 89 * src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: 90 fixed indent tabs -> spaces 91 92 * src/raptor_abbrev.c: 93 (raptor_abbrev_subject_invalidate): Return value expected 94 952009-11-24 Dave Beckett <dave@dajobe.org> 96 97 * many files: Merge from raptor branch raptor1 98 992009-11-23 Dave Beckett <dave@dajobe.org> 100 101 * src/raptor_abbrev.c, src/raptor_internal.h, 102 src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, 103 tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, 104 tests/feeds/test03-result.ttl, tests/feeds/test04-result.ttl, 105 tests/rdfxml/Makefile.am, tests/turtle/Makefile.am: Apply SVN 106 r15690 to raptor head 107 1082009-11-15 Dave Beckett <dave@dajobe.org> 109 110 * utils/rdfdiff.c: Apply SVN 15667 to raptor trunk 111 1122009-10-10 Dave Beckett <dave@dajobe.org> 113 114 * src/raptor_grddl.c: 115 (raptor_grddl_run_grddl_transform_uri): Fix XML parser context 116 resource leak if raptor_grddl_fetch_uri fails. 117 118 * src/raptor_grddl.c: 119 (raptor_grddl_parse_chunk): Save and restore error handlers 120 properly - restore loop was broken. Remove memcpy for clarity in 121 copying. 122 1232009-08-25 Dave Beckett <dave@dajobe.org> 124 125 * autogen.sh: Update common autogen.sh 126 1272009-08-21 Lauri Aalto <laalto@iki.fi> 128 129 * src/raptor_www.c: 130 (raptor_www_set_http_cache_control): Avoid dangling pointers 131 1322009-08-03 Lauri Aalto <laalto@iki.fi> 133 134 * src/raptor_internal.h: Fixed comment 135 1362009-07-27 Dave Beckett <dave@dajobe.org> 137 * src/turtle_parser.y 138 (main): Terminate parser 139 140 * src/turtle_lexer.l 141 (main): Init world and namespaces so turtle lexing test does not 142 die. 143 144 * src/raptor_parse.c 145 (raptor_parse_file): Simplify, no need for O_LARGEFILES flag and 146 open/fdopen sequence. 147 148 * configure.ac: 149 Check for fcntl.h and AC_SYS_LARGEFILE to get large file checks 150 151 * src/raptor_parse.c: 152 (raptor_parse_file): Use open(2) and apply O_LARGEFILE option to 153 allow 32bit systems to read multi-gigabyte files. 154 1552009-07-23 Dave Beckett <dave@dajobe.org> 156 157 * Changelog entries above this are on BRANCH raptor1 158 159 * Create raptor 1 branch (SVN r15287) 160 1612009-07-19 Dave Beckett <dave@dajobe.org> 162 163 * Tagged for raptor 1.4.19 (SVN r15280) 164 165 * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) 166 167 * src/raptor_serialize_rss.c: 168 (raptor_rss10_emit_item): Handle C++'s picky casting between enum 169 types - that are really integers - to ints. 170 171 * src/raptor_rss_common.c: static data raptor_rss_fields_info: 172 semantic data errors found by C++'s more strict aliasing. 173 - Fix author item class. 174 - Set URI flag value for atom:schema and atom:href 175 176 * src/raptor_namespace.c: 177 (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): 178 Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks 179 180 * src/raptor_grddl.c: 181 (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to 182 xsltSetCtxtSecurityPrefs. 183 184 * src/raptor_rfc2396.c: 185 (raptor_uri_resolve_uri_reference): Use memmove for overlapping 186 copy, not memcpy. [valgrind] 187 188 * src/raptor_serialize_json.c: raptor_json_context - use 189 raptor_statement_v2 for last statement. 190 (raptor_json_serialize_avltree_visit): Make V1 statements for the 191 stored V2 statements. 192 Improve fatal error messages. 193 194 * src/raptor_statement.c: 195 (raptor_free_statement): Restore actually freeing statement memory 196 - resource leak. 197 198 * configure.ac: libtool version change. 199 was: current 2 revision 0 age 1 200 rules steps: 201 3. source code changed: revision++ = 3 202 4. interfaces added and changed: current++ = 3, revision = 0 203 5. interfaces added: age++ = 2 204 6. interfaces removed: no 205 now: current 3 revision 0 age 2 206 207 * docs/libraptor.3: 1.4.19 changes 208 209 * src/raptor_turtle_writer.c: 210 (raptor_turtle_writer_literal): More silly games to prevent stupid 211 gcc warning: ignoring return value of 'strtol', declared with 212 attribute warn_unused_result so use the value and then discard it 213 in a stupid expression. Ditto strtod. 214 215 * src/raptor_uri.c: 216 (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: 217 ignoring return value of 'fwrite', declared with attribute 218 warn_unused_result but right now there is nowhere to return the 219 error too. 220 221 * src/raptor_rss.c: 222 (raptor_rss_uplift_fields): Comment out variables used only in 223 debugging. 224 225 * src/raptor_turtle_writer.c: 226 (raptor_turtle_writer_literal): Ignore unused return values from 227 strtol and strtod used for checking. 228 229 * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to 230 use experimental V2 APIs again 231 232 * configure.ac, src/Makefile.am, src/raptor_internal.h, 233 src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this 234 for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when 235 building 236 237 * src/Makefile.am, src/raptor.h, src/raptor_internal.h, 238 src/raptor_v2.h: Added raptor_v2.h again - internal only and put 239 scary warning about V2 things into raptor.h 240 241 * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 242 structs and functions 243 244 * src/Makefile.am: Remove raptor_v2.h - bad idea for now 245 246 * src/Makefile.am, src/raptor.h, src/raptor_internal.h, 247 src/raptor_v2.h: Move public V2 structs and prototypes to internal 248 raptor_v2.h 249 250 * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now 251 252 * COPYING, COPYING.LIB: Add specific versions of GPL (2) and 253 LGPL (2.1) to source control 254 2552009-07-16 Dave Beckett <dave@dajobe.org> 256 257 * docs/raptor-docs.xml, docs/raptor-sections.txt, 258 docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, 259 docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: 260 Add new functions. Add section world for init/cleanup and V2 261 world stuff 262 263 * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: 264 (raptor_new_sequence_v2): Renamed from 265 raptor_new_sequence_with_handler_context 266 267 * tests/rdfxml: Ignore automake outputs 268 269 * tests/ntriples: Ignore automake outputs 270 271 * tests/feeds: Ignore ttl outputs 272 273 * tests/feeds/Makefile.am: (check-serialize-atom): Make test use 274 generated file from build dir. 275 276 * utils/rapper.c: calloc another feature_value 277 278 * tests/feeds/Makefile.am: set result=1 on failures 279 280 * utils/rapper.c: calloc feature_value so that fields are 281 initialised to 0/NULL 282 283 * Raptor passes 'make check' test suite as of SVN r15234 284 285 * src/raptor_serialize_rss.c: Guess whether <atom:summary> on 286 input is xml or not based on if it starts with < 287 288 * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, 289 tests/feeds/test02.rdf: Add <div>...</div> once to descs 290 291 * tests/feeds/test02.rdf: use <div>...</div> in descriptions 292 293 * tests/feeds/test03-result.atom: fix relative atom:link @href in 294 expected output 295 296 * src/raptor_serialize_rss.c: 297 (raptor_rss10_emit_atom_feed): Output relative URIs for 298 <atom:link @href> 299 300 * src/raptor_serialize_rss.c: Extra/tidy debug messages 301 3022009-07-15 Dave Beckett <dave@dajobe.org> 303 304 * src/raptor_serialize_rss.c: 305 (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use 306 raptor_rss_item_set_uri to always assign item identifier and uri 307 fields correctly. 308 309 * src/raptor_rss.h, src/raptor_rss_common.c: 310 (raptor_rss_item_set_uri): Added to set the item identifier fields 311 plus the item->uri field correctly. 312 3132009-07-13 Dave Beckett <dave@dajobe.org> 314 315 * autogen.sh: Add SHAVE support - disabled by default and enabled 316 for maintainers. 317 libtool V2 needed 318 Add -Wall to automake args 319 Reorder args to remove dups 320 Find config_aux_dir and config_macro_dir and use them for copying in 321 config.{sub,guess} and adjusting aclocal args respectively. 322 3232009-06-21 Dave Beckett <dave@dajobe.org> 324 325 * src/raptor_serialize_rss.c: 326 (raptor_rss10_move_statements, raptor_rss10_store_statement): When 327 mapping fields rss to atom, do not copy into a field that has a 328 value already. 329 3302009-06-13 Dave Beckett <dave@dajobe.org> 331 332 * src/raptor_parse.c: 333 (raptor_get_name): Use factory method if present. 334 335 * src/raptor_guess.c: 336 (raptor_guess_guess_get_name): Implement get_name by passing it on 337 to internal guessed parser. 338 (raptor_guess_parser_register_factory): Register get_name 339 340 * src/raptor_internal.h: struct raptor_parser_factory_s gains 341 get_name method 342 343 * src/raptor_guess.c: 344 (raptor_guess_parse_chunk): docs 345 346 * src/raptor_grddl.c: 347 (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* 348 sheet is defined as not NULL. GRDDL transforms now work again. 349 350 * utils/rapper.c: 351 (main): If counting, do not use a serializer at all. 352 3532009-05-16 Dave Beckett <dave@dajobe.org> 354 355 * src/raptor_serialize_rss.c: autodocs 356 357 * src/raptor_rss.c: 358 (raptor_rss_insert_rss_link): Added to add rss:link from atom:id 359 or <link rel=self> 360 (raptor_rss_insert_identifiers): Call above for channel and items. 361 362 * tests/feeds/test04-result.ttl: items and rss:links point to url 363 not tag: uri 364 365 * tests/feeds/test05-result.ttl: Moved dc:date to top 366 367 * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: 368 Added more atom:entrymap values 369 3702009-05-12 Dave Beckett <dave@dajobe.org> 371 372 * src/raptor_rss.c: 373 (raptor_rss_insert_identifiers): Add an rss:link with 374 /atom:link[@rel="self"]/@href string contents if not already 375 present. 376 377 * src/raptor_rss.c: 378 (raptor_rss_emit_block): Add resource parameter for the subject of 379 the triples to set. Do not try to play save/restore games with 380 the statement.subject 381 (raptor_rss_emit_item): Pass in item identifier to above. 382 3832009-05-11 Dave Beckett <dave@dajobe.org> 384 385 * src/raptor_rss.c: 386 (raptor_rss_emit_item): Set the atom author output node type by a 387 quick hack to alter the URIs. 388 3892009-05-10 Dave Beckett <dave@dajobe.org> 390 391 * src/raptor_rss.c: raptor_rss_uplift_map merged into 392 raptor_atom_to_rss 393 (raptor_rss_copy_field): Added to do field copy/conversion with 394 pair 395 (raptor_rss_uplift_fields): Iterate over list of conversions and 396 call raptor_rss_copy_field. 397 398 * src/raptor_rss_common.c: 399 (raptor_rss_field_conversion_date_uplift): Added for converting 400 from junk date to ISO dates. 401 (raptor_rss_date_uplift): Deleted, replaced by above. 402 raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and 403 uses above conversion function to fix rss:pubdate to dc:date 404 405 * src/raptor_rss.h: Add raptor_rss_field_conversion for converting 406 field values and add to raptor_field_pair 407 408 * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title 409 fields 410 4112009-05-09 Dave Beckett <dave@dajobe.org> 412 413 * tests/feeds/test04-result.ttl: add both rss and renamed atom 414 fields rather than just one: 415 - dc:date & atom:updated 416 - rss:title & atom:title 417 - atom:id 418 - atom:summary 419 420 * src/raptor_rss.c: 421 (raptor_rss_start_element_handler): Remove renaming of atom terms 422 to rss 423 (raptor_rss_uplift_fields): Add copying of atom to rss terms, not 424 renaming. 425 426 * src/raptor_rss_common.c: atom:author is a container, not a block 427 raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER 428 raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS 429 raptor_rss_block_fields_info - remove author from list of blocks 430 431 * tests/feeds/test04.atom: Restore xhtml namespace to div 432 4332009-05-01 Dave Beckett <dave@dajobe.org> 434 435 * docs/tmpl/section-general.sgml: update tmpls 436 437 * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, 438 tests/turtle/test-32.ttl: Added test-32 based on test for 439 http://bugs.librdf.org/mantis/view.php?id=274 440 441 * src/raptor_serialize_turtle.c: 442 (raptor_turtle_emit_subject_collection_items): Notice when a new 443 subject happens and reset property iterator. 444 (raptor_turtle_emit_subject): Look for trees with 2 or more 445 properties to be a potential collection. 446 Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 447 448 * src/raptor_parse.c: 449 (raptor_get_feature): Return raw parser int feature. 450 Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 451 452 * src/raptor_feature.c: raptor_features_list use bit 16 to record 453 that an int is not a boolean flag. Should refactor these flags 454 for Raptor V2 and alter the raptor_feature_value_type() return. 455 4562009-04-30 Dave Beckett <dave@dajobe.org> 457 458 * tests/feeds/Makefile.am: Add atom to turtle expected results to 459 EXPECTED_TTLS 460 461 * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist 462 463 * tests/turtle/Makefile.am: More fixes for make distcheck testing 464 465 * tests/turtle/Makefile.am: 466 (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get 467 filenames from invoking Makefiles in nearby build-dirs not 468 src-dirs, which won't have makefiles in 'make distcheck' mode 469 470 * tests/ntriples/Makefile.am: Revert r15175 471 472 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 473 'make distcheck' mode 474 475 * src/raptor_sax2.c: 476 (raptor_sax2_parse_chunk): Make undeclared entity not fatal in 477 parsing - errors are still thrown by the error callback, but 478 parsing continues. Makes 479 http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with 480 - primary data gets out when errors are present; when DTDs are not 481 loaded. 482 483 * src/raptor_libxml.c: 484 (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in 485 parser context user data too. 486 487 * src/raptor_sax2.c: 488 (raptor_new_sax2): Save correct libxml error handlers 489 4902009-04-24 Dave Beckett <dave@dajobe.org> 491 492 * src/raptor.h: Revert raptor_error_handlers ABI change for now 493 4942009-04-23 Dave Beckett <dave@dajobe.org> 495 496 * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, 497 src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() 498 and xmlSetGenericErrorFunc() by libxml flags and if enabled, save 499 and restore the previous values. Added 500 raptor_set_libxml_flags() (raptor V1) and 501 raptor_world_set_libxml_flags() (raptor V2) to set these flags. 502 Flags are defined in new enum raptor_libxml_flags. 503 504 Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 505 506 * docs/tmpl/section-feature.sgml, src/raptor.h, 507 src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, 508 src/raptor_parse.c: Use context-specific libslt security 509 configuration to avoid calling xsltSetDefaultSecurityPrefs(). 510 511 Also allow user to set the policy for raptor globally with new API 512 function raptor_set_libxslt_security_preferences() (and in Raptor V2 513 with raptor_world_set_libxslt_security_preferences method on the 514 world class) 515 516 Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 517 5182009-04-21 Dave Beckett <dave@dajobe.org> 519 520 * src/raptor_libxml.c: 521 (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init 522 per-context structured error handlers to go to 523 raptor_libxml_xmlStructuredErrorFunc 524 525 * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked 526 libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for 527 parsedate) 528 529 * configure.ac, raptor.pc.in, src/Makefile.am: Introduce 530 RAPTOR_LDFLAGS to replace raw LIBS as the internal set of 531 arguments to use in linking. 532 533 * configure.ac, src/Makefile.am, utils/Makefile.am: Add 534 --enable-debug configure option. use AM_CPPFLAGS for defines and 535 include options Remove unused STANDARD_CFLAGS 536 5372009-03-31 Lauri Aalto <laalto@iki.fi> 538 539 * src/raptor_namespace.c: 540 (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of 541 malloc to have struct members initialized to zero in case 542 raptor_namespaces_init_v2() fails and need to free a partially 543 initialized nstack. 544 5452009-03-30 Dave Beckett <dave@dajobe.org> 546 547 * configure.ac, src/raptor_serialize_rss.c: Test for 548 gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition 549 to avoid calling it on windows that doesn't have it. Patch from 550 Lou Sakey 2008-07-31 to redland-dev 551 552 * src/raptor_sax2.c: 553 (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to 554 avoid an access violation on windows. Patch from Lou Sakey 555 2008-07-31 to redland-dev. 556 557 * src/raptor_general.c: 558 (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou 559 Sakey. 560 5612009-03-29 Dave Beckett <dave@dajobe.org> 562 563 * configure.ac: Substitute ECHO 564 565 * src/raptor_rss.c: 566 (raptor_rss_start_element_handler): Make namespaces seen in fields 567 after any potential renames, so they will get declared later. 568 (raptor_rss_end_element_handler): End any blocks in all cases - 569 was not happening when there was no cdata. 570 (raptor_rss_emit_block): Only emit block strings that are not 571 NULL. 572 (raptor_rss_emit_connection): Turn predicate ordinals into URIs 573 since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle 574 serialiser does not handle it). 575 (raptor_rss_uplift_fields): Gain rss_parser arg and mark 576 namespaces seen in renames. 577 578 * src/raptor_rss_common.c: raptor_rss_fields_info - restore 579 rss:link value to string. raptor_rss_block_fields_info - fix 580 clashing offset for atom author name/email fields. 581 5822009-03-28 Dave Beckett <dave@dajobe.org> 583 584 * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, 585 tests/feeds/test04-result.ttl, tests/feeds/test04.atom, 586 tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 587 and test05 atom parsing to turtle. Update test suite to show 588 errors better and use ECHO macros 589 590 * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf 591 592 * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that 593 ex-62.rdf gets used 594 595 * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, 596 tests/turtle/test-31.ttl: Add tests for serializing rdf:_<n> 597 properties back to themselves. 598 5992009-03-23 Dave Beckett <dave@dajobe.org> 600 601 * tests/feeds/Makefile.am: use conditionals to execute tests in 602 sane order via FEED_TESTS var 603 604 * tests/feeds/Makefile.am: 605 (check-serialize-atom): Set parser/input base URI for test. 606 607 * tests/feeds/Makefile.am: notes 608 609 * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, 610 tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add 611 parsing and serializing tests with intermediate turtle results to 612 check 613 614 * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, 615 src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, 616 src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, 617 src/raptor_xml_writer.c: Renamed 618 RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to 619 RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change 620 meaning; it always declares prefix: and default namespace but this 621 option flips whether it core vocab is in the prefixed or default 622 namespace. 623 624 * src/raptor_serialize_rss.c: 625 (raptor_rss10_build_xml_names): Do not declare or start namespaces 626 with NULL prefix; only the default namespace *may* do that. 627 6282009-03-20 Dave Beckett <dave@dajobe.org> 629 630 * tests/feeds/test01-result.atom: fix namespaces 631 632 * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, 633 tests/feeds/test03-result.atom: Add namespaces back to all 634 expected results 635 636 * src/raptor_serialize_rss.c: 637 (raptor_rss10_build_xml_names): Enable turning on/off namespaced 638 elements based on feature_alias_default_namespace 639 6402009-03-19 Dave Beckett <dave@dajobe.org> 641 642 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, 643 tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: 644 Remove -f aliasDefaultNamespace=0 from tests for now, to enable 645 fixing of other things on their own 646 6472009-03-17 Dave Beckett <dave@dajobe.org> 648 649 * tests/feeds/Makefile.am: use $(srcdir) before expected 650 651 * tests/feeds/Makefile.am: report failure diff the right way 652 around: from expected to actual 653 6542009-03-12 Dave Beckett <dave@dajobe.org> 655 656 * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: 657 Fix atom namespaces 658 659 * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 660 661 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, 662 tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: 663 Add expected test results, make check works from Makefile alone 664 665 * tests/feeds/Makefile.am: Fix RAPPER call 666 6672009-03-10 Dave Beckett <dave@dajobe.org> 668 669 * tests/feeds/test01.atom, tests/feeds/test02.atom, 670 tests/feeds/test03.atom: Remove atom output - now generated via 671 test 672 673 * tests/feeds/Makefile.am: fix error in error logging 674 675 * configure.ac, tests/Makefile.am, tests/feeds, 676 tests/feeds/Makefile.am: automaked tests/feed 677 678 * tests/feeds/Makefile: Removed, now autogenerated 679 6802009-02-28 Dave Beckett <dave@dajobe.org> 681 682 * src/raptor_serialize_rss.c: comments 683 684 * src/raptor_serialize_rss.c: 685 (raptor_rss10_serialize_statement): 686 Code style, remove if() depth. 687 6882009-02-27 Dave Beckett <dave@dajobe.org> 689 690 * src/raptor_rss_common.c: Make itunes:owner container work again. 691 6922009-02-25 Dave Beckett <dave@dajobe.org> 693 694 * src/raptor_rss_common.c: fix enclosure class/predicate RDF names 695 696 * src/raptor_rss.h, src/raptor_rss_common.c: Added 697 RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as 698 RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF 699 700 * src/raptor_rss.c: 701 (raptor_rss_start_element_handler): Declare as 702 seen the namespace for a block. 703 704 * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK 705 block type 706 707 * src/raptor_rss.c: 708 (raptor_rss_emit_block): Emit type URI from 709 cls field, not predicate. 710 7112009-02-23 Dave Beckett <dave@dajobe.org> 712 713 * src/raptor_rss.c: raptor_rss_element loses unused rel field 714 715 * src/raptor_rss.c: 716 (raptor_rss_start_element_handler): Remove 717 unused element attribute recognition <source url> and <category domain> 718 719 * src/raptor_rss.c: 720 (raptor_rss_start_element_handler): Set 721 enclosure namespace used if an enclosure block was seen. 722 7232009-02-22 Dave Beckett <dave@dajobe.org> 724 725 * src/raptor_rss_common.c: raptor_rss_items_info - add block 726 predicate types raptor_rss_fields_info - make atom:author a 727 block. add atom:Author, atom:Category, atom:label, atom:schema and 728 atom:term raptor_rss_block_fields_info - add new predicates for 729 atom:category block add atom:author block 730 731 * src/raptor_rss.c: raptor_rss_parser gains current_block field to 732 store current metadata block object. 733 (raptor_rss_start_element_handler): Set current_block. 734 (raptor_rss_end_element_handler): Store any cdata in block field 735 with NULL attribute if there is one. 736 737 * src/raptor_rss.c: 738 (raptor_rss_start_element_handler): Wildcard element name matches 739 for RSS namespaces 740 741 * src/raptor_rss.c: 742 (raptor_rss_block_set_field): Added. 743 (raptor_rss_start_element_handler): Use above to set a block 744 attribute value 745 746 * src/raptor_rss.c: raptor_rss_parser - comment. 747 (raptor_rss_start_element_handler): Use 748 raptor_rss_get_current_item to get item. When checking block 749 attributes, skip NULL attribute names - for element cdata 750 751 * src/raptor_rss.c: 752 (raptor_rss_emit_block): Code style and skip block fields with no name. 753 (raptor_rss_emit_item): Code style. 754 755 * src/raptor_rss_common.c: raptor_rss_fields_info modify to make 756 rss:link and rss:docs take URLs 757 758 * src/raptor_rss.c, src/raptor_rss_common.c, 759 src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for 760 enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate 761 762 * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss 763 container 764 765 * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace 766 and itunes:owner container with fields in namespace itunes: 767 author, subtitle, summary, keywords explicit, image, name, block, 768 category and email 769 770 * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses 771 RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss 772 category - just make it a string value 773 774 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: 775 raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with 776 RAPTOR_RSS_NONE everywhere 777 7782009-02-21 Dave Beckett <dave@dajobe.org> 779 780 * src/raptor_rss.h, src/raptor_rss_common.c, 781 src/raptor_serialize_rss.c: raptor_rss_field_info renamed from 782 raptor_rss_info 783 784 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, 785 src/raptor_serialize_rss.c: raptor_rss_items_info renamed from 786 raptor_rss_types_info raptor_rss_types_info gains a flags field to 787 distinguish blocks from containers. 788 (raptor_rss_add_container): Use flag to only scan containers, not 789 blocks. 790 (raptor_rss_emit_block): Handle all types of blocks. Use the node 791 type from raptor_rss_types_info to emit the node type. Use the 792 raptor_rss_block_fields_info to emit the predicates for all 793 blocks. 794 7952009-02-20 Dave Beckett <dave@dajobe.org> 796 797 * src/raptor_rss.c: 798 (raptor_rss_start_element_handler): Code style. 799 800 * src/raptor_rss.c: 801 (raptor_rss_insert_identifiers): Tidy to use 802 raptor_set_identifier_uri. Indenting. 803 804 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, 805 src/raptor_serialize_rss.c: 806 (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, 807 raptor_rss10_serialize_statement): Use raptor_set_identifier_uri 808 and raptor_set_identifier_id and refactor to use them better. 809 (raptor_rss_block_make_blank_node, 810 raptor_rss_insert_block_identifiers): Deleted. 811 (raptor_rss_item_equals_statement_subject): Added. 812 (raptor_new_rss_block): Add id argument. 813 814 * src/raptor_identifier.c, src/raptor_internal.h: 815 Added raptor_set_identifier_uri and raptor_set_identifier_id 816 817 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, 818 src/raptor_serialize_rss.c: Remove old enclosure core and switch 819 to data-driven raptor_rss_block metadata code. Update copyrights 820 for 2009. typedef raptor_rss_block_fields_info renamed from 821 raptor_rss_block_info and add docs. Renamed field 'attribute' 822 from field_name, attribute_type from field_type. Added rdf 823 predicate info 'field'. raptor_rss_block_fields_info adds 824 predicate info. 825 (raptor_rss_start_element_handler): Read from 826 raptor_rss_block_fields_info. 827 (raptor_rss_insert_block_identifiers): Renamed from 828 raptor_rss_insert_enclosure_identifiers. 829 (raptor_rss_insert_identifiers): Call above with new name. 830 (raptor_rss_emit_block): Use more data tables to emit block. 831 832 * src/raptor_rss_common.c: Add sentinel to end 833 raptor_rss_blocks_info array 834 835 * src/raptor_rss.c: 836 (raptor_rss_start_element_handler): Recognise blocks from flags 837 and handle <enclosure> attributes @url, @length and @type - 838 statically for now. 839 840 * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains 841 block flag and block_type to use when a block is found. 842 843 * src/raptor_rss.c: 844 (raptor_rss_start_element_handler): Fix conditions for recognizing 845 inner containers. 846 847 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add 848 raptor_rss_block_info to record other metadata blocks 849 configuration: rss enclosues, atom categories, rss category and 850 rss source. Switch raptor_rss_block structure from a list of 851 specific fields to short arrays of urls and strings. 852 (raptor_free_rss_block, raptor_rss_start_element_handler, 853 raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): 854 Switch to generic raptor_rss_block URLs, strings 855 8562009-02-20 Lauri Aalto <laalto@iki.fi> 857 858 * src/raptor_rss.c: 859 (raptor_rss_emit_block): Compilation fix after function parameter 860 rename 861 8622009-02-19 Dave Beckett <dave@dajobe.org> 863 864 * src/raptor_rss.c: 865 (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure 866 867 * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type 868 869 * src/raptor_rss.c: Code style / whitespace. 870 (raptor_rss_end_element_handler): Use 871 raptor_rss_get_current_item() to get update_item. 872 8732009-02-18 Dave Beckett <dave@dajobe.org> 874 875 * src/raptor_rss.c: 876 (raptor_rss_get_current_item): Pull logic out to get item for 877 current type. 878 (raptor_rss_start_element_handler): Fix inner container 879 processing. Look for rdf:about on an item to get item URI there 880 first. Pull out enclosure construction from general field 881 handling. 882 883 * src/raptor_rss.c: 884 (raptor_rss_start_element_handler): Remove extra code block & 885 outdent. 886 887 * src/raptor_rss.c: 888 (raptor_rss_promote_namespace_uri): Added for storing namespace 889 change rules. 890 (raptor_rss_start_element_handler): Use above to simplify field 891 search logic. Document how an element matches a field. 892 893 * src/raptor_rss.c: 894 (raptor_rss_add_container): Add rules about inner containers, 895 setting prev_type if seen and put author element ambiguity rules 896 here. 897 (raptor_rss_start_element_handler): Use above to replace inner 898 container identification code. 899 900 * src/raptor_rss.c: 901 (raptor_rss_add_container): Added, pulled out of 902 raptor_rss_start_element_handler to include the logic for 903 determining feed type and container from element name. 904 (raptor_rss_start_element_handler): Call above. 905 906 * src/raptor_rss.c: 907 (raptor_rss_start_element_handler): Comments and tidying control 908 flow when identifying a container for rss_parser->current_type 909 910 * src/raptor_rss.c: 911 (raptor_rss_block_make_blank_node): Added 912 pulled out of raptor_rss_insert_identifiers 913 (raptor_rss_insert_identifiers): Call above. 914 915 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: 916 raptor_rss_block gains rss_type field 917 (raptor_new_rss_block): Take type as param and use to set 918 node_type. 919 (raptor_rss_insert_enclosure_identifiers): Remove node_type init 920 and let raptor_new_rss_block set it. 921 (raptor_rss_start_element_handler): Call raptor_new_rss_type with 922 param for enclosure. 923 924 * src/raptor_rss.h: prototype param 925 926 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: 927 raptor_rss_item renamed field enclosure to blocks. 928 (raptor_rss_insert_identifiers, raptor_rss_emit_item, 929 raptor_free_rss_item, raptor_rss_item_add_block): Renamed 930 item->enclosure to item->blocks and renamed variables. 931 932 * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: 933 Rename raptor_rss_enclosure to raptor_rss_block throughout and 934 corrected naming convention. 935 936 (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. 937 (raptor_rss_item_add_block): Renamed from 938 raptor_rss_item_add_enclosure. 939 (raptor_free_rss_block): Renamed from raptor_enclosure_free. 940 941 * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, 942 src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, 943 src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, 944 src/raptor_xml_writer.c, utils/rapper.c: 945 Added serializer feature 946 RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for 947 atom and rss 1.0 serializers to prevent declaring the default 948 namespace twice with a prefix and without. raptor_feature gains 949 RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains 950 new feature 951 952 (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, 953 raptor_xml_writer_set_feature, raptor_set_feature, 954 raptor_get_feature, raptor_serializer_set_feature_string, 955 raptor_serializer_get_feature_string): enum extensions for 956 raptor_feature switches. struct raptor_serializer_s gains int 957 field feature_alias_default_namespace 958 raptor_rss10_serializer_context gains a flag free_default_nspace 959 to know when to free default namespace now that it may not be 960 needed. 961 (raptor_rss10_serialize_terminate): Use the free_default_nspace 962 flag. 963 (raptor_rss10_build_xml_names): Implement altered namespace 964 declaration rules. 965 (raptor_new_serializer_v2): Initialise default namespace aliasing 966 to true by default. 967 (raptor_serializer_set_feature): Set flag. 968 969 * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 970 9712009-02-18 Lauri Aalto <laalto@iki.fi> 972 973 * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in 974 raptor_sax2 975 976 (raptor_sax2_s): Internal struct gains "failed" field. 977 978 (raptor_sax2_parse_start): 979 Check for raptor_namespaces_init_v2() failure and set sax2 struct 980 failure flag. 981 982 (raptor_sax2_start_element, raptor_sax2_end_element, 983 raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, 984 raptor_sax2_unparsed_entity_decl, 985 raptor_sax2_external_entity_ref): 986 No-op if sax2 struct in failed state. 987 988 * src/raptor_namespace.c: 989 (raptor_namespaces_init_v2): Check for alloc failure 990 991 * src/raptor_namespace.c: 992 (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent 993 use-before-init warnings from some optimizing compilers. 994 9952009-02-17 Dave Beckett <dave@dajobe.org> 996 997 * src/raptor_namespace.c: 998 (raptor_namespaces_get_default_namespace): Make this work again - 999 look for default namespace in correct bucket. 1000 1001 * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: 1002 Replace namespace storage from a linked list to a hash on prefix 1003 using raptor_hash_ns_string() witb a DJ Bernstein hash. This 1004 makes turtle parsing with lots of namespaces (100s) much faster. 1005 Based on the initial patch in the bug it fixes. 1006 1007 Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 1008 10092009-02-10 Dave Beckett <dave@dajobe.org> 1010 1011 * src/raptor_serialize_rdfxmla.c: 1012 (raptor_rdfxmla_ensure_writen_header): 1013 For XMP add a cosmetic newline after <?xpacket> 1014 1015 * src/raptor_rdfxml.c: 1016 (raptor_rdfxml_generate_statement): Adjust predicate_type when 1017 removing ordinal identifier type from predicate. 1018 Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 1019 1020