2011-06-27  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_26 for 0.9.26 release (GIT
	44f4b1d74abe6c741e9a9c4bc8465921d7b3691f)

	* src/rasqal_format_rdf.c: Fix a bunch of lost term objects for
	'rdfxml' formatter.

	* src/rasqal_format_rdf.c:
	(rasqal_rowsource_rdf_process): Fix leak of variable.

	* src/rasqal_format_sparql_xml.c:
	(rasqal_sparql_xml_sax2_start_element_handler): Fix leak of
	variable.

	* src/rasqal_service.c:
	(rasqal_service_content_type_handler): Handle getting multiple
	Content-Type:s

	* src/rasqal_query_results.c:
	(rasqal_query_results_get_count): Handle no query

	* NEWS.html, RELEASE.html: 0.9.26

	* src/rasqal_query_transform.c:
	(rasqal_graph_pattern_tree_binds_variable,
	rasqal_graph_pattern_binds_variable): Removed unused functions

2011-06-26  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Handle var=xsdstring(val) roqet
	output

	* src/rasqal_query_transform.c:
	(rasqal_query_union_build_variables_use_map_binds): Restore outer
	var scope each time.

	* tests/sparql/warnings/Makefile.am: data is empty.nt

	* src/rasqal_query_transform.c:
	(rasqal_query_triples_build_variables_use_map_binds): Recalculate
	triple BGP after selecting variables to bind

	* tests/sparql/warnings/Makefile.am,
	tests/sparql/warnings/warning-4.rq: Remove unsupported check for
	multiple FROM

	* tests/improve: count expected fails

	* tests/improve: Handle countiing expecting failures

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-bound (UNION) passes

	* tests/sparql/survey/Makefile.am: test survey-3 UNION passes

	* src/rasqal_query_transform.c: Calculate binds for BGPs correctly

	(rasqal_query_triples_build_variables_use_map_binds); Bind s/p/o/g
	if bit flag set not when ONLY that bit set.  Update row to mark
	bound here.

	* src/rasqal_query_transform.c:
	(rasqal_query_build_variables_use_map): Do not turn any SELECTed
	variables that are never mentioned into binds

	* src/rasqal_internal.h, src/rasqal_query_transform.c: Made
	selecting an unbound a serious warning

	(RDQL, SPARQL 1.0 require not-error) Added internal
	RASQAL_WARNING_LEVEL_SELECTED_NEVER_BOUND warning level.

	* configure.ac, tests/sparql/Makefile.am,
	tests/sparql/warnings/Makefile.am, tests/sparql/warnings/empty.nt,
	tests/sparql/warnings/manifest.ttl,
	tests/sparql/warnings/warning-1.rq,
	tests/sparql/warnings/warning-2.rq,
	tests/sparql/warnings/warning-3.rq,
	tests/sparql/warnings/warning-4.rq: Add warnings tests

	* src/rasqal_general.c:
	(rasqal_log_warning_simple): Invert test again

2011-06-23  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query_transform.c: const qualified for const data

2011-06-22  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_general.c: #docs

2011-06-20  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: Add -W/--warnings option to set
	warning level (default none: 0)

	* tests/sparql/check-sparql: Use perl to find any core dumps in
	output portably.

	* configure.ac: Really remove --with-redland-config and
	--with-redland from configure

2011-06-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c: nl

	* src/rasqal_query_transform.c:
	Expand sub-SELECT * to variables

	(rasqal_graph_pattern_mentions_variable): Added

	(rasqal_graph_pattern_tree_mentions_variable): Added using above
	to return if a GP tree mentions a variable

	(rasqal_query_select_build_variables_use_map): Expand sub-SELECT *
	into list of variables during use_map walk.

	* src/rasqal_query_transform.c:
	(rasqal_graph_patterns_join): Handle select GP merging

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_write_internal): Handle sub-SELECT *

	* src/rasqal_query_transform.c:
	(rasqal_query_select_build_variables_use_map): Do not scan sub-GPs

	* tests/sparql/check-sparql:
	look for core dump

2011-06-17  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c:
	(rasqal_graph_pattern_promote_variable_mention_to_bind): Add bind
	flag Should stop some of the unused variable warnings.

