Raptor RDF Parser Library - Release Notes

Raptor 1.4.21 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway.

Fixed Issues:

Parser changes

N-Triples parser: Declare acceptance of text/plain mime type with q=0.1

RDFA parser (via librdfa): Updated to fix some buffer management problems when it was passed large blocks (4096 bytes or more), a few memory leaks and some other minor bugs.

RDF/XML parser: Properly reset the ID-checking set at the start of each parse.

Turtle parser: Allow \\ at the end of triple-quoted literals. Forbid '.'s in prefixes and qnames (follow specification). Properly count newlines inside the literals for error reporting.

Serializer changes

Turtle serializer: Forbid '.'s in prefixes and qnames (follow specification).

Other Changes

Updated configure and the build system to use silent rules for the maintainer (by default), or when --enable-silent-rules is passed to configure. This feature requires building with automake 1.11 which requires autoconf 2.62 or newer when building from GIT.

autogen.sh script was updated to enforce the autotools versions above.

Raptor 1.4.20 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

Parser Changes

GRDDL parser: Fix XML parser context resource leak if raptor_grddl_fetch_uri() fails. Save and restore error handlers properly to prevent crashes when an error is reported during parsing.

RDFA parser (via librdfa): Update to latest librdfa GIT sources with head a438ce68a40e04b399ec2b2c613d0c867d9315c7
now moved to http://github.com/msporny/librdfa to fix handling single character namespaces (Issue#0000310), empty datatype attribute and empty xml:lang attributes (Issue#0000306)

Added three unapproved RDFa tests 0172, 0173 and 0174 to cover the fixes above.

Serializer Changes

Turtle serializer: Applied scalability patch from Chris Cannam. This switches the serializer to use a raptor_avltree instead of a raptor_sequence for the subject and blanks used with raptor_abbrev_node_lookup(). This fixes a performance problem in the serializing and moves lookups from O(N) to O(log N) - from list to balanced tree.

Other Changes

If cross compiling, check for vsnprintf() C99 compatible at runtime by setting define CHECK_VSNPRINTF_RUNTIME during configuration. Fixes Issue#0000307

Use calloc() for allocating a raptor_statement in rdfserializer.c example code to properly initialise state. Fixes Issue#0000312

Use AC_SYS_LARGEFILE to get large file IO checks which allows 32-bit systems to read multi-gigabyte files.

autogen.sh script fix for if test when uname is not in standard OSX dir.

Raptor 1.4.19 Changes

WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

Parser Changes

raptor_get_feature() now returns the integer value rather than just 1 or 0.
Issue #0000288

Guess parser: return name of guessed parser not 'guess'.

N-Triples parser: Produce error messages when raptor_new_uri() fails.
Issue #0000262

RDFa parser: Fix problem when there is a subject and predicate specified on an element, but no child nodes for the object literal using latest librdfa GIT source with head 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a
Issue #0000289

RSS tag soup parser: Huge internal changes:
Recording more atom core structures in triples (such as author, contributor - person) rather than only channels and items
Introduced a new 'blocks' concept to record single element structured items such as atom category, link and rss enclosure
Added itunes namespace and container.

RDF/XML Parser: Adjust predicate_type when removing ordinal identifier type from predicate.
Issue #0000293

Serializer Changes

Atom 1.0 serializer: Now tested and takes more care to try to generate valid Atom 1.0

Turtle serializer: 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.
Issue #0000263
Fix broken collection abbreviation
Issue #0000277

RSS serializer: Fixes for g++
Issue #0000270
Added a new serializer feature RAPTOR_FEATURE_PREFIX_ELEMENTS (short name prefixElements) for atom and rss 1.0 serializers to decide whether core elements in the default namespace are declared with the prefix or without a prefix.
Removed generation of deprecated predicate ordinals of type RAPTOR_IDENTIFIER_TYPE_ORDINAL and replace with resource type URIs

XML Support Changes

Removed generic calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() which can be a problem when libxml is shared with other code in memory. They may be called optionally but will do a save/restore of the existing functions. This protection is enabled by the new API call raptor_set_libxml_flags() to set the flags from values in enum raptor_libxml_flags.
Issue #0000299

Use context-specific libslt security configuration to avoid calling generic call xsltSetDefaultSecurityPrefs() which can be a problem when libxslt is shared with other code in memory. Allow the user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences().
Issue #0000296

