Share

More
Redland RDF Libraries Icon

Redland RDF Libraries

by dajobe


Redland is a set of object-based, modular and portable C RDF libraries providing RDF APIs for the graph, storage, RDF/XML parsing and serializing (Raptor), RDQL and SPARQL RDF querying (Rasqal). Language APIs in Perl, PHP, Python, Ruby and others.


http://librdf.org/





Separate each tag with a space.

Ratings and Reviews

  • Thumbs up:

    1
  • Thumbs down:

    0
100% of 1 user recommends this project

Be the first to post a text review of Redland RDF Libraries. Rate and review a project by clicking thumbs up or thumbs down in the right column.

View all reviews

Project Feed

  • Raptor RDF Parser Library 1.4.19 Released

    * Many improvements to RSS tag soup (RSSes and Atom) parser and the RSS 1.0 and Atom serializers. * Several fixes and improvements to the N-Triples, RDFa and RDF/XML parsers and Turtle serializer. * I...

    posted by dajobe 111 days ago

  • File released: /raptor/1.4.19/raptor-debuginfo-1.4.19-1.x86_64.rpm

    posted 111 days ago

  • File released: /raptor/1.4.19/raptor-1.4.19-1.src.rpm

    posted 111 days ago

  • File released: /raptor/1.4.19/raptor-devel-1.4.19-1.x86_64.rpm

    posted 111 days ago

  • File released: /raptor/1.4.19/raptor-1.4.19-1.x86_64.rpm

    posted 111 days ago

  • File released: /raptor/1.4.19/raptor-1.4.19.tar.gz

    posted 111 days ago

  • raptor 1.4.19 file released: raptor-devel-1.4.19-1.x86_64.rpm

    2009-07-19 Dave Beckett * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes 2009-07-17 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether <atom:summary> on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add <div>...</div> once to descs * tests/feeds/test02.rdf: use <div>...</div> in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for <atom:link @href> * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or <link rel=self> (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_<n> properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition <source url> and <category domain> * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle <enclosure> attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after <?xpacket> * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 2008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds

    posted 111 days ago

  • raptor 1.4.19 file released: raptor-debuginfo-1.4.19-1.x86_64.rpm

    2009-07-19 Dave Beckett * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes 2009-07-17 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether <atom:summary> on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add <div>...</div> once to descs * tests/feeds/test02.rdf: use <div>...</div> in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for <atom:link @href> * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or <link rel=self> (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_<n> properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition <source url> and <category domain> * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle <enclosure> attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after <?xpacket> * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 2008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds

    posted 111 days ago

  • raptor 1.4.19 file released: raptor-1.4.19.tar.gz

    2009-07-19 Dave Beckett * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes 2009-07-17 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether <atom:summary> on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add <div>...</div> once to descs * tests/feeds/test02.rdf: use <div>...</div> in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for <atom:link @href> * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or <link rel=self> (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_<n> properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition <source url> and <category domain> * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle <enclosure> attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after <?xpacket> * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 2008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds

    posted 111 days ago

  • raptor 1.4.19 file released: raptor-1.4.19-1.x86_64.rpm

    2009-07-19 Dave Beckett * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes 2009-07-17 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether <atom:summary> on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add <div>...</div> once to descs * tests/feeds/test02.rdf: use <div>...</div> in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for <atom:link @href> * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or <link rel=self> (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_<n> properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition <source url> and <category domain> * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle <enclosure> attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after <?xpacket> * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 2008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds

    posted 111 days ago

Rate and Review

Would you recommend this project?






<

Related Projects

Redland RDF Libraries Actions

Thanks for your rating!

Would you also like to write a review?





Skip Review