2011-06-16  Dave Beckett <dave@dajobe.org>

	* src/rasqal_variable.c:
	(main): use rc [clang]

	* src/rasqal_query_transform.c:
	(rasqal_query_triples_build_variables_use_map_binds): Remove
	unused gp_offset var.

	* src/rasqal_query_transform.c:
	(rasqal_query_triples_build_variables_use_map_binds): Remove
	unused row var.

	* src/rasqal_graph_pattern.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rasqal_query_transform.c,
	src/rasqal_rowsource_triples.c: Replace triples bound_in with more
	accurate triples_use_map

	Removes assumption that a variable can be only bound in one triple.

	struct rasqal_query: array triples_use_map replaces variables_bound_in

	(rasqal_graph_pattern_variable_bound_in): Use the variables_use_map
	to calculate result.

	(rasqal_free_query): Free triples_use_map replacing
	variables_bound_in.

	(rasqal_query_variable_is_bound): Added to partially replace
	rasqal_graph_pattern_variable_bound_in().

	(rasqal_query_variable_bound_in_triple): Added to replace rest of
	rasqal_query_get_bound_in_column_for_variable.

	(rasqal_query_get_bound_in_column_for_variable): Deleted

	(rasqal_query_graph_pattern_bgp_build_bound_in): Deleted

	(rasqal_query_graph_pattern_build_bound_in): Deleted

	(rasqal_query_build_bound_in_triples): Deleted.

	(rasqal_query_check_unused_variables): Use
	rasqal_query_variable_is_bound() and simplify.

	(rasqal_query_build_variables_use): Remove call to deleted
	rasqal_query_build_bound_in_triples().

	(rasqal_query_graph_build_variables_use_map): Added to build
	variables use in a GRAPH GP.

	(rasqal_query_select_build_variables_use_map): Add width and gp
	args.  (rasqal_query_graph_pattern_build_variables_use_map): Call
	above for GRAPH GP.  Update call to
	rasqal_query_select_build_variables_use_map() for changed args.

	(rasqal_graph_pattern_mentions_variable): Deleted

	(rasqal_graph_pattern_promote_variable_mention_to_bind): Add
	vars_scope arg and use it to test and set scope flag.

	(rasqal_query_triples_build_variables_use_map_binds): Added to
	mark variables bound in a triple/basic GP.  Rewrote body to use
	scope and calculate mention, use and handle cases where a triple
	pattern binds the same variable more than 1 time.

	(rasqal_query_triples_build_variables_use_map_binds): Added to
	bind variables for triples/basic GP.

	(rasqal_query_graph_pattern_build_variables_use_map_binds): Added
	pulled out of older
	rasqal_query_build_variables_use_map_binds. Use
	rasqal_query_triples_build_variables_use_map_binds() and
	rasqal_query_union_build_variables_use_map_binds().  Bind sub
	graph patterns after doing variables at head (such as UNION) so
	that binding is in query document order.

	(rasqal_query_build_variables_use_map_binds): Added to wrap
	rasqal_query_graph_pattern_build_variables_use_map_binds().

	(rasqal_query_print_triples_use_map): Added debug function to
	print triples variable use map.

	(rasqal_query_build_variables_use_map): Allocate triples_use_map.
	Use rasqal_query_build_variables_use_map_binds().  Print triples
	use map after binding is done.

	(rasqal_query_graph_build_variables_use_map_binds): Make bound
	variables in GRAPH gp.

	(rasqal_query_let_build_variables_use_map_binds): Add vars_scope
	args.

	(rasqal_query_select_build_variables_use_map): Add width and gp
	args.

	(rasqal_query_select_build_variables_use_map_binds): Added to bind
	sub-SELECT patterns using an inner scope.  Mark projected
	variables into outer scope.

	(rasqal_query_union_build_variables_use_map_binds0: Added to bind
	UNION patterns with inner scopes for each sub-graph pattern.

	* src/rasqal_algebra.c, src/rasqal_internal.h)
	(src/rasqal_query_transform.c: Switch short maps to unsigned short
	maps

	* src/rasqal_algebra.c, src/rasqal_internal.h)
	(src/rasqal_query_transform.c: Switch short maps to unsigned short
	maps

	* src/rasqal_query_transform.c: Build variable scoping in two pass
	USE and BIND scans

	Remove all binding code from the rasqal_query_graph*_use_map
	functions.

	Add new binding marking approach; pass down an array of in-scope
	variables in current context and mark first variable unseen as
	binding it.  UNION and sub-SELECT introduce new scopes.

	FIXME: bound_in code still does a separate and wrong calculation
	that assumes a variable can only be bound in one GP; that is no
	longer true and never has been as long as UNION existed.

	(rasqal_query_graph_build_variables_use_map): Added to mark
	variables mentioned in GRAPH GP (zero one one)

	(rasqal_query_graph_pattern_build_variables_use_map): Call above
	for GRAPH gp and adjust call to
	rasqal_query_select_build_variables_use_map().

	(rasqal_graph_pattern_promote_variable_mention_to_bind): Add
	vars_scope param to know when to bind; does nothing if variable
	passed in is already bound in scope.

	(rasqal_query_graph_pattern_build_variables_use_map_binds): Added
	based on older rasqal_query_build_variables_use_map_binds() to
	perform the binding approach as above moving most code into per-GP
	type functions.  Move binding sub graph patterns to AFTER binding
	variables in the GP itself; so GRAPH ?var etc. works.

	(rasqal_query_build_variables_use_map_binds): Made a skeleton
	around above function.

	(rasqal_query_build_variables_use_map): Call
	rasqal_query_build_variables_use_map_binds().

	(rasqal_query_graph_build_variables_use_map_binds): Use vars
	scope.

	(rasqal_query_let_build_variables_use_map): Use vars scope.

	(rasqal_query_select_build_variables_use_map): Scan
	selected / projected variables for mentions.

	(rasqal_query_select_build_variables_use_map_binds): Added to use
	vars scope, make an inner scope for the sub-SELECT and mark
	project variables for binding if unbound in outer scope.

	(rasqal_query_union_build_variables_use_map_binds): Added to use
	vars scope and and make a new scope for each sub-UNION GP tree.

2011-06-14  Dave Beckett <dave@dajobe.org>

	* configure.ac: Add --enable-debug option like raptor has

	* src/rasqal_query_transform.c: Lose the .

2011-06-11  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-general.sgml, docs/tmpl/section-unused.sgml:
	Update tmpls

	* docs/rasqal-sections.txt: Add support_feature to unused section.

	* src/rasqal_general.c: autodocs

	* INSTALL.html, configure.ac, src/rasqal_general.c,
	src/rasqal_redland.c: Remove redland triples store that has not
	worked for some time.

	configure: Remove --with-triples-source and --with-redland-config
	options

	Removed src/rasqal_redland.c module.

	* src/rasqal_raptor.c: Allow no data graphs in the query

	* src/rasqal_general.c, src/rasqal_internal.h, src/rdql_parser.y,
	src/sparql_parser.y: Adjust warning levels so 50 does not warn
	strict.  Invert tests so that 0 does nothing

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt,
	src/rasqal.h.in, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_general.c,
	src/rasqal_internal.h, src/rasqal_query_results.c,
	src/rasqal_query_transform.c, src/rasqal_service.c,
	src/rdql_parser.y, src/sparql_parser.y, tests/sparql/check-sparql,
	utils/getopt.c, utils/roqet.1, utils/roqet.c: Add
	rasqal_world_set_warning_level() and use with roqet -W LEVEL

	(rasqal_world_set_warning_level): Added to set warning level in
	0...100 range where 0 is no warnings, 50 is the default and 100 is
	all warnings.

	roqet gains a -W LEVEL argument check-sparql: use roqet -W 0

2011-06-06  Dave Beckett <dave@dajobe.org>

	* configure.ac, src/Makefile.am, src/rasqal_datetime.c,
	src/rasqal_internal.h, src/timegm.c: Add portable version of
	timegm when not present

	Fixes Issue#0000438
	http://bugs.librdf.org/mantis/view.php?id=438

2011-06-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_xsd_datatypes.c: Check for int overflow in strtol()
	and turn into a decimal.

	(rasqal_xsd_check_integer_format): Check for overflow when checking
	string and return failure for integers that are too large.

	* src/rasqal_literal.c: Check for int overflow in strtol() and
	turn into a decimal.

	(rasqal_literal_set_typed_value): Check for overflow when
	converting a string to int and if resulting long won't fit in an
	int, turn it into a decimal.

	Fixes Issue#0000436
	http://bugs.librdf.org/mantis/view.php?id=436

	* configure.ac: Check for limits.h and error.h

	* configure.ac:
	Add cross-compile case to AC_RUN_IFELSE

	* configure.ac:

	* configure.ac: Use AC_RUN_IFELSE to actually run ceil, floor,
	round test

	* configure.ac: Add tests for ceil, floor and round that look in
	libc or libm

	Fixes Issue#0000446
	http://bugs.librdf.org/mantis/view.php?id=446

	* src/rasqal_service.c: warning text

2011-06-04  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: skip both types of
	UpdateEvaluationTest

	* tests/sparql/check-sparql: Ignore update tests

	* utils/roqet.c: tidy help

	* utils/roqet.1: Document -W and -E

2011-06-03  Nicholas J Humfrey <njh@aelius.com>

	* Added -W and -E command line options to ignore warning and
	errors respectively.

	Made the roqet error log handling behave more like rapper.

2011-05-24  Dave Beckett <dave@dajobe.org>

	* docs/Makefile.am: Remove README from CLEANFILES.

2011-05-22  Dave Beckett <dave@dajobe.org>

	* docs/Makefile.am: Restore README to CLEANFILES after
	f1749351cb30de99efc6c0f0819c1a4a7da8b6f0

	* src/rasqal_literal.c:
	Fix rasqal_literal_string_compare [CLANG]

	(rasqal_literal_string_compare): Simplyify calling convention; no
	need to ever return incomparable.  Adjust logic to match
	raptor_term_compare() order.

	(rasqal_literal_compare): Protect error_p assignment [CLANG] Call
	rasqal_literal_string_compare to get result - no error arg.

	* src/rasqal_literal.c: Fix rasqal_literal_array_compare with
	NULLs. [CLANG]

	(rasqal_literal_array_compare): Remove duplicate NULL compare code
	and return NULL literal results earlier.

	* src/rasqal_literal.c: Fix rasqal_literal_sequence_compare
	literal NULL case [CLANG]

	(rasqal_literal_sequence_compare): calculate equality result earlier
	if both are NULL literals in the sequence.

	* src/rasqal_literal.c: Fix rasqal_literal_equals_flags with
	RASQAL_LITERAL_VARIABLE [CLANG]

	(rasqal_literal_equals_flags): In RASQAL_LITERAL_VARIABLE case,
	break case when result is calculated rather than fallthrough.
	This can never have worked; this case may have always been handled
	before calling this internal function.

	* src/rasqal_xsd_datatypes.c: Fixes [CLANG]

	(rasqal_xsd_check_double_format, rasqal_xsd_check_float_format)
	(rasqal_xsd_check_integer_format): Cast unused results to void and
	remove assignment to unused vars.

	* src/rasqal_rowsource_triples.c:
	(rasqal_triples_rowsource_init): Remove unused 'con' var [CLANG]

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_init): Remove unused 'con' var [CLANG]

	* src/rasqal_rowsource_having.c:
	(rasqal_having_rowsource_init): Remove unused 'con' var [CLANG]

	* src/rasqal_rowsource_filter.c:
	(rasqal_filter_rowsource_init): Remove unused 'con' var [CLANG]

	* src/rasqal_random.c:
	Fixes [CLANG]

	(rasqal_random_get_system_seed): Removed un-necessary final
	variable calculations and assignments that never get used

	* src/rasqal_query_transform.c:
	Fixes [CLANG]

	(rasqal_query_graph_pattern_build_variables_use_map_binds): Remove
	bad error freeing of 'var_is_bound' array that is never allocated
	before this point.

	* src/rasqal_query_results.c: Fixes [CLANG]

	(rasqal_query_results_execute_and_store_results): Remove unused
	'query' var

	* src/rasqal_format_table.c:
	(rasqal_query_results_write_table_bindings): Return rc [CLANG]

	* src/rasqal_digest_sha1.c: Fixes [CLANG]

	(SHA1Transform): Removed useless zeroing out locals at end of
	scope (SHA1Final): Removed usless assignment to i

	* src/rasqal_algebra.c: Fixes [CLANG]

	(rasqal_algebra_algebra_node_write_internal): Remove useless final
	arg_count++

	(rasqal_algebra_query_to_algebra)
	(rasqal_algebra_query_prepare_aggregates)
	(rasqal_algebra_query_add_group_by)
	(rasqal_algebra_query_add_modifiers)
	(rasqal_algebra_query_add_aggregation)
	(rasqal_algebra_query_add_projection)
	(rasqal_algebra_query_add_distinct)
	(rasqal_algebra_query_add_having): Removed useless 'modified'
	variable that always has the same value in the debug message.

	* src/Makefile.am: Add analyze target for maintainer to run clang
	on sources

	* src/.gitignore: Ignore clang .plist files