Make libxml SAX2 structured errors register parser-specific handler function raptor_libxml_xmlStructuredErrorFunc() instead of libxml global structured error handler. The libxml flag method above can still enable registerding the global error handlers.

In raptor_sax2_parse_chunk() fixed calls to raptor_log_error_to_handlers() when built with expat.
Issue #0000287

Other Changes

Win32 portability fixes from Lou Sakey:

rapper(1) utility changes: if counting, do not use a serializer at all.

Internal Changes

More internal changes to be more resiliant after allocation failure (Lauri Aalto)

Reorganised tests in source tree to pull out specific directories for RDF/XML, Turtle, etc.

Use a DJ Bernstein hash to replace a linked list for storing a stack of namespaces. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug.
Issue #0000290

Use new internal raptor_memstr() function to compare a string against a buffer that may not be NUL terminated.
Issue #0000269

raptor_error_handlers: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_error_handlers) changed. Source compatibility not broken.

raptor_identifier: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken.

More fixes for compiling with C++

Move some more static data as constant to enable more efficient compilation - moves to data segment of object binary.

Use memmove for overlapping copy, not memcpy when doing relative URI resolving.

Raptor V2 Preparation Changes

Lots of internal changes were made by Lauri Aalto preparing for Raptor V2 to fully attach all static data and config to a new raptor_world object. A new static instance of this class is now used internally behind the existing V1 API and will be required to be constructed by the library user for the V2 API with a new constructor/destructor.

NOTE: The method names here are illustrative of the final V2 names but are not confirmed - These functions are not supported in the 1.4.x series. Some methods will still be altered for fields and (raptor_world) parameters. All constructors should have it as a parameter. All methods will not have them (so for example, all the URI methods named _v2 will lose the world parameter and just have the URI parameter - but that is also because the URI handler/context part will go into raptor_world in V2)

To use the unsupported and experimental V2 functions, define -DRAPTOR_V2_EXPERIMENTAL=1 when building with raptor.

Added raptor_world typedef.

Added raptor world class constructor raptor_world* raptor_new_world(void) and initializer: int raptor_world_open(raptor_world* world)

Added world class destructor: void raptor_free_world(raptor_world* world)

Added new V2 methods:

  void raptor_world_set_libxslt_security_preferences(raptor_world *world,
    void *security_preferences)

  void raptor_world_set_libxml_flags(raptor_world *world,  int flags)

  void raptor_error_handlers_init_v2(raptor_world* world,
    raptor_error_handlers* error_handlers);

Added V2 methods that are versions of existing methods, named with _v2 suffix:

  int raptor_parsers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label)

  int raptor_syntax_name_check_v2(raptor_world* world, const char *name);

  void raptor_print_locator_v2(raptor_world* world, FILE *stream,
    raptor_locator* locator);

  const char *raptor_locator_uri_v2(raptor_world* world,
    raptor_locator *locator);

  int raptor_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,
    raptor_uri **uri, const char **label);

  int raptor_serializers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label,
    const char **mime_type, const unsigned char **uri_string);

  int raptor_serializer_syntax_name_check_v2(raptor_world* world,
    const char *name);

  int raptor_serializer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,  raptor_uri **uri,
    const char **label);

Added world pointer to raptor_identifier object

Added V2 identifier class constructor:

  raptor_identifier* raptor_new_identifier_v2(raptor_world* world,
    raptor_identifier_type type, raptor_uri *uri,
    raptor_uri_source uri_source, const unsigned char *id,
    const unsigned char *literal, raptor_uri *literal_datatype,
    const unsigned char *literal_language);

Added V2 parser class method:

  raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world,
    raptor_uri *uri, const char *mime_type, const unsigned char *buffer,
    size_t len, const unsigned char *identifier)
  raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser);

Added V2 serializer class constructor and method:

  raptor_serializer* raptor_new_serializer_v2(raptor_world* world,
    const char *name)
  raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer)

Added V2 statement class raptor_statement_v2 typdef for future replacing of raptor_statement

Added V2 statement class methods:

  void raptor_print_statement_v2(const raptor_statement_v2 * statement,
    FILE *stream);

  unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language,
    size_t* len_p);

  unsigned char* raptor_statement_part_as_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language);  

  int raptor_statement_compare_v2(const raptor_statement_v2 *s1,
    const raptor_statement_v2 *s2);

Added V2 uri class methods:

  unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_v2(raptor_world* world,
    const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world,
    raptor_uri *uri, const unsigned char *local_name);

  raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_id_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *id);

  raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world,
    const char *name);

  void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri);

  int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p);

  unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri,  raptor_uri *reference_uri);

  void raptor_uri_print_v2(raptor_world* world,
    const raptor_uri* uri, FILE *stream);

  unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t *len_p);

  void raptor_uri_set_handler_v2(raptor_world* world,
    const raptor_uri_handler *handler, void *context);

  void raptor_uri_get_handler_v2(raptor_world* world,
    const raptor_uri_handler **handler, void **context);

Added V2 www class methods:

  raptor_www *raptor_www_new_with_connection_v2(raptor_world* world,
    void* connection);

Added V2 qname class methods:

  raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world,
    raptor_namespace *ns, const unsigned char *local_name,
    const unsigned char *value);

Added V2 namespace class methods:

  raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world,
    raptor_simple_message_handler error_handler, void *error_data, int defaults);

  int raptor_namespaces_init_v2(raptor_world* world,
    raptor_namespace_stack *nstack,
    raptor_simple_message_handler error_handler, void *error_data,
    int defaults);

Added V2 sequence class typedefs and methods:

  typedef void (raptor_sequence_free_handler_v2(void* context, void* object));

  typedef void (raptor_sequence_print_handler_v2(void *context, void *object,
    FILE *fh));

  raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler,
    raptor_sequence_print_handler_v2* print_handler, void* handler_context);

  void raptor_sequence_set_print_handler_v2(raptor_sequence *seq,
    raptor_sequence_print_handler_v2 *print_handler);

Added V2 iostream class methods:

  int raptor_iostream_write_uri_v2(raptor_world* world,
    raptor_iostream *iostr,  raptor_uri *uri);

  void raptor_iostream_write_statement_ntriples_v2(raptor_world* world,
    raptor_iostream* iostr, const raptor_statement *statement);

Added V2 xml writer class methods:

  raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world,
    raptor_namespace_stack *nstack, raptor_iostream* iostr,
    raptor_simple_message_handler error_handler, void *error_data,
    int canonicalize);

  int raptor_xml_writer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name, raptor_uri **uri,
    const char **label);

Raptor 1.4.18 Changes

Fixed Issues:

Parser Changes

A new RDFa parser was added (name rdfa) using librdfa to implement it. librdfa is linked as part of Raptor and written by Manu Sporny of Digital Bazaar, licensed with the same license as Raptor.

The RDFa test suite was added to the test and (via librdfa) Raptor passes all but 4 tests which fail due to different output xmlns attribute ordering (which does not matter to XML parsers).

Serializer Changes

Added new function raptor_serialize_start_to_iostream() to have the new semantics of not owning and destroying the passed-in iostream. This allows the caller to serialize to an existing iostream and then to continue to write to it. raptor_serialize_start() owns and then closes the iostream that is passed in.

A new Atom Syndication Format 1.0 (RFC 4287) serializer was added (name atom) using the RSS 1.0 RDF triple model with mapping to atom terms and consideration of atom output format conditions.

RSS 1.0 serializer

Turtle serializer now respects the writeBaseURI feature to control generating the @base directive.

Abbreviated serializers (RDF/XML Abbrev and Turtle) now remove duplicate triples.

Added feature RAPTOR_FEATURE_RSS_TRIPLES to add RDF triples to RSS 1.0 or Atom serializer output with values 'rdfxml' or 'atom-triples'. Atom triples writes at:map sections for the atom:entry elements and at:feedmap and at:entrymap sections to the atom:feed elements. at:contentType is used to provide a type attribute value for an atom:content that has a URI value.

Added RAPTOR_FEATURE_ATOM_ENTRY_URI for the Atom serializer to set the URI of an atom entry. If the URI matches the URI of an entry item in the RDF mode of the channel, then an Atom Entry document is generated rather than an Atom Feed document.

QName Class Changes

Added raptor_qname_to_counted_name() to get a formatted qname for a name.