2011-05-20  Dave Beckett <dave@dajobe.org>

	* src/sparql_lexer.l: Do not report failure twice for
	sparql_copy_name

	(sparql_copy_name, sparql_copy_qname): Report failure to decode
	once and end

	* utils/roqet.c:
	(roqet_log_handler): Handle output with no locator nicer

	* src/rasqal_general.c:
	(rasqal_world_set_log_handler): Set raptor log handler too.

2011-05-19  Dave Beckett <dave@dajobe.org>

	* src/sparql_lexer.l: Make lexing failing a regular error, not
	fatal with abort().

	Adjust flex error returns as much as possible to return a regular
	log error event and setjmp / longjmp to start of lexing.

	(sparql_lexer_log_error): Renamed from sparql_lexer_fatal_error
	and takes a log level.  Use YY_FATAL_ERROR_EOF in lexing failures
	to return an error and then yyterminate() the lexing.  No abort.
	That mostly leaves fatal errors in out of memory situations or
	when the lexer is jammed.  Hard to fix futrher without
	post-processing the flex generated C.

2011-05-14  Nicholas J Humfrey <njh@aelius.com>

	* src/rasqal_format_json.c: Added the
	'application/sparql-results+json' mime type, as specified in
	http://www.w3.org/TR/rdf-sparql-json-res/

2011-04-15  Nicholas J Humfrey <njh@aelius.com>

	* docs/Makefile.am: Moved rasqal-fake.i from CLEANFILES to
	DISTCLEANFILES.

2011-04-06  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-xsd.sgml: datetime and decimal

2011-03-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c: Fix mention / bind walking to
	handle single triple BGPs that are not in a Group GP

	(rasqal_query_graph_pattern_build_variables_use_map_binds): Split
	recursive walk and walk to bind vars.  Use utility functions to
	make code more readable.  Rename 'seen' to 'var_is_bound' to match
	the variable use.  On second round of binding if the query graph
	pattern is a BGP, bind the variables now.

	(rasqal_query_build_variables_use_map): After calculating map, if
	there are variables SELECTEd but never bound, mark them as bound
	in the verb so that no error is reported.

2011-03-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c:
	(rasqal_graph_pattern_promote_variable_mention_to_bind): Added
	utility function to turn a mention into a bind.

	* src/rasqal_query_transform.c: Add utility functions to test var
	bound / mentioned in GP tree

	(rasqal_graph_pattern_binds_variable)
	(rasqal_graph_pattern_mentions_variable): Added to test if a
	variable is bound/mentioned in this GP, not any sub-GP

	(rasqal_graph_pattern_tree_binds_variable): Added to test if a
	variable is bound in this GP or any lower sub-GP.

	* src/rasqal_query_transform.c: Split variable mention and binding
	marking into 2 steps

	(rasqal_query_graph_pattern_build_variables_use_map): Remove
	binding marking.

	(rasqal_query_graph_pattern_build_variables_use_map_binds): Added,
	doing recording of variables that bind.  For basic graph patterns
	(BGPs), do that work in the group that surrounds them, which
	leaves just single BGPs to do.

	(rasqal_query_build_variables_use_map): Call
	rasqal_query_graph_pattern_build_variables_use_map_binds() after
	rasqal_query_graph_pattern_build_variables_use_map().

	(rasqal_query_graph_build_variables_use_map_binds): Renamed from
	rasqal_query_graph_build_variables_use_map_in_internal.

	(rasqal_query_let_build_variables_use_map): Renamed from
	rasqal_query_let_build_variables_use_map_in_internal.

	(rasqal_query_let_build_variables_use_map_binds): Added to do
	binding for LET/BIND GPs.

	(rasqal_query_select_build_variables_use_map): Renamed from
	rasqal_query_select_build_variables_use_map_in_internal.

	* src/rasqal_query_transform.c:
	(rasqal_query_build_variables_use): Return number of errors

2011-03-12  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c: Use query->variables_use_map to
	find unused, unbound or both vars.

	(rasqal_query_build_variable_agg_use): Added.

	(rasqal_query_build_variables_use): Call above and walk returned
	list to find variables that are bound+not used, used and not bound
	or neither used nor bound which is probably a parsing error.

2011-03-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_format_html.c:
	(rasqal_iostream_write_html_literal): Support writing additional
	literal types.
	Fixes issue #0000431
	http://bugs.librdf.org/mantis/view.php?id=431

2011-03-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_format_html.c:
	(rasqal_iostream_write_html_literal): Fixed incorrect HTML
	generated with unknown literal types.
	Fixes Issue #0000430
	http://bugs.librdf.org/mantis/view.php?id=430

2011-03-05  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c:
	(rasqal_query_triples_build_variables_use_map_row): Set
	RASQAL_VAR_USE_MENTIONED_HERE to make tests work.

2011-03-03  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_transform.c:
	(rasqal_query_print_variables_use_map): Tidy formatting

	* src/rasqal_query_transform.c: Generate bind flags for triple
	pattern in query variables use-map

	(rasqal_query_triples_build_variables_use_map_row): Set bound or
	mentioned for variables for this triple pattern.

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_transform.c: Tidy query transforming code
	building "bound-in-triple" array.

	(rasqal_query_variable_bound_in_triple): Removed, unused

	(rasqal_query_check_unused_variables): Use
	rasqal_query_get_bound_in_column_for_variable() instead of
	accessing query fields.

	(rasqal_query_build_bound_in_triples): Renamed from
	rasqal_query_build_bound_in

	* src/rasqal_query_transform.c:
	(rasqal_query_graph_pattern_bgp_build_bound_in): renamed from
	rasqal_query_triples_build_bound_in_internal

	* src/rasqal_internal.h, src/rasqal_query_transform.c:
	(rasqal_query_triples_build_bound_in): Removed, unused

2011-03-02  Dave Beckett <dave@dajobe.org>

	* utils/srxread.c:
	report error with failure to read format

2011-03-01  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c, src/rasqal_query_transform.c: Remove unused,
	undefined RASQAL_NO_GP_MERGE

2011-02-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_digest.c: Include mhash.h unconditionally for
	RASQAL_DIGEST_MHASH

2011-02-28  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_digest.c:
	(rasqal_digest_buffer): Fixed integer conversion warning

2011-02-28  Nicholas J Humfrey <njh@aelius.com>

	* src/rasqal_format_html.c: Corrected incorrect string length in
	rasqal_iostream_write_html_literal() that was causing it to
	generate invalid HTML.

2011-02-27  Dave Beckett <dave@dajobe.org>

	* utils/roqet.c: Remove internal -g/ --engine NAME for selecting
	query engine

	* scripts/process-changes.pl: caps names can have 0-9

	* scripts/process-changes.pl: caps names can have _

	* docs/tmpl/section-expression.sgml: Updated tmpls

	* docs/rasqal-changes.tsv: Added digest EXPRs for 0.9.26

	* configure.ac, src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query.c: Removed Query Engine V1

	configure loses --with-query-engine-version option.

2011-02-26  Dave Beckett <dave@dajobe.org>

	* tests/sparql/check-sparql: exist check for output triples

	* src/rasqal_expr_numerics.c, src/sparql_lexer.l,
	src/sparql_parser.y: Lowercase hex needed for digest functions

	* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_numerics.c, src/rasqal_internal.h,
	src/rasqal_query_write.c: Implement SPARQL 1.1 message digest
	expressions

	rasqal_op gains RASQAL_EXPR_MD5, RASQAL_EXPR_SHA1,
	RASQAL_EXPR_SHA224, RASQAL_EXPR_SHA256, RASQAL_EXPR_SHA384 and
	RASQAL_EXPR_SHA512.

	(rasqal_expression_evaluate_digest): Added to evaluate the above
	using rasqal_digest_buffer().

	(rasqal_expression_evaluate2): Call above.

	* src/rasqal_digest_md5.c, src/rasqal_digest_sha1.c: Include
	rasqal_internal.h

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_substr,
	rasqal_expression_evaluate_set_case): Free l1

	* configure.ac, src/Makefile.am, src/rasqal_digest.c,
	src/rasqal_digest_md5.c, src/rasqal_digest_sha1.c,
	src/rasqal_internal.h: Add message digest support internally (MD5,
	SHA1) or mhash (lots)

	(rasqal_digest_buffer): Added internal function.  Skeleton gcrypt
	support also present, not yet enabled in configure.

2011-02-24  Dave Beckett <dave@dajobe.org>

	* NEWS.html: 0.9.25 release pointer

2011-02-23  Dave Beckett <dave@dajobe.org>

	* src/rasqal_decimal.c:
	(rasqal_xsd_decimal_round): Work around lack of mpf_round() in GMP

2011-02-22  Dave Beckett <dave@dajobe.org>

	* NEWS.html, RELEASE.html, configure.ac:
	Bumped version to 0.9.26

	* Snapshotted rasqal_0_9_25 for 0.9.25 release (GIT
	ab36ddfe4189f24dde4f3a0bdaac5459fe9a91d9)