raptor_new_qname_from_namespace_local_name() will accept a NULL namespace to construct a namespace-less qname.

Sequence Class Changes

raptor_sequence_set_at() now handles setting an item at an index in the sequence beyond capacity+1 to automatically extend.

Added raptor_sequence_delete_at() to delete an item at a position in a sequence and return it.

URI Class Changes

raptor_uri_to_relative_counted_uri_string() now has support for a base URI with scheme and authority but no path, so the result can be a relative URI starting with '/'.

XML Writer Class Changes

XML Writer allows adding newlines via raptor_xml_writer_newline() which requires use of raptor_xml_writer_flush() to indicate when XML writer output is finished.

Added raptor_xml_writer_get_depth() to get the current XML writer element stack depth.

Other Changes

Many more resiliance checks were added.

Removed all calls to abort() in code on fatal errors. This requires using setjmp and longjmp inside parsers built with flex and bison.

The Turtle writer may optionally generate @base depending on flags. (This is used by Turtle serializer to handle the writeBaseURI feature)

Tidied error messages for rapper(1) when parsing stdin.

raptor_init() and raptor_finish() use a reference count to ensure initialising and terminating happen at most once each.

Raptor 1.4.17 Changes

The main changes to this release are:

Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples'.

Made I/O Stream class raptor_iostream support reading as well as writing with new constructors and new methods.

Added a new public SAX2 API class raptor_sax2 exposing the existing internal API which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2.

Added new public error handlers structure raptor_error_handlers containing a set of (function, data pointers) pairs called raptor_handler_closure for each error log level. Added raptor_log_level enum for the error log level. Added an initialization function for the structure, raptor_error_handlers_init().

Several other API changes, fixes and improvements were made.

Fixed Issues:

I/O Stream class changes

Made I/O Stream class raptor_iostream support reading data in addition to writing. (Dave B):

Added new write I/O Stream method raptor_iostream_write_string_python() to write an encoded string to an I/O stream using python / JSON / Turtle / N-Triples / SPARQL escaping rules. (Dave B)

Serializer Class Changes

Added two new JSON serializers (Dave B):

  1. Resource-centric serializer named json based on Talis RDF/JSON Specification
  2. Triple-centric serializer named json-triples based on the SPARQL results in JSON format.

Added new serializer features for the JSON serializers (DaveB):

Example of using the resource-centric serializer while defining a callback:

$ rapper -q -o json -f jsonCallback=foo http://librdf.org/raptor/raptor.rdf
foo(
{
  "http://librdf.org/raptor/#raptor" : {
    "http://usefulinc.com/ns/doap#description" : [ {
...

Statement Class Changes

Added raptor_statement_compare() to provide an ordering between raptor_statement objects. (Dave B)

Parser Class Changes

Added new parser features to control HTTP headers in web requests (Dave B, based on a patch in the bug):
Also never Pragma: header with libcurl ever.
Fixes Issue#0000252

Turtle parser:

QName Class Changes

Added new methods raptor_qname_get_local_name(), raptor_qname_get_value() and raptor_qname_get_counted_value(). (Dave B)

SAX2 Class Changes

Added new public SAX2 API class raptor_sax2 exposind th existing internal one which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2. (Dave B)

Serializer Class Changes

Abbreviated serializers (RDF/XML-Abbrev and Turtle):

Turtle serializer:

URI Class Changes

Update URI resolving for RFC3986 changes (Dave B)

WWW Class Changes

Added new method raptor_www_set_http_cache_control() to set the HTTP Cache-Control: header in requests. (Dave B, based on a patch in the bug)
Fixes Issue#0000252

XML Class Changes

Added new method raptor_xml_element_get_language() to get the language associated with an element. (Dave B)

Portability and Resilience Changes

Pass on error failures in parser and serializer factory construction. (Lauri)

Abbreviated serializers (RDF/XML-abbrev and Turtle): low memory and allocation failure fixes. (Lauri)

Altered API function signatures of raptor_uri_set_handler(), raptor_uri_get_handler(), raptor_new_namespaces(), raptor_namespaces_init() and raptor_new_xml_writer() to add appropriate consts. (Lauri)

Portability fixes for RAPTOR_API and other macros. (Lauri)

Removal of many sets of writable static data in N-Triples parser, URI class, Unicode NFC code, libxml support, Turtle writer and XML writer. (Lauri)

Portability fixes for round() and trunc() that are not always available in libc but might be in libm. (Dave B)

Turtle/N3 parsers and serializers, RDF/XML_Abbrev serializer: many low memory fixes and better out of memory errors. (Lauri)

Other Changes

Rewrote internal error log functions to use new error handlers structures and simplify the calls. (Dave B)

Expanded internal raptor_avltree datatype support to add a cursor, allowing it to be used for creating large ordered sequences that need to be walked. (Dave B)

Updated rdfdiff utility to handle duplicate triples in inputs. (Dave B)

raptor_sequence_shift() and raptor_sequence_unshift() are now as efficient as the sequence push and pop operations: O(1). (Lauri)

autogen.sh was updated.

rapper utility can now accept multiple -f / --feature options; previously only one parser and one serializer feature was possible.

Raptor 1.4.16 Changes

The main changes to this release are:

Provide 100% support for the GRDDL W3C Recommendation of 2007-09-11.

The Turtle parser and serializer were updated to support @base for specifying a base URI, following Turtle of 2007-09-11.

The Turtle and RDF/XML serializers had performance improvements for large graphs.

Added a TRiG Parser based on Turtle with named graph support.

Several other API changes, fixes and improvements were made.

Fixed Issues:

Namespaces Class Changes

raptor_namespaces_init() now returns an integer status.

Parser Class Changes

Added raptor_graph_handler typedef and raptor_set_graph_handler() to return named graph identifiers during parsing, initially for the TRiG parser.

These were added the GRDDL parser:

XML Element Class Changes

Added raptor_new_xml_element_from_namespace_local_name() constructor to make an XML element from a local name relative to a raptor_namespace.

Unicode Class Changes

Defined a new raptor_unichar typedef for a Unicode codepoint defined as unsigned long which was the previous type used. Altered the Unicode function to take it as a parameter. raptor_unicode_char_to_utf8(), raptor_utf8_to_unicode_char(), raptor_unicode_is_xml11_namestartchar(), raptor_unicode_is_xml10_namestartchar(), raptor_unicode_is_xml11_namechar() and raptor_unicode_is_xml10_namechar().

URI Class Changes

Added raptor_uri_compare() and raptor_uri_compare_func function pointer for implementing it in the raptor_uri_handler. The handler now has a version field initialised to trigger the new factory method for uri compare when the version is 2 or more.

WWW Class Changes

Added raptor_www_set_connection_timeout() to set the WWW retrieval connection timeout in seconds.

Added raptor_www_final_uri_handler typedef and raptor_www_set_final_uri_handler() to return the final URI seen during WWW retrieval such as after redirects.

Added raptor_www_get_final_uri() to return the final URI after a WWW retrieval which might include redirects.

Parser Changes

The GRDDL parser/processor was substantially updated and now supports 100% of the Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11:

it also:

RDF/XML parser recognising was updated to just the start of the document for guessing if it should handle content and to try to avoid html URLs.

RSS Tag soup parser recognising was updated to accept with the string 'feed' in the identifier.

TRiG Parser was added based on the Turtle parser, adding named graphs. It returns name graph URis via a callback set with new API call raptor_set_graph_handler()

Turtle parser added @base support, fixed turtle escapes to URIs. Recognising was updated to look for @prefix early in the document.

Serializer Changes

Turtle serialiser changes:

RDF/XML serialiser was changed to emit a legal empty RDF/XML document when no triples are serialised and to skip emitting statements with bad predicate uris rather than returning an error.

RDF/XML Abbrev serialiser was changed to use an AVL tree rather than sequence for significant performance improvement for large serialisations.

rapper Utility Changes

Added an --show-graphs option to print named graph URIs as seen (such as with TRiG).

Added -I / --input-uri and -O / --output-uri options to set the input / parsing and output / serializing base URIs separately. Defaults remain the same - the serializer base URI defaults to the input base URI, however it was set.

Portability Changes

Fixes for when building from Subversion on cygwin (EOL issues, Makefiles).

Remove unused semicolons for prevention of compiler warnings.

Fix some uninitialized variables that some compilers complain about.

Allow RAPTOR_ASSERT_DIE to be externally defined.

Allow RAPTOR_WWW_BUFFER_SIZE to be externally defined.

Other Changes

autogen.sh was updated to handle program versions better using an inline perl helper.

Start to add resiliance to memory allocation failures and errors inside the library.

Added AVL Tree code to make much faster key:value lookups. This is used for RDF/XML parser XML ID checks and in the 'abbrev' serializers - Turtle and RDF/XML-Abbrev for looking up nodes.

Better libxml error messages are now returned, mentioning some of the names and values that caused the error.

Raptor 1.4.15 Changes

General Changes

GRDDL parser now passes the (unapproved) test suite for the GRDDL W3C Working Draft 2 March 2007 except for two tests that have been reported as having errors.

When using libcurl as the WWW retrieval library, errors in resolving a URI such as not found (404) are now reported as proper errors and cause parsing to fail rather than just return no triples.

Some improvments where made to guessing for a parser to match some content. Firstly, any mime type with Q <10 is added to the score, don't lose the influence of the mime type entirely. The consequence of this is that Turtle can pretend to be a partial N3 parser. Secondly, the XHTML mime type is now correctly recognised by the GRDDL parser rather than the RSS Tag Soup parser.

Fixed Issues:

Parser and Serializer Changes

Added better error reporting for XML errors using the libxml structured error reporing api. From

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - http://librdf.org/LICENSE.txt:2: 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - parser 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - error : 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   Redland RDF Application Framework - License
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   ^
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

To this:

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XML parser error: Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XInclude processing failed for GRDDL document
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

GRDDL parser updated to support the GRDDL W3C Working Draft 2 March 2007:

Turtle parser was changed to accept the N3 mime type text/rdf+n3 at low Q(quality) so it might work for N3 that is the RDF subset - quite common.

Changed the RSS Tag Soup parser and RSS 1.0 serializer to stop sharing use of the declared namespaces so that when using both at the same time, there is no double-free of the same objects.

Correct the content: namespace URI in the RSS parser and serializers.

Other Changes

rapper gains a -t/--trace option to show URIs traversed. Handy for GRDDL.

raptor_uri_resolve_uri_reference() no longer goes past the end of buffer when the relative URI is ,/

Added an internal API for capturing parsed data as it is seen. Use by GRDDL parser but with no public API.

Added an internal API for structured error reporting. Updates made throughout the library but with no public API.

Internal API raptor_new_sax2() signature changed to just have an error_handlers pointer argument rather than multiple function / user_data pairs.

Raptor 1.4.14 Changes

General Changes

Added a Turtle Terse RDF Triple Language serialiser by Dave Robillard based on the existing RDF/XML-Abbrev serialiser.

Added a GraphViz DOT format serialiser by Evan Nemerson.

The GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes.

Fixed Issues:

Configuration Changes

raptor-config gains a --private-libs for the internal libraries used in building raptor, with the public ones only emitted with --libs.

raptor.pc now uses Libs.private for internal dynamically linked libraries.

The libxml minimum version is now 2.6.8 since 2.6.7 crashes on PPC64 Linux. 2.6.8 was released March 2004 so this should be no burden.

Do not use PATH_MAX so raptor can build on Hurd.

Parser Changes

RDF/XML parser now looks for the RDF/XML root element and namespace declaration in the initial bytes of content when guessing. This allows content that is in other mime types such as application/xml to be more likely guessed as RDF/XML.

When guessing a parser to use, if an an exact match is found for the mime type (q=10), then that parser is used.

The GRDDL parser has several changes:

Serializer Changes

Added a new Turtle Terse RDF Triple Language serializer and two new internal APIs based on the existing RDF/XML-Abbrev serialiser, written by Dave Robillard:

Added a new GraphViz DOT format serialiser writen by Evan Nemerson.

Note that testing the turtle serializing (make test) requires the rdfdiff -u and a few of the tests take some time to run.

Other Changes

Added raptor_home_url_string and raptor_license_string exported strings.

Added raptor_parser_generate_id() as a public function to generate an identifier for a parser.

rdfdiff gains the -u/--base-uri option to specify the from file base URI so that if the from file is a local file or relative URI, it can be given an absolute base.

Failures to retrieve content from a URI using the raptor_www class implementations now return a failure as well as setting the HTTP status code to 403 or 404 as appropriate. Previously success may have been returned with no bytes.

Raptor 1.4.13 Changes

General Changes

Prevent losing memory for a raptor_xml_writer when a serializer is reused several times.

Fixed issues reported on the Redland Issue Tracker:

Configuration Changes

In maintainer mode, add all the supported compiler -W warning flags to the CFLAGS.

Allow LEX to be set to things that aren't exactly 'flex'.

Documentation Changes

Added single triple serializing example to the tutorial to demonstrate serializing without parsing and building a raptor_statement.

Other Changes

Declare several raptor functions with GCC printf-formatting attributes when using a new enough GCC.

RDF/XML parser now creates literals with raptor_stringbuffer so that it does a lot less copying when constructing longer literals.

Added single raptor_statement serializing example to demonstrate serializing alone without parsing.

Raptor 1.4.12 Changes

Restored the order of serialized syntaxes back to the same as in Raptor 1.4.10 which Redland was relying on - asking to serialize to mime type 'application/rdf+xml' without specifying a parser name in Redland with Raptor 1.4.11 wrote it in XMP instead of RDF/XML as it used to. This happened more often with language bindings. That problem will be fixed in a future release of Redland but for now, this stops wierd things like that happening.

Raptor 1.4.11 Changes

General Changes

Added raptor_get_feature_count() to return the count of features, in preference to using the macro value RAPTOR_FEATURE_LAST.

Added raptor_www_set_uri_filter() method of the WWW class (raptor_www) objects to have an optional URI filter function that checks if the URL given is allowed to be retrieved, or denied entirely.

Fixed issues reported on the Redland Issue Tracker:

Documentation Changes

The Raptor Reference Manual now includes descriptions of all the parsers and serializers and the tutorial has a new section describing how to filter URIs and deny network requests.

Parser Changes

Added functionality to prevent network requests either via setting a new feature RAPTOR_FEATURE_NO_NET that denies network requests during a parser operation or with a URI filter function raptor_parser_set_uri_filter(). This function uses raptor_www_set_uri_filter() internally.

Added raptor_get_need_base_uri() to tell if a parser requires a base URI argument. Presently the N-Triples parser is the only parser that does not require a base URI. raptor_start_parse() will now throw an error if no base URI is given and it is needed.

The GRDDL parser was changed to handle a list of URIs in the profile so it now can support dataview:transformation in XML taking a list of transformations as defined in The GRDDL profile for XHTML part of the GRDDL specification. It now also recognises Embedded RDF and HCalendar using well known XPaths and transforms them to RDF triples using well known XSLT sheet URIs.

The Guess parser now resets after each parse and does a fresh guess on the syntax based on the incoming information. Fixes Issue#0000091

The Turtle parser (and experimental N3 parser) were changed to now require base URIs as they always should have. The error messages when reporting problems with grammar tokens now return better responses. Added better memory cleanup during parser error recovery.

Serializer Changes

The RSS 1.0 Serializer now works again.

Updated the RDF/XML Abbreviated serializer to do proper reference counting on the blank/resource nodes used as subjects and objects to prevent dual-triple generation. Fixes the reported Issue#0000014

Other Changes

The internal SAX2 API can also prevent network fetches with the feature RAPTOR_FEATURE_NO_NET.

Fixed a SAX2 problem that caused parsers that use it to leak memory for 1 URI, affected RDF/XML and RSS Tag Soup.

rapper help and verbose message formats were tidied.

Raptor 1.4.10 Changes

General Changes

No parser will now generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL. Only identifier type resource, anonymous (blank node) and literal will be generated. All serializers will convert any RAPTOR_IDENTIFIER_TYPE_ORDINAL type on input to type resource.

Configuration Changes

No longer adds LDFLAGS to pkgconfig file raptor.pc and raptor-config fixing Issue#0000097.

Parser Changes

All parsers no longer generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL, as deprecated in 1.4.8. The replacement type generated is RAPTOR_IDENTIFIER_TYPE_RESOURCE.

The RSS Tag Soup (rss-tag-soup) parser now makes the triples appear before parser destruction. This caused odd symptoms like parsing in python returning no triples and the parser then crashing during object destruction.

The RDF/XML (rdfxml) parser no longer crashes if a comment is seen outside an element, such as before or after the root element.

Serializer Changes

The RDF/XML (rdfxml) serializer no longer crashes if the se