2011-02-21  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal.h.in, src/rasqal_expr.c,
	src/rasqal_feature.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_random.c: Add user API to set random seed for a query

	rasqal_feature gains RASQAL_FEATURE_RAND_SEED for setting the seed
	for use with rand() or rand_r().

	(rasqal_evaluation_context_set_rand_seed): Added for setting seed
	in a standalone expression evaluation context.

	(rasqal_random_get_system_seed): Added as an internal function for
	getting a seed from system sources.

	* src/rasqal_internal.h: docs for internal query fields

	* tests/sparql/check-sparql:
	warnings for bad manifest data

	* src/rasqal_algebra.c:
	(rasqal_algebra_graph_pattern_to_algebra): Remove abort() in debug
	mode.

	* src/rasqal_query_transform.c:
	(rasqal_graph_pattern_join): Handle join of var field (OK when
	merging with empty GP)

2011-02-21  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_query.c:
	(rasqal_query_prepare): Fixed build without HAVE_RAND_R.

	* src/sparql_parser.y: #comment typo

2011-02-19  Dave Beckett <dave@dajobe.org>

	* src/rasqal_decimal.c:
	Fix MPFR floor, round, trunc

	* configure.ac, src/rasqal.h.in, src/rasqal_expr.c,
	src/rasqal_expr_evaluate.c, src/rasqal_expr_numerics.c,
	src/rasqal_internal.h, src/rasqal_query_write.c,
	src/sparql_lexer.l, src/sparql_parser.y: Added ABS, ROUND, CEIL,
	FLOOR expression support and execution.

	rasqal_op gains RASQAL_EXPR_ABS, RASQAL_EXPR_ROUND,
	RASQAL_EXPR_CEIL, and RASQAL_EXPR_FLOOR

	Update all expression callers.

	(rasqal_expression_evaluate_abs, rasqal_expression_evaluate_round,
	rasqal_expression_evaluate_ceil,
	rasqal_expression_evaluate_floor): Added.

	* src/rasqal_internal.h, src/rasqal_literal.c: Add abs, round,
	ceil, floor methods to literal class.

	(rasqal_literal_abs, rasqal_literal_round, rasqal_literal_ceil,
	rasqal_literal_floor): Added.

	* src/rasqal.h.in, src/rasqal_decimal.c: Add abs, round, ceil and
	floor for decimal class

	(rasqal_xsd_decimal_abs, rasqal_xsd_decimal_round,
	rasqal_xsd_decimal_ceil, rasqal_xsd_decimal_floor): Added.

	* configure.ac: Add test for stdint.h

	* src/rasqal_xsd_datatypes.c:
	(rasqal_xsd_format_double): Numbers with no trailing 0s no longer
	fail

2011-02-18  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c:
	Mix random seed sources for RAND()

	(rasqal_query_prepare): Use mix public domain code from
	http://www.burtleburtle.net/bob/c/lookup3.c to mix processor
	clock, wall clock time and process ID to get a better random seed.
	This code should definitely be elsewhere rather than in query
	prepare!

	* src/rasqal_query.c: syntax

	* src/rasqal_query.c: autodocs

	* src/rasqal_expr_numerics.c, src/rasqal_query.c: Init random seed
	from some C standard function sources

	* src/rasqal_expr_numerics.c:
	(rasqal_expression_evaluate_rand): Generate a double in range [0, 1)

	* src/rasqal.h.in: fix rasqal_evaluation_context_set_base_uri
	prototype

	* src/rasqal.h.in, src/rasqal_algebra.c, src/rasqal_engine.c,
	src/rasqal_engine_sort.c, src/rasqal_expr.c,
	src/rasqal_expr_numerics.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rasqal_query_transform.c,
	src/rasqal_rowsource_assignment.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c: Turn
	rasqal_evaluation_context into a simple class.

	(rasqal_new_evaluation_context, rasqal_free_evaluation_context,
	rasqal_evaluation_context_set_base_uri): Added.  The constructor
	takes the simple common args - world, locator and flags (none of
	which are shared).  Most fields such as seed can be set
	directly (not referenced counted; shared).

	The single method rasqal_new_evaluation_context_set_base_uri
	manages the reference counted base URI.

	Updated callers and initialise when a query is constructed in
	rasqal_new_query()

	* src/sparql_parser.y:
	(Query): Move BindingsClauseOpt here to allow with any verb

	* src/sparql_parser.y: docs

	* src/sparql_parser.y: NOW() is part of SPARQL 1.1

	* src/rasqal_expr.c:
	(rasqal_expression_visit): Do not fail when visiting BNODE()

	* src/rasqal.h.in, src/rasqal_expr.c: Support BNODE() with no
	args.

	Note RASQAL_EXPR_BNODE handles BNODE()

	(rasqal_new_1op_expression): Allow BNODE() to have a NULL arg.

	* src/sparql_parser.y: Use rasqal_new_0op_expression to make
	RASQAL_EXPR_RAND

	* src/sparql_lexer.l, src/sparql_parser.y: Add SPARQL 1.1 BIND()

	* src/rasqal_query_write.c: Add BIND to rasqal_sparql_op_labels.

	* docs/tmpl/section-expression.sgml,
	docs/tmpl/section-literal.sgml:	Update tmpls

2011-02-15  Dave Beckett <dave@dajobe.org>

	* utils/check_query.c: Find and print differences in query result
	rows

	(new_compare_query_results): Add world parameter

	(compare_query_results_compare): Check number of bindings match.
	For each row, check values match for each binding and print out a
	formatted message with the difference.  Print an error message
	once if there were any row differences.  Tidy the other error
	messages.

	(main): Set executed query results to be stored/rewindable.  Set
	the expected results to be stored/rewindable.

2011-02-15  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c:
	(rasqal_query_set_store_results): Make this actually work after a
	prepare.

	* utils/check_query.c: check rows are the same width

	* src/rasqal_dataset.c: autodocs

2011-02-14  Dave Beckett <dave@dajobe.org>

	* src/rasqal_format_rdf.c: Do not emit rs:binding if there is no
	value.

	* src/rasqal_format_table.c: Handle printing NULL values

	* src/sparql_common.h, src/sparql_lexer.l, src/sparql_parser.y:
	Update SPARQL """-quoted and '''-quoted strings to Turtle spec.

	Now support @lang suffix and do not suffer from grabbing too much 
	data.

	(STRING_LITERAL): Removed token from lexer.

	(STRING): Added as a simple lexer string

	(HATHAT): Added lexer token for '^^'.

	(RDFLiteral): Added to parser handling the string, lang string or
	datatyped string alternatives.  Uses STRING

	(SeparatorOpt): Updated to use STRING.

	(BindingValue, GraphTerm): Updated to use RDFLiteral.

	(sparql_stringbuffer_append_sparql_string): Added based on
	turtle_stringbuffer_append_turtle_string adding \f and \b escapes
	and adjusting error handling to go direct to a rasqal function.

	Fixes Issue#0000427
	http://bugs.librdf.org/mantis/view.php?id=427
	and Issue#0000428
	http://bugs.librdf.org/mantis/view.php?id=428

	* tests/sparql/update/Makefile.am,
	tests/sparql/update/insert-data-2.rq,
	tests/sparql/update/insert-data-3.rq,
	tests/sparql/update/insert-data-4.rq: Add tests from Issue#0000427
	http://bugs.librdf.org/mantis/view.php?id=427

2011-02-14  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y:
	(ClearQuery): Quick fix to avoid raptor_uri_copy(NULL) assertion
	failures and make tests pass.

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_strmatch): Fixed build with
	RASQAL_REGEX_{NONE,PCRE}

2011-02-13  Dave Beckett <dave@dajobe.org>

	* src/rasqal_internal.h, src/sparql_parser.y: Fix SPARQL 1.1 CLEAR
	and DROP to allow optional SILENT

	Add internal sparql_uri_applies typedef to hold the pair of URI
	and applies destination enum.

	(new_uri_applies, free_uri_applies): Added internal to sparql
	parser.

	(GraphRefAll): Returns a sparql_uri_applies value token.  Merge in
	the legacy GRAPH DEFAULT check here.

	(ClearQuery, DropQuery): Simplify using GraphRefAll returning both
	the optional graph URI and the applies enum.

	* tests/sparql/check-sparql: fix GIT earl output

	* src/rasqal_algebra.c, src/rasqal_engine_algebra.c: Add support
	for FILTER graph pattern execution on it's own.

	Previously all FILTER GPs were merged with Basic GP and then
	executed as part of the triples rowsource.  This fails when FILTER
	is used alone like ... ASK WHERE { FILTER ( TRUE ) } which returns
	TRUE.

	(rasqal_new_filter_algebra_node): May now take NULL node.

	(rasqal_algebra_filter_graph_pattern_to_algebra): Added to use
	above to make a FILTER over no node.

	(rasqal_algebra_graph_pattern_to_algebra): Turn FILTER GP into
	algebra with above function.

	(rasqal_algebra_filter_algebra_node_to_rowsource): if the inner
	node is NULL, use an empty rowsource to 'filter' over.  This could
	be optimized out in future but is sufficient and correct.

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c: Guard all returns from
	rasqal_expression_evaluate2() to check handle NULL value if not
	supported

	* src/rasqal_rowsource_project.c:
	(rasqal_project_rowsource_read_row): Ignore errors in project AS
	Vars.

	Need to check this against the spec, but tests seem to require it
	such as SPARQL 1.1 project-expression test 'Expression raise an
	error'

	* src/rasqal.h.in, src/rasqal_internal.h, src/rasqal_literal.c:
	Update literal type error returns.

	(rasqal_literal_as_integer, rasqal_literal_as_floating): NULL
	evaluated is a type error not an assertion failure/abort (debug
	mode).

	(rasqal_literal_as_counted_string, rasqal_literal_as_string_flags,
	rasqal_literal_compare, rasqal_literal_as_boolean,
	rasqal_literal_as_integer, rasqal_literal_as_floating): Alter
	parameter names for error return to be error_p and update
	autodocs.

	* src/rasqal_literal.c:
	(rasqal_literal_as_boolean): NULL evaluated is a type error.

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate2): Handle AND, OR literal error returns

2011-02-12  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c: Replace literal NULL test with error_p
	return tests

	* src/rasqal_literal.c:
	(rasqal_literal_value): Return NULL on NULL arg; tidy code

	* src/rasqal_literal.c:
	(rasqal_literal_compare): Return error on any NULL pointer arg

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate_str): Return on success

	* src/rasqal.h.in, src/rasqal_algebra.c, src/rasqal_engine.c,
	src/rasqal_engine_sort.c, src/rasqal_expr.c,
	src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h,
	src/rasqal_query_transform.c, src/rasqal_rowsource_assignment.c,
	src/rasqal_rowsource_filter.c, src/rasqal_rowsource_join.c,
	src/rasqal_rowsource_project.c: rasqal_expression_evaluate2
	updated to add an error pointer return arg.

	(rasqal_expression_evaluate2): Add an error_p pointer to an error
	flag to return an error since NULL is a valid expression evalution
	in some cases; like STRLANG() on non-simple literals.

	Update all callers to set error_p on error/failure case.

	(rasqal_engine_rowsort_calculate_order_values): Tidy cody when an
	error happens.

	(rasqal_expression_sequence_evaluate): Pass down error return.

	(rasqal_expression_evaluate): If error is returned, pass on NULL.

	(rasqal_expression_foreach_fold): If evaluation fails, break loop
	and return error.

	(rasqal_project_rowsource_read_row): Add failed cleanup.  On
	evaluation failure in loop, fail and return.

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c: use goto failed on errors

	* src/rasqal_expr_evaluate.c: autodocs

	* src/rasqal_expr_evaluate.c: Rename expr_context to eval_context

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c: Update internal autodocs for
	rasqal_evaluation_context API change

	* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_query.c:
	(rasqal_evaluation_context_init): Renamed from
	rasqal_expression_context_init

2011-02-11  Dave Beckett <dave@dajobe.org>

	* configure.ac, src/Makefile.am, src/rasqal.h.in,
	src/rasqal_expr.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_numerics.c, src/rasqal_internal.h,
	src/rasqal_query_write.c, src/sparql_lexer.l, src/sparql_parser.y:
	
	Add RASQAL_EXPR_RAND for SPARQL 1.1 RAND()

	rasqal_op gains RASQAL_EXPR_RAND

	rasqal_world gains seed field.  Check for rand_r and use it if
	available.

	(rasqal_expression_evaluate_rand): Added TODO: Initialise seed
	with srandom() or with assignment (if srand_r is present) and
	provide API to do so too.

2011-02-10  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in, src/rasqal_algebra.c, src/rasqal_engine.c,
	src/rasqal_engine_sort.c, src/rasqal_expr.c,
	src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h,
	src/rasqal_query.c, src/rasqal_query_transform.c,
	src/rasqal_rowsource_assignment.c, src/rasqal_rowsource_filter.c,
	src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c:
	Perform all expression evaluation with rasqal_evaluation_context

	Added new typedef rasqal_evaluation_context to wrap context needed
	for expression evaluation, adding an optional base URI.

	rasqal_query gains a static rasqal_evaluation_context.

	(rasqal_expression_evaluate2): Added taking just an expression and
	an evaluation context.  Deprecates rasqal_expression_evaluate().

	(rasqal_expression_evaluate): Deprecated for above.

	Change all expression evaluation code to use
	rasqal_expression_evaluate() and pass around an expression
	evaluation context eval_context.

	(rasqal_query_prepare): Initialise the query eval_context field.

2011-02-09  Dave Beckett <dave@dajobe.org>

	* src/rasqal_rowsource_empty.c,
	tests/sparql/syntax/result-0triples.n3: Alter empty rowsource to
	return 1 row of no bindings.

	(rasqal_empty_rowsource_read_row): Return a single empty row, then
	NULL.

	(rasqal_empty_rowsource_read_all_rows): Return a seq with one
	empty row

	(main): Adjust tests to expect above.  Alter syntax test
	result-0triples.n3 to expect change.

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate_strdt): Free l1 and l2 after done with
	contents.

	* src/rasqal_expr_evaluate.c: Return no value for STRDT() and
	STRLANG() on non-simple literals.

	* src/rasqal_expr_strings.c: SPARQL 1.1 ENCODE_FOR_URI() does not
	preserve language and datatype of input

	(rasqal_expression_evaluate_encode_for_uri): Remove copy of
	language and datatype URI

	* src/rasqal.h.in, src/rasqal_datetime.c, src/rasqal_expr.c,
	src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_query_write.c, src/sparql_lexer.l, src/sparql_parser.y:
	Added RASQAL_EXPR_TZ for SPARQL 1.1 TZ()

	(rasqal_expression_evaluate_datetime_timezone): Tidy.

	(rasqal_expression_evaluate_datetime_tz): Added, returning the
	timezone string using
	rasqal_xsd_datetime_get_tz_as_counted_string().

	(rasqal_expression_evaluate): Evaluate RASQAL_EXPR_TZ

	* src/rasqal_datetime.c, src/rasqal_internal.h: Add support
	getting timezone string raw (not as day duration)

	(rasqal_xsd_datetime_timezone_format): Added, pulled out of
	rasqal_xsd_datetime_to_counted_string().

	Define #TIMEZONE_STRING_LEN for use throughtout the file.

	(rasqal_xsd_datetime_to_counted_string): Call above.

	(rasqal_xsd_datetime_get_ta_as_counted_string): Added to get back
	the TZ string component.

	* src/sparql_lexer.l: Add TZ as synonym for TIMEZONE. Until
	otherwise informed.

	* src/rasqal_expr_datetimes.c:
	(rasqal_expression_evaluate_datetime_timezone): Add
	xsd:dayTimeDuration datatype to result.

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_seconds_as_decimal): Correctly get
	decimal.

	* src/sparql_parser.y:
	Allow GROUP BY to have an optional AS ?var

	(AsVarOpt): Added, pulled out of GroupCondition

	(GroupCondition): Handle optional var, returning just an expression

2011-02-08  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query.c:
	rasqal_query_get_bound_in_column_for_variable autodocs

2011-02-08  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_format_html.c, src/rasqal_format_json.c,
	src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
	src/rasqal_format_sv.c, src/rasqal_format_table.c,
	src/rdql_parser.y, src/sparql_parser.y: Removed remaining
	raptor_syntax_description mime_types_count and uri_strings_count
	initialization after commit e8d0043.

	The counts are initialized by raptor_syntax_description_validate().
	Changed mime_types/uri_strings arrays to be implicitly sized.

2011-02-06  Dave Beckett <dave@dajobe.org>

	* LICENSE.html: Make GPL V2 or newer explicit.

2011-02-03  Nicholas J Humfrey <njh@aelius.com>

	* src/rasqal_format_html.c, src/rasqal_format_json.c,
	src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
	src/rasqal_format_sv.c, src/rasqal_format_table.c,
	src/rasqal_general.c, src/rasqal_result_formats.c: Use
	raptor_syntax_description_validate() to check query result
	descriptions and query syntax descriptions, instead of duplicating
	code.

2011-02-03  Dave Beckett <dave@dajobe.org>

	* NEWS.html, RELEASE.html, configure.ac:
	Bumped version to 0.9.25

2011-02-01  Dave Beckett <dave@dajobe.org>

	* rasqal.spec.in: Rasqal using raptor2 attempt

2011-01-31  Dave Beckett <dave@dajobe.org>

	* INSTALL.html:
	Update INSTALL notes for pkg-config help, remove --with-raptor

2011-01-31  Lauri Aalto <laalto@iki.fi>

	* src/sparql_parser.y:
	(ClearQuery, DropQuery): Cast away enum-int conversion warnings.

2011-01-30  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_24 for 0.9.24 release (GIT commit
	17c89f4f3643385e61e25afec9a3599cacf6dedd)

	* tests/sparql/update/Makefile.am, tests/sparql/update/add-3.rq,
	tests/sparql/update/copy-3.rq, tests/sparql/update/move-3.rq: Add
	tests for ADD, COPY, MOVE with 2 DEFAULT args

	* src/rasqal_update.c:
	(rasqal_new_update_operation): Allow ADD, COPY, MOVE to have 2
	NULL args.

	* RELEASE.html, docs/rasqal-changes.tsv, src/rasqal.h.in:
	Documentation fixes for 0.9.24 Add ADD, MOVE, COPY notes about
	source/dest graphs

	Add rasqal_graph_pattern_get_flattened_triples and new enums to
	API changes

2011-01-29  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c:
	(rasqal_new_group_concat_expression): Add
	RASQAL_EXPR_FLAG_AGGREGATE

	* src/sparql_parser.y, tests/sparql/update/Makefile.am,
	tests/sparql/update/multiple-1.rq: Support SPARQL 1.1 Update
	DELETE WHERE { }

	(DeleteQuery): Add DELETE WHERE { } storing the triples in
	update->delete_templates

	Add and enable DELETE WHERE tests delete-where-1.rq and
	delete-where-2.rq which were in GIT already but not called.

	* src/sparql_lexer.l, src/sparql_parser.y,
	tests/sparql/update/Makefile.am,
	tests/sparql/update/delete-data-2.rq,
	tests/sparql/update/insert-2.rq,
	tests/sparql/update/multiple-1.rq:
	Require ; between update operations

	Add test for multiple operations in one update

	Adjust tests to match new syntax: delete-data-2.rq insert-2.rq

	Alter sparql lexer and parser test buffer size to 4K

	* src/rasqal_literal.c:
	(rasqal_free_literal): Free datetime datatype URI

	* docs/tmpl/section-updates.sgml: Update tmpls

	* src/rasqal_algebra.c:
	(rasqal_algebra_extract_aggregate_expression_visit): Correct
	variable references for aggregate work: give map a reference.

	* src/rasqal_rowsource_aggregation.c: autodocs

	* src/rasqal_rowsource.c: autodocs

2011-01-28  Dave Beckett <dave@dajobe.org>

	* src/rasqal_algebra.c:
	(rasqal_algebra_query_add_aggregation): Clean up ae if no
	aggregation in query.

	* src/rasqal_rowsource_aggregation.c:
	(rasqal_aggregation_rowsource_finish): Free con->expr_data

	* src/rasqal_solution_modifier.c:
	(rasqal_free_solution_modifier): Free having conditions

	* src/rasqal_algebra.c, src/rasqal_dataset.c, src/rasqal_engine.c,
	src/rasqal_format_table.c, src/rasqal_formula.c,
	src/rasqal_general.c, src/rasqal_graph.c,
	src/rasqal_graph_pattern.c, src/rasqal_map.c,
	src/rasqal_result_formats.c, src/rasqal_row_compatible.c,
	src/rasqal_rowsource.c, src/rasqal_triples_source.c,
	src/rasqal_update.c: Make all object destructors simply return on
	a NULL object pointer

	* src/rasqal_projection.c:
	(rasqal_free_projection): Free if pointer NOT NULL

	* src/rasqal_literal.c:
	(rasqal_new_variable_literal): Only free variable if calloc fails

	* docs/rasqal-sections.txt, src/rasqal.h.in,
	src/rasqal_internal.h, src/rasqal_query_write.c,
	src/rasqal_update.c, src/sparql_lexer.l, src/sparql_parser.y,
	tests/sparql/update/Makefile.am, tests/sparql/update/add-1.rq,
	tests/sparql/update/add-2.rq, tests/sparql/update/copy-1.rq,
	tests/sparql/update/copy-2.rq, tests/sparql/update/move-1.rq,
	tests/sparql/update/move-2.rq: Added support for SPARQL 1.1 Update
	draft ADD, MOVE, COPY parsing.

	rasqal_update_type gains new enum values RASQAL_UPDATE_TYPE_ADD,
	RASQAL_UPDATE_TYPE_MOVE and RASQAL_UPDATE_TYPE_COPY

	Added new enum rasqal_update_graph_applies

	rasqal_update_operation gains new applies field for CLEAR and DROP
	to signify they apply to multiple graphs.

	(rasqal_query_write_graphref): Added method for writing uri or
	DEFAULT or Named or ALL

	(rasqal_query_write_sparql_20060406): Write out new tokens and use
	rasqal_query_write_graphref() for terms.  Refactor.  SPARQL
	lexer/parser adds the new tokens ADD, MOVE, COPY and TO.

	(AddQuery, MoveQuery, CopyQuery): Added.

	(UpdateOperation): Add above alternatives to updates.

	(SilentOpt): Added to return silent flag.

	(CreateQuery, DropQuery, LoadQuery): Refactored to use above flag
	and save several code blocks.  Move around the warnings for
	deprecated SPARQL 1.1 and LAQRS syntax.

	(GraphRefAll): Added for Clear and Drop (excluding GraphRef)

	(rasqal_new_update_operation): Add applies arg.

	(rasqal_update_operation_print): Print new ops, document URI and
	applies.  Added tests for SPARQL 1.1 Update ADD, MOVE, COPY

	* NEWS.html, RELEASE.html, configure.ac: Bumped version to 0.9.24

	* src/rasqal_literal.c: Free a few more variable references

	(rasqal_new_variable_literal): Free passed in variable on error

	(rasqal_free_literal): Free variable if not NULL.

	* src/rasqal_literal.c:
	(rasqal_free_literal): Free reference-counted variables

	* utils/roqet.c: Make tidy_query free the query

2011-01-27  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_23 for 0.9.23 release (GIT
	c2105bc8f4ccc77bb407213aa19c2a9e57c42531)

	* tests/sparql/Expr1/Makefile.am, tests/sparql/Expr2/Makefile.am:
	Mark 4 SPARQL 1.0 tests as passing after NULL literal comparison
	fixes.
	Expr1:
	  Tests "OPTIONAL-FILTER" and "OPTIONAL - Outer FILTER" now pass
	Expr2:
	  Tests "Test 'boolean effective value' - optional" and 
	  "Test 'boolean effective value' - unknown types" now pass

	* NEWS.html, RELEASE.html, src/rasqal_literal.c:
	(rasqal_literal_equals_flags): Make comparisons with one or more
	NULLs work.

	Fixes Issue#0000417
	http://bugs.librdf.org/mantis/view.php?id=417

2011-01-26  Dave Beckett <dave@dajobe.org>

	* src/rasqal_literal.c:
	(rasqal_literal_array_compare): Sort NULLs earlier in SPARQL
	ordering.
	Fixes Issue#0000407
	http://bugs.librdf.org/mantis/view.php?id=407

	* docs/tmpl/section-graph_pattern.sgml: Update tmpls

	* scripts/process-changes.pl: Sort by new version, newest first.
	Put package title in section only. Handle multiple old/new version
	pairs

	* docs/Makefile.am: Rasqal name

	* ChangeLog, ChangeLog.8, Makefile.am: Add ChangeLog.8 for 2010

	* docs/rasqal-changes.tsv, docs/rasqal-sections.txt: Add
	rasqal_graph_pattern_get_flattened_triples

	* scripts/process-changes.pl:
	Update to version from librdf

2011-01-25  Dave Beckett <dave@dajobe.org>

	* src/rasqal_query_write.c:
	(rasqal_query_write_sparql_triple_data): Emit GRAPH lit { ... }
	correctly

	* src/sparql_parser.y:
	(GraphTemplate): Tidy conditions and do cleanup

	* src/sparql_parser.y:
	(GraphTemplate): Apply GRAPH to triples sequence directly

	* src/rasqal_query_write.c:
	(rasqal_query_write_sparql_triple_data): Handle triples templates

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples_visit): Handle empty
	seq.

	* src/sparql_parser.y: Return flat triples in update insert/delete
	templates

	(GraphTriples, UpdateQuery): Use
	rasqal_triples_sequence_set_origin() to expand BGP/GGP into a flat
	sequence of triples for caller.

	* src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples_visit): Use
	rasqal_triples_sequence_set_origin().

	* src/rasqal_internal.h, src/rasqal_triple.c:
	(rasqal_triples_sequence_set_origin): Added to set the same graph
	URI origin for a sequence of rasqal_triple

	* src/sparql_parser.y: Make update operations
	insert/delete_template fields store seq of triples.

	(GraphTemplate, ModifyTemplate): Now seq of
	rasqal_triple (GraphTemplate): Use
	rasqal_graph_pattern_get_flattened_triples() to turn a basic graph
	pattern or one with GRAPH gp into a sequence of triples.

	* src/rasqal.h.in, src/rasqal_graph_pattern.c:
	(rasqal_graph_pattern_get_flattened_triples): Added to flatten
	triple templates

	* NEWS.html, RELEASE.html, configure.ac: Bumped version to 0.9.23

	* src/rasqal_update.c:
	(rasqal_new_update_operation): Correct internal docs

	* src/rasqal.h.in: rasqal_update_operation docs

2011-01-21  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr.c:
	(rasqal_expression_compare): Compare op to RASQAL_EXPR_UNKNOWN

2011-01-17  Dave Beckett <dave@dajobe.org>

	* src/sparql_parser.y: When language feature is not allowed, use
	YYERROR to unwind stack and abort query cleanly

2011-01-12  Dave Beckett  <dave@dajobe.org>

	* Snapshotted rasqal_0_9_22 for 0.9.22 release (GIT
	b2b04e39695cced136e1d24d00d84066868d0c89)

	* docs/librasqal.3: skeleton

	* utils/Makefile.am: move check-query to EXTRA for now

	* utils/roqet.1: formatting

	* src/rasqal_general.c: 2011

	* configure.ac, src/.gitignore, src/rasqal.h.in,
	src/win32_rasqal_config.h, src/win32_rasqal_config.h.in:
	Substitute rasqal versions into src/rasqal.h.in and
	src/win32_rasqal_config.h.in

	* rasqal-src-config.in: pkg-config raptor2 only

	* configure.ac: RAPTOR_MIN_VERSION 2.0.0

	* configure.ac: AC_SUBST(RAPTOR_MIN_VERSION)

	* configure.ac: RASQAL_LIBTOOL_VERSION 3:0:0 causing soname bump

2011-01-11  Dave Beckett <dave@dajobe.org>

	* scripts/process-changes.pl: Make changes generate 1 page per
	changeset. Sort output by function, type or enum name

	* docs/rasqal-changes.tsv: 0.9.22 changes

	* src/rasqal.h.in: code style

	* docs/tmpl/rasqal-unused.sgml, docs/tmpl/section-data.sgml,
	docs/tmpl/section-expression.sgml, docs/tmpl/section-general.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-query_results_formatter.sgml,
	docs/tmpl/section-unused.sgml, docs/tmpl/section-variable.sgml,
	docs/tmpl/section-xsd.sgml: Update tmpls

	* src/rasqal.h.in: document rasqal_generate_bnodeid_handler.
	Added enum rasqal_query_results_format_flags for bitflags

	* docs/rasqal-sections.txt: Added rasqal_generate_bnodeid_handler,
	rasqal_query_results_format_flags.  Removed
	rasqal_query_results_formatter_get_mime_type,
	raptor_message_handler

	* docs/rasqal-sections.txt: updated sections

2011-01-11  Lauri Aalto <laalto@iki.fi>

	* src/rasqal.h.in:
	(rasqal_new_query_results_formatter,
	rasqal_new_query_results_formatter_for_content): Added RASQAL_API
	exports to public API functions.

2011-01-10  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in: Removed raptor_message_handler

	* docs/.gitignore, docs/Makefile.am, docs/rasqal-changes.tsv,
	docs/rasqal-docs.xml, scripts/Makefile.am,
	scripts/process-changes.pl: Generate Rasqal changes doc sections
	
	Generate the changes using an update version process-changes.pl
	from raptor V2 that can handle multiple sections for different
	old/new versions as well as omitting sections that have no
	content.

	* src/rasqal.h.in, src/rasqal_data_graph.c, src/rasqal_expr.c,
	src/rasqal_general.c, src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_service.c, src/rasqal_variable.c, src/rdql_parser.y,
	src/sparql_parser.y, tests/engine/rasqal_graph_test.c,
	tests/engine/rasqal_triples_test.c, utils/check_query.c,
	utils/roqet.1, utils/roqet.c, utils/srxread.c, utils/srxwrite.c:
	
	Remove all deprecated functions and rename foo2() to foo()

	rasqal_generate_bnodeid_handler takes a world object (was
	rasqal_generate_bnodeid_handler2)

	(rasqal_world_set_generate_bnodeid_handler):
	takes a rasqal_generate_bnodeid_handler arg (was
	rasqal_generate_bnodeid_handler2)

	Removed deprecated: rasqal_query_set_fatal_error_handler,
	rasqal_query_set_error_handler, rasqal_query_set_warning_handler,
	rasqal_query_set_default_generate_bnodeid_parameters,
	rasqal_query_set_generate_bnodeid_handler,
	rasqal_query_results_formats_enumerate,
	rasqal_new_query_results_formatter_by_mime_type,
	rasqal_query_results_formatter_get_mime_type,
	rasqal_new_data_graph, rasqal_new_coalesce_expression,
	rasqal_new_variable_typed,
	rasqal_new_variable.

	(rasqal_query_add_data_graph): Takes a data_graph arg instead of
	uri, name and flags (renamed from rasqal_query_add_data_graph2)

	(rasqal_query_results_write, rasqal_query_results_read): Take a
	name, mime_type, format_uri, base_uri args instead of format_uri,
	base_uri. (Renamed from rasqal_query_results_write2 and
	rasqal_query_results_read2 respectively).

	(rasqal_query_results_formats_check): Takes name, format URI,
	mime_type flags instead of name, uri and type. (Renamed from
	rasqal_query_results_formats_check2)

	(rasqal_new_query_results_formatter): Takes name, format type,
	format URI args instead of just name, format URI (renamed from
	rasqal_new_query_results_formatter2)

	(rasqal_new_query_results_formatter_for_content): Replaces
	rasqal_new_query_results_formatter_by_mime_type and takes optional
	buffer with length and identifer.

	(rasqal_new_function_expression): Added params and flags args to
	handle aggregate expressions. (Renamed from
	rasqal_new_function_expression2)

	roqet: delete deprecated -w arg. Use -d structure instead.

	* src/rasqal.h.in, src/rasqal_data_graph.c, src/rasqal_expr.c,
	src/rasqal_query_results.c, src/rasqal_result_formats.c,
	src/rasqal_variable.c: Add if !defined(RASQAL_DISABLE_DEPRECATED)
	around remaining deprecated functions

2011-01-06  Dave Beckett <dave@dajobe.org>

	* src/rasqal.h.in, src/rasqal_expr.c, src/rasqal_internal.h,
	src/rasqal_query.c: Added RASQAL_DISABLE_DEPRECATED macros around
	things that are going away

2011-01-04  Dave Beckett <dave@dajobe.org>

	* INSTALL.html, configure.ac, rasqal.pc.in, src/rasqal.h.in,
	src/rasqal_algebra.c, src/rasqal_dataset.c, src/rasqal_engine.c,
	src/rasqal_engine_sort.c, src/rasqal_expr.c,
	src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c,
	src/rasqal_format_table.c, src/rasqal_general.c,
	src/rasqal_graph_pattern.c, src/rasqal_internal.h,
	src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c,
	src/rasqal_query_results.c, src/rasqal_query_transform.c,
	src/rasqal_query_write.c, src/rasqal_raptor.c,
	src/rasqal_result_formats.c, src/rasqal_row.c,
	src/rasqal_rowsource.c, src/rasqal_rowsource_aggregation.c,
	src/rasqal_rowsource_groupby.c, src/rasqal_rowsource_project.c,
	src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c,
	src/rasqal_service.c, src/rasqal_variable.c, src/rdql_lexer.l,
	src/rdql_parser.y, src/sparql_lexer.l, src/sparql_parser.y,
	utils/Makefile.am, utils/check_query.c, utils/roqet.c: Kill
	support for Raptor V1

2011-01-04  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_expr_strings.c:
	(rasqal_unicode_utf8_substr): Fixed integer conversion resulting
	in change of sign

2011-01-03  Dave Beckett <dave@dajobe.org>

	* src/rasqal_expr_strings.c:
	(rasqal_unicode_utf8_substr): End substr after length unichars

	* RELEASE.html, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h: Execute SUBSTR()
	2 and 3-arg versions

	(rasqal_unicode_utf8_substr): Added to do unicode UTF-8 substr
	using 0-offset index.

	(rasqal_expression_evaluate_substr): Added to implement SPARQL 1.1
	draft SUBSTR() using above.  Adjust XSD string 1-offset indexes.

	(rasqal_expression_evaluate): Call above for RASQAL_EXPR_SUBSTR

	* RELEASE.html, src/rasqal_expr_evaluate.c,
	src/rasqal_expr_strings.c, src/rasqal_internal.h: Execute
	ENCODE_FOR_URI()

	(rasqal_expression_evaluate_encode_for_uri): Added to implement
	SPARQL 1.1 draft ENCODE_FOR_URI()

	(rasqal_expression_evaluate): Call above for
	RASQAL_EXPR_ENCODE_FOR_URI.

	* INSTALL.html, LICENSE.html, NEWS.html, README.html,
	RELEASE.html, TODO.html, docs/rasqal-docs.xml: #2011

	* docs/tmpl/section-query_results.sgml: Update tmpls

	* utils/check_query.c: Raptor V1 support by importing V2 stuff.
	Sigh.

	* src/rasqal.h.in, src/rasqal_query_results.c:
	(rasqal_query_results_get_row_by_offset): Added to access stored
	query result rows

	* src/rasqal_query_results.c:
	(rasqal_query_check_limit_offset): negative offsets are errors

	* src/rasqal_engine.c, src/rasqal_internal.h,
	src/rasqal_query_results.c:
	(rasqal_query_check_limit_offset): Renamed from
	rasqal_query_results_check_limit_offset Renamed since this no
	longer uses (reads/writes) any query result state Updated callers.

	* src/rasqal_query_results.c:
	(rasqal_query_results_check_limit_offset): Just check, do not set
	finished flag

	* src/rasqal_engine.c, src/rasqal_query_results.c: Adjust callers
	of rasqal_query_results_check_limit_offset() to set finished flag
	explicitly

2011-01-03  Lauri Aalto <laalto@iki.fi>

	* src/rasqal_format_rdf.c: Eliminated initialized data - added
	const to ptr that does not need to be modified

	* src/rasqal_expr_strings.c, src/rasqal_query_results.c:
	(rasqal_expression_evaluate_concat,rasqal_query_results_rewind):
	Init variables before using them

	* src/rasqal_dataset.c, src/rasqal_query_results.c:
	(rasqal_dataset_init_match_internal,rasqal_query_results_get_type):
	Fixed int-enum warnings

	* src/rasqal_expr.c: fixed non-ascii comment

	* src/rasqal_expr_strings.c:
	(rasqal_expression_evaluate_set_case): Fixed compiler warnings

2011-01-02  Dave Beckett <dave@dajobe.org>

	* utils/check_query.c:
	(compare_query_results_compare): renamed to match code style

	* src/rasqal.h.in, src/rasqal_query_results.c: Added rewindable
	query results

	(rasqal_query_results_rewind): Added.

	(rasqal_query_results_execute_and_store_results): Calls above to
	reset the state after execution of all rows.  Adjust return to be
	failure so that empty result sets are not an error.

	(rasqal_query_results_get_row_from_saved): Return a copy of a row
	from a sequence rather then use the raptor_sequence_delete_at to
	allow rewinding to work.

	* src/rasqal.h.in, src/rasqal_internal.h, src/rasqal_query.c:
	(rasqal_query_set_store_results): Moved to public API.  Resets to
	unset after a prepare

	* tests/sparql/check-sparql:
	protect test for undef var

	* src/rasqal_internal.h, src/rasqal_query.c,
	src/rasqal_query_results.c: Alter rasqal_query_execute_with_engine
	to allow storing query results

	(rasqal_query_execute_with_engine): Construct a query result and
	then call rasqal_query_results_execute_with_engine() to execute
	it, passing in any query store_results flag directly.

	(rasqal_query_results_execute_with_engine): Alter signature to
	become a method query_results class, adding a store_results flag
	argument and just do executing not construction and executing -
	misnamed by code style.  Result is now a success int value.

	* utils/check_query.c:
	Add query results comparison local class

	(check_query_log_handler, check_query_error_handler): Tidy to
	print nicer messages if there is no locator

	(new_compare_query_results, free_compare_query_results,
	compare_query_results_set_log_handler,
	compare_compare_query_results): Added skeleton of a query results
	comparison class.

	* utils/check_query.c:
	(check_query_read_results): Added for code tidy.

	* utils/check_query.c: Allow -F/--format to set parser or query
	results format name.

	* utils/check_query.c: Print out expected and actual bindings
	result

	* utils/check_query.c: Init ds to NULL

	* src/rasqal_internal.h: Add V1 raptor_new_iostream_from_filename
	macro

	* utils/check_query.c: Read expected result

	* src/rasqal.h.in: raptor_uri

	* src/rasqal_format_rdf.c, src/rasqal_format_sparql_xml.c: Add
	query results recongising for 'rdf', 'turtle' and 'xml'
	formatters.

	(rasqal_query_results_rdfxml_recognise_syntax,
	rasqal_query_results_turtle_recognise_syntax,
	rasqal_query_results_xml_recognise_syntax): Added. All recognising
	just a few suffixes.

	* src/rasqal_internal.h: recognise not recognize

	* src/rasqal.h.in, src/rasqal_internal.h,
	src/rasqal_result_formats.c: Add query results format guessing.

	(rasqal_world_guess_query_results_format_name): Added to guess
	format based on format URI, mime type, some sample content or an
	identifier.

	(rasqal_new_query_results_formatter_for_content): Added to use
	above to construct a formatter from content.

	Typedef rasqal_query_results_recognize_syntax_func added
	rasqal_query_results_format_factory gains recognize_syntax
	optional factory method.

	* utils/roqet.c:
	(roqet_init_query): Remove unused results variable

	* utils/check_query.c: Use iostream and dataset to read graph
	results.

	* utils/check_query.c:
	(check_query_init_query): Added to pull init query code out of
	main

	* utils/.gitignore, utils/Makefile.am, utils/check_query.c: Add
	start of check_query utility

	* src/rasqal_query_results.c: Use rasqal_query_get_result_type in
	query engine execution

	(rasqal_query_results_execute_with_engine): Call
	rasqal_query_get_result_type() to get expected type and use
	RASQAL_QUERY_RESULTS_UNKNOWN for error case.

	* src/rasqal.h.in, src/rasqal_query.c:
	(rasqal_query_get_result_type): Added to determine expected result
	type from query structure Based on logic from
	rasqal_query_results_execute_with_engine()

	* src/rasqal.h.in: rasqal_query_results_type gains
	RASQAL_QUERY_RESULTS_UNKNOWN

	* src/rasqal.h.in, src/rasqal_query_results.c:
	(rasqal_query_results_get_type): Added

2011-01-01  Dave Beckett <dave@dajobe.org>

	* docs/tmpl/section-expression.sgml: Update tmpls

	* tests/sparql/check-sparql: Handle file: URIs properly for
	reading rdf results

	* src/rasqal_literal.c:
	(rasqal_literal_set_typed_value): Document l->string ownership for
	decimal.

	* src/rasqal_decimal.c:
	(rasqal_xsd_decimal_set_string): Strip leading '+' from decimal
	string for MPFR and GMP

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate_datatype): Free literal after getting
	a reference to dt_uri

	* src/rasqal_expr_evaluate.c:
	(rasqal_expression_evaluate): Fix RASQAL_EXPR_DATATYPE return
	value.

	* src/rasqal_format_sparql_xml.c, src/rasqal_general.c,
	src/rasqal_query.c, src/rasqal_redland.c: Replace strcpy with
	memcpy since strcpy() special features are not needed

	* src/rasqal_expr_evaluate.c, src/rasqal_expr_strings.c,
	src/rasqal_format_rdf.c, src/rasqal_literal.c: Replace
	rasqal_literal_as_string + strlen() on result with
	rasqal_literal_as_counted_string() call

	* src/rasqal_internal.h, src/rasqal_literal.c: Ensure true/false
	literal strings have lengths set consistently

	* src/rasqal.h.in, src/rasqal_literal.c:
	(rasqal_literal_as_counted_string): Added to get the literal
	string with length.

	* src/rasqal_expr_datetimes.c: autodocs

	* src/rasqal_expr_datetimes.c:
	(rasqal_expression_evaluate_datetime_timezone): No need to use len

	* src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_timezone_as_counted_string): Remove
	sprintf for small integers.

	* src/rasqal_expr_datetimes.c, src/rasqal_expr_evaluate.c,
	src/rasqal_internal.h:
	(rasqal_expression_evaluate_datetime_timezone): Added to execute
	TIMEZONE()

	* src/rasqal.h.in, src/rasqal_datetime.c:
	(rasqal_xsd_datetime_get_timezone_as_counted_string): Added to
	turn a timezone into a duration string
