2005-12-21  Dave Beckett <dave@dajobe.org>

	* docs/librasqal.3, utils/roqet.1, fix-groff-xhtml,
	rasqal-src-config.in, RELEASE.html, TODO.html, configure.ac,
	NEWS.html, README.html, LICENSE.html, Makefile.am, INSTALL.html:
	updated urls

2005-11-20  Dave Beckett <dave@dajobe.org>

	* src/Makefile.am, src/rasqal_internal.h: Disable skiplist code
	for now (don't ship it)

2005-09-22  Dave Beckett <dave@dajobe.org>

	* tests/sparql/SyntaxFull/Makefile.am: Add new tests, 2 fail

	* tests/sparql/SyntaxFull/Makefile.am: Added new tests, 2 fail

	* tests/sparql/SyntaxFull/syntax-keywords-01.rq,
	tests/sparql/SyntaxFull/syntax-keywords-02.rq,
	tests/sparql/SyntaxFull/syntax-keywords-03.rq,
	tests/sparql/SyntaxFull/syntax-qname-01.rq,
	tests/sparql/SyntaxFull/syntax-qname-02.rq,
	tests/sparql/SyntaxFull/syntax-qname-03.rq,
	tests/sparql/SyntaxFull/syntax-qname-04.rq,
	tests/sparql/SyntaxFull/syntax-qname-05.rq,
	tests/sparql/SyntaxFull/syntax-qname-06.rq,
	tests/sparql/SyntaxFull/syntax-struct-11.rq,
	tests/sparql/SyntaxFull/syntax-struct-12.rq,
	tests/sparql/ExprEquals/Makefile.am,
	tests/sparql/ExprEquals/query-eq-graph-1.rq,
	tests/sparql/ExprEquals/query-eq-graph-2.rq,
	tests/sparql/ExprEquals/query-eq-graph-3.rq,
	tests/sparql/ExprEquals/query-eq-graph-4.rq,
	tests/sparql/ExprEquals/query-eq-graph-5.rq,
	tests/sparql/ExprEquals/query-eq2-graph-1.rq,
	tests/sparql/ExprEquals/result-eq-graph-1.ttl,
	tests/sparql/ExprEquals/result-eq-graph-2.ttl,
	tests/sparql/ExprEquals/result-eq-graph-3.ttl,
	tests/sparql/ExprEquals/result-eq-graph-4.ttl,
	tests/sparql/ExprEquals/result-eq-graph-5.ttl: Added new tests

	* tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am: Added the 9
	EXPECTED_SPARQL_PARSER_FAILURES

	* tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am: Added 3
	EXPECTED_SPARQL_PARSER_FAILURES: syn-05.rq syn-06.rq syn-07.rq

	* tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am: ADded 3
	EXPECTED_SPARQL_CORRECT_FAILURES: syn-05.rq syn-06.rq syn-07.rq

	* tests/sparql/check-sparql: If returning no results and expect
	fail, return 1

	* tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am: Added 9
	EXPECTED_SPARQL_CORRECT_FAILURES

	* tests/sparql/ExprEquals/Makefile.am: Failures +1: "Equality - 2
	var - test equals -- graph", total 3

	* tests/sparql/check-sparql: report if expected failure happens OK
	early on

	* tests/sparql/ExprEquals/manifest.n3: Update to DAWG CVS

2005-09-12  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* src/sparql_parser.y (ConstructTriplesList): renamed from
	TriplesList and allow an empty list.

	* src/sparql_parser.y (GraphGraphPattern): Handle return of NULL
	graph pattern

	* src/sparql_lexer.l ({QUOTEDURI}\(?): Pass the matched string
	through rasqal_escaped_name_to_utf8_string to expand \u and \Us
	and fail on errors, then make a new URI.
	(rasqal_sparql_name_check): Add debug messages.
	(sparql_copy_qname, sparql_copy_string_token): Report name errors
	in prefix or local name part of a qname.

	* src/rasqal_general.c (rasqal_escaped_name_to_utf8_string):
	Calculate dest size from result pointers, not original string
	source.

	* configure.ac, tests/sparql/Makefile.am,
	tests/sparql/SyntaxDev/.cvsignore,
	tests/sparql/SyntaxDev/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/.cvsignore,
	tests/sparql/SyntaxDev/Syntax-SPARQL/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL/manifest.ttl,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-basic-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-bnodes-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-expr-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-expr-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-expr-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-expr-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-expr-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-forms-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-forms-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-limit-offset-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-limit-offset-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-limit-offset-09.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lists-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lists-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lists-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lists-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lists-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-09.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-10.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-11.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-12.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-13.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-lit-14.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-order-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-pat-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-pat-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-pat-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-pat-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-qname-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-09.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-10.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-11.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-struct-12.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-union-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL/syntax-union-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/.cvsignore,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/manifest.ttl,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-bnode-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-bnode-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-bnode-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-dataset-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-dataset-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-dataset-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-dataset-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-esc-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-esc-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-esc-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-esc-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-ask-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-ask-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-construct06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-describe01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-describe02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-select-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-form-select-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-function-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-function-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-function-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-function-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-general-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-general-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-general-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-graph-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-keywords-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-keywords-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-keywords-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-lists-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-lists-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-lists-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-lists-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL2/syntax-lists-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/.cvsignore,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/bnode-dot.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/bnodes-missing-pvalues-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/bnodes-missing-pvalues-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/empty-optional-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/empty-optional-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/filter-missing-parens.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/lone-list.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/lone-node.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/manifest.ttl,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-01.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-02.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-03.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-04.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-05.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-06.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-07.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-08.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-09.rq,
	tests/sparql/SyntaxDev/Syntax-SPARQL3/syn-bad-10.rq: Added
	unapproved sparql syntax tests from DAWG SyntaxDev area

	* tests/sparql/check-sparql: Ad -n flag if no data is present

	* tests/sparql/check-sparql: Handle expect fail tests of type
	mfx:TestBadSyntax Check return code of roqet for failing.

	* tests/sparql/check-sparql: Handle mfx:SyntaxType rdf:typed
	actions and in that case pick up the action node as the query to
	use (no data, no result) Only evaluate queries that have files

2005-09-09  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Reached 100% function and structure coverage according to
	gtkdoc-mkdb: 100% symbol docs coverage (190 symbols documented, 0
	symbols incomplete, 0 not documented)

	* src/rasqal.h: autodocs

	* docs/rasqal-sections.txt: No rasqal_variable_s

	* src/rasqal_query.c (rasqal_query_graph_pattern_visit): autodocs

	* docs/tmpl/section-graph_pattern.sgml, docs/tmpl/section-query.sgml:
	add new fns

	* docs/tmpl/section-literal.sgml: remove dup text

	* src/rasqal_graph_pattern.c: autodocs

	* docs/rasqal-sections.txt: add new fns

	* src/Makefile.am, utils/Makefile.am: Include
	@RASQAL_INTERNAL_LIBS@ in linking flags to ensure internal raptor
	is used.

2005-09-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* src/sparql_lexer.l: "true" and "false" are now case independent

2005-08-31  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* configure.ac: Added --with-redland-config

	* src/rasqal_internal.h: Updated
	rasqal_engine_merge_graph_patterns and
	rasqal_engine_merge_triples prototypes to return an int status.

	* src/rasqal_engine.c:
	(rasqal_engine_merge_graph_patterns, rasqal_engine_merge_triples):
	Visitor function now returns a status.

	* src/rasqal_query.c: Moved rasqal_graph_pattern_visit to
	rasqal_graph_pattern.c

	* src/rasqal.h: Added rasqal_graph_pattern_visit_fn.  Added
	prototype for rasqal_graph_pattern_visit

	* src/rasqal_graph_pattern.c (rasqal_graph_pattern_visit:): Moved
	from rasqal_query.c

	* docs/tmpl/section-expression.sgml,
	docs/tmpl/section-query_results.sgml: docs

	* src/sparql_lexer.l, src/sparql_parser.y: Remove NULL_LITERAL -
	not in SPARQL

2005-08-23  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* docs/tmpl/section-triples_source.sgml: section title

	* docs/tmpl/section-triples_source.sgml, src/rasqal_expr.c:
	autodocs

	* docs/rasqal-sections.txt: Added
	rasqal_new_expression_from_expression

	* src/rasqal_expr.c: Added usage count to rasqal_expression
	constructors
	(rasqal_new_expression_from_expression): Added copy constructor.

	* src/rasqal_engine.c (rasqal_engine_join_graph_patterns): Move
	constraints taking care to copy then free correctly.

	* src/rasqal.h: Added usage count to rasqal_expression.  Added
	rasqal_new_expression_from_expression prototype.

2005-08-19  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* src/rasqal.h, src/rasqal_expr.c: autodocs fixes - use %RASQAL_

	* docs/tmpl/section-graph_pattern.sgml: use %RASQAL

2005-08-18  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-query.sgml:
	document literal, query, query_results types

	* docs/rasqal-sections.txt: Add rasqal_query and
	rasqal_query_results

	* docs/rasqal-overrides.txt: override rasqal_query and
	rasqal_query_results

	* docs/Makefile.am: Make gtkdoc-mkdb ignore the C files

	* src/rasqal_query.c (rasqal_graph_pattern_visit): Make this
	recursive.

	* tests/sparql/ExprBuiltins/Makefile.am: datatype-1 works

	* src/rasqal_expr.c (rasqal_expression_evaluate):
	For datatype, if is a typed literal it
	has a datatype field then return that, otherwise fail.

	* tests/sparql/ExprBuiltins/Makefile.am: str-1 passes

2005-08-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* docs/tmpl/section-unused.sgml, docs/tmpl/section-variable.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-triple.sgml, docs/tmpl/section-prefix.sgml,
	docs/tmpl/section-query.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-expression.sgml,
	docs/tmpl/section-general.sgml, docs/rasqal-sections.txt: autodocs
	- sections intros

	* src/rasqal.h, src/rasqal_expr.c, src/rasqal_general.c,
	src/rasqal_engine.c: autodocs

	* src/rasqal.h: Remove unused rasqal_new_variable_expression
	prototype.  Deprecate rasqal_expression_foreach for
	rasqal_expression_visit Add rasqal_expression_visit prototype and
	rasqal_expression_visit_fn.

	* docs/rasqal-sections.txt: Add rasqal_expression_visit_fn
	rasqal_expression_visit

2005-08-11  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* autogen.sh: programs spello

	* autogen.sh: Add gtkdocize and swig (for bindings) only if seen
	in top-level configure.ac Add swig-specific version check,
	different from gnu style

	* autogen.sh: update autogen.sh again

	* autogen.sh: Rewrite with functions, generalize to any redland
	package.  Add docs.

	* src/rasqal_engine.c: restore undef RASQAL_DEBUG

	* tests/sparql/part1/dawg-query-003.rq: Declare rdf:

	* src/sparql_parser.y (rasqal_sparql_query_engine_init): Do not
	declare any namespaces by default.

	* tests/sparql/syntax/Makefile.am: Added namespaces.rq

	* tests/sparql/syntax/namespaces.rq: namespaces.rq

	* rasqal.spec.in: - Update Source: - Use %makeinstall

2005-08-10  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* src/rasqal_engine.c (rasqal_engine_merge_graph_patterns):
	Renamed from rasqal_engine_make_basic_graph_pattern and added some
	docucomments.  It no longer handles UNIONS - they are never
	merged, the code was just handling them in order to descend down
	the tree, now done by the visitor calling this function. Remove
	calling lower sub-GPs.
	(rasqal_engine_merge_triples): Renamed from
	rasqal_engine_merge_basic_graph_patterns and added some
	docucomments.

	* src/rasqal_internal.h: Added rasqal_graph_pattern_visit_fn
	typdef.  Added prototype for rasqal_query_graph_pattern_visit

	* src/rasqal_query.c (rasqal_query_prepare): Rewrite to use
	rasqal_query_graph_pattern_visit to do graph pattern transforms.
	(rasqal_graph_pattern_visit): Added, called by:
	(rasqal_query_graph_pattern_visit): Added to walk all graph
	patterns in a query.

	* src/rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): Do
	not lose sub-grpah pattern UNION type.

	* src/sparql_parser.y (PrimaryExpression): Explain rq23 weirdness

	* tests/sparql/survey/query-survey-13.rq,
	tests/sparql/survey/query-survey-11.rq,
	tests/sparql/survey/query-survey-10.rq: FILTER() syntax

	* rasqal.spec.in: Use %configure

	* src/sparql_lexer.l: Remove '%' as a token.
	(sparql_token_print): Remove '%'

	* src/sparql_parser.y: Remove '%' as a token.  Whitespace style
	fixes near rule definitions.

	* src/sparql_parser.y: Make FILTER use Constraint for multiple
	forms.
	(Constraint): Added.  Allow the BrackettedExpression, BuiltInCall
	or FunctionCall alternatives.
	(Expression): Added.  9ConditionalOrExpression): Make it recursive
	rather than just allow 0 or 1 &&s.
	(MultiplicativeExpression): Remove '%' operator, not in SPARQL.
	(BuiltInCall): Renamed from CallExpression and remove FunctionCall
	from it.
	(PrimaryExpression): use BuiltInCall and add FunctionCall from
	above.

	* tests/sparql/ValueTesting/Makefile.am: +3 more tests,
	extendedType-literal-ne fails.

	* tests/sparql/syntax/cast1.rq, tests/sparql/syntax/cast0.rq,
	tests/sparql/bound/bound1.rq: FILTER() syntax

	* tests/sparql/examples/ex11.2.3.8_0.rq,
	tests/sparql/examples/ex3.rq: Updates from DAWG for FILTER()

	* tests/sparql/simple/manifest.n3,
	tests/sparql/SyntaxFull/manifest.ttl,
	tests/sparql/sort/manifest.ttl, tests/sparql/examples/manifest.n3:
	Update to DAWG tests - some approved

	* tests/sparql/ValueTesting/extendedType-eq-pass-result.n3,
	tests/sparql/ValueTesting/extendedType-eq-pass.rq,
	tests/sparql/ValueTesting/extendedType-graph-result.n3,
	tests/sparql/ValueTesting/extendedType-graph.rq,
	tests/sparql/ValueTesting/extendedType-literal-eq-result.n3,
	tests/sparql/ValueTesting/extendedType-literal-eq.rq,
	tests/sparql/ValueTesting/extendedType-literal-ne-result.n3,
	tests/sparql/ValueTesting/extendedType-literal-ne.rq,
	tests/sparql/ValueTesting/extendedType-ne-fail-result.n3,
	tests/sparql/ValueTesting/extendedType-ne-fail.rq,
	tests/sparql/ValueTesting/manifest.n3: Update to DAWG tests

2005-08-04  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* src/rasqal_engine.c (rasqal_engine_join_graph_patterns): Renamed
	from rasqal_engine_join_basic_graph_patterns.  Warn if types are
	different.  Merge sub graph sequences.
	(rasqal_engine_make_basic_graph_pattern): Operate over unions
	recursively for any lower-level basic graph patterns.  Don't merge
	if all sub-graph patterns aren't of the same type.  Never merge
	union sequences of size>1

	* src/rasqal_internal.h: rasqal_engine_join_basic_graph_patterns
	now rasqal_engine_join_graph_patterns

2005-08-03  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* configure.ac: gtk-doc 1.3 is ok

2005-08-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* utils/Makefile.am: Add AM_CPPFLAGS and AM_CFLAGS back

2005-07-31  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Source re-organisation - librasqal code moved to new src/ dir.
	roqet moved to new utils/ dir.  Other manual pages to docs/.

2005-07-30  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_expr.c, rasqal.h: autodocs

	* docs/tmpl/section-variable.sgml, docs/tmpl/section-unused.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-triple.sgml, docs/tmpl/section-query.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-prefix.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml: Updated templates.

	* docs/tmpl/section-expression.sgml: short and long desc add
	rasqal_compare_flags not #defines

	* docs/tmpl/section-data.sgml: short and long desc

	* docs/rasqal-overrides.txt: override some things to hide
	internals.

	* docs/rasqal-sections.txt, docs/rasqal-docs.xml,
	rasqal_literal.c, rasqal_expr.c, rasqal_general.c, rasqal.h: more
	autodocs

	* rasqal_query.c, rasqal_general.c, rasqal_expr.c: more autodocs
	and fixes for gtk-doc style

	* rasqal_expr.c: autodocs for rasqal_data_graph

	* rasqal_query.c, rasqal_expr.c, rasqal_graph_pattern.c, rasqal.h:
	Source code arg fixes for gtk-doc

2005-07-29  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* docs/rasqal.types: empty types for gtk-doc

	* Makefile.am: Added DISTCHECK_CONFIGURE_FLAGS

	* rasqal.spec.in: Updated for gtk-doc locations

	* docs/tmpl/section-data.sgml, docs/tmpl/section-expression.sgml,
	docs/tmpl/section-general.sgml,
	docs/tmpl/section-graph_pattern.sgml,
	docs/tmpl/section-literal.sgml, docs/tmpl/section-prefix.sgml,
	docs/tmpl/section-query.sgml,
	docs/tmpl/section-query_results.sgml,
	docs/tmpl/section-triple.sgml, docs/tmpl/section-unused.sgml,
	docs/tmpl/section-variable.sgml, docs/rasqal-overrides.txt,
	autogen.sh, configure.ac, docs/.cvsignore, docs/Makefile.am,
	docs/api.sgml.in, docs/build-docs, docs/kernel-doc,
	docs/rasqal-docs.xml, docs/rasqal-sections.txt, rasqal.h,
	rasqal_engine.c, rasqal_expr.c, rasqal_general.c,
	rasqal_graph_pattern.c, rasqal_literal.c, rasqal_map.c,
	rasqal_query.c, rasqal_raptor.c, rasqal_skiplist.c: Switch to
	gtkdoc for autodocs.  Adjust source code comment style.

	* docs/version.xml.in: version xml

	* autogen.sh: run gtkdocize

	* configure.ac: require gtk-doc 1.4

2005-07-28  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.1: Update for newer result formats.

	* tests/sparql/syntax/manifest.n3,
	tests/sparql/syntax/Makefile.am: distinct-with-undef-var

	* tests/sparql/syntax/distinct-undef.rq,
	tests/sparql/syntax/result-distinct-undef.ttl: tests for distinct
	with an undef var

	* rasqal_query.c (rasqal_query_result_literal_sequence_compare):
	Two NULL literals means equality not a final comparison result, so
	keep searching.

	* tests/sparql/syntax/Makefile.am,
	tests/sparql/syntax/manifest.n3,
	tests/sparql/syntax/order-distinct.rq,
	tests/sparql/syntax/order.ttl,
	tests/sparql/syntax/result-order-distinct.ttl: Added order and
	distinct check

	* sparql_parser.y (PatternElement): Error recovery from NULL
	triples but do return a graph pattern of some sort.

	* sparql_parser.y (PatternElement): Error recovery - do not die
	when triples is NULL.

2005-07-27  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y, roqet.c, rdql_parser.y, rasqal_map.c: gcc4
	ignored return warning fixes: Discard fwrite() return values since
	fprintf/fputs() aren't checked.  Check fread() return values and
	throw a user error.

	* rasqal_skiplist.c, rasqal_map.c: autodocs

	* rasqal_query.c (rasqal_query_execute): For a stored sequence of
	result rows, use result_count as an offset so initialise to 0
	always
	(rasqal_query_results_next, rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): Adjust to use
	offset.

	* rasqal_query.c: Removed RASQAL_MAP define; it's the default now.

	* rasqal_skiplist.c (main): Update for new rasqal_new_skiplist API

	* rasqal_query.c: General: rasqal_tree renamed to rasqal_map and
	code moved to rasqal_map.c
	(rasqal_new_query_result_row, rasqal_free_query_result_row):
	Init/use usage counting.
	(rasqal_new_query_result_row_from_query_result_row): Added.
	(rasqal_query_result_row_compare): Take void* args, like a qsort()
	compare Do a distinct comparison on values before an ordering, if
	needed and discard duplicates there.
	(rasqal_map_print_query_result_row,
	rasqal_map_free_query_result_row): Added as rasqal_map helpers.
	(rasqal_query_execute): Make a new map, not tree, calling above
	helpers.

	* rasqal_map.c: autodocs

	* rasqal_map.c (rasqal_free_map_node): follow subtrees
	recursively.

	* rasqal_skiplist.c: rasqal_skiplist_s gains split key/value print
	handler methods
	(rasqal_new_skiplist): Split print_fn into print_key_fn and
	print_value_fn
	(rasqal_skiplist_node_print): Use new functions.

	* rasqal_internal.h: rasqal_query_result_row gains usage count
	Changed skiplist API to split key/value print handler methods
	Added rasqal_map class, methods.

	* Makefile.am: Added rasqal_map.c

	* rasqal_map.c: Rasqal simple Key:Value Map with duplicates
	allowed

	* rasqal_query.c (rasqal_query_execute): If added a duplicate,
	free the row.

	* rasqal_raptor.c (ordinal_as_uri): off by 1 in making ordinal URI.

2005-07-26  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c: sparql-results

	* roqet.c, rasqal_query.c:
	Changed results namespace from http://www.w3.org/2005/06/sparqlResults
	to http://www.w3.org/2005/sparql-results#

2005-07-21  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_results_write_xml_result2,
	rasqal_query_results_write_xml_result3): Use
	RASQAL_XSD_BOOLEAN_TRUE and RASQAL_XSD_BOOLEAN_FALSE for boolean
	result value.
	(rasqal_query_results_write_xml_result3): Add ordered and distinct
	attributes to <results> element.

	* rasqal_literal.c (rasqal_literal_string_to_native,
	rasqal_new_boolean_literal): Use RASQAL_XSD_BOOLEAN_TRUE and
	RASQAL_XSD_BOOLEAN_FALSE.

	* rasqal_internal.h: Added RASQAL_XSD_BOOLEAN_TRUE and
	RASQAL_XSD_BOOLEAN_FALSE, maybe could be pointers to a shared
	string but compilers can work it out.

2005-07-18  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_raptor.c (rasqal_raptor_new_triples_source):
	Use raptor guess parser.

	* configure.ac: Require raptor 1.4.8 for guess parser.

2005-07-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y: Update to rq23 CVS 1.423 2005/07/14 12:04:17

	* Makefile.am: rasqal_skiplist_test is in TESTS

	* rasqal_internal.h, rasqal_skiplist.c: Moved internal struct
	rasqal_skiplist_node into rasqal_skiplist.c again.

	* rasqal_internal.h, rasqal_skiplist.c: Moved rasqal_skiplist
	headers into rasqal_internal.h for now.

	* rasqal_skiplist.c: Skip list implememntation

	* Makefile.am: Added rasqal_skiplist.c and rasqal_skiplist_test

2005-07-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_results_write_xml_result3): Indent
	<boolean> by 2

	* roqet.c: Added new xml format with URI
	http://www.w3.org/2005/06/sparqlResults and made old one available
	via xml-v2

	* rasqal_query.c (rasqal_query_results_write): comments docs for
	URI http://www.w3.org/2005/06/sparqlResults.

	* rasqal_query.c (rasqal_query_results_write): Allow NULL URI for
	default format.  Add format V3 with URi
	http://www.w3.org/2005/06/sparqlResults.
	(rasqal_query_results_write_xml_result3): Added for latest format
	and new namespace.

	* sparql_lexer.l (// comment rule, # comment rule):
	Use better grab-till-newline form.

	* tests/sparql/SyntaxFull/manifest.ttl,
	tests/sparql/ValueTesting/extendedType-0.n3,
	tests/sparql/ValueTesting/extendedType-eq-pass.rq,
	tests/sparql/regex/regex-query-003.rq,
	tests/sparql/regex/regex-query-004.rq: Update tests from DAWG CVS

	* sparql_lexer.l (rasqal_sparql_name_check):
	Ignore 0 length names - checked in parser.
	Make all name problems into errors rather than warnings.

2005-07-12  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_lexer.l: Reference rq23
	Added sparql_name_check_flags enum for sparql name checking.
	Updated SPARQL name tokens to match latest rq23 - lots of comments.
	(// C++ comment rule): Use pattern to find end of line with multiple
	line endings.  Count line.
	(/* C comment block rule): Use returned lines to bump the current
	line number.
	(<ID>{VARNAME} rule): Check varnames.
	(<PREF>{NCNAME_PREFIX}":" rule): Check prefix.
	({BNAME} rule): Check ncname.
	(rasqal_sparql_name_check): Added to do XML Name 1.1 check and
	others.
	(sparql_copy_name): Add check_flag and use it with
	rasqal_sparql_name_check instead of raptor_xml_name_check.
	(sparql_copy_qname, sparql_copy_string_token): Use
	rasqal_sparql_name_check instead of raptor_xml_name_check.
	(sparql_skip_cpp_comment): Deleted.

	* rdql_lexer.l (// C++ comment rule): Use pattern to find end of
	line with multiple line endings.  Count line.
	(/* C comment block rule): Use returned lines to bump the current
	line number.
	(rdql_skip_cpp_comment): Deleted.

	* tests/sparql/SyntaxFull/manifest.ttl,
	tests/sparql/SyntaxFull/syntax-qname-08.rq,
	tests/sparql/SyntaxFull/syntax-qname-14.rq: Updates from DAWG
	tests

2005-07-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* configure.ac: time headers

	* configure.ac: Test for srandomdev for skiplists

2005-06-29  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_execute): Do the result making outside
	 #ifdef RASQAL_DEBUG ... #endif
	Oops!

	* rasqal_expr.c (main): Add flags arg to rasqal_expression_evaluate

	* tests/sparql/survey/Makefile.am: survey-10 works.  now 1 failure

	* rasqal_query.c: Added alternate results sorting using
	RASQAL_TREE define trigger to merge into a b-tree.
	(rasqal_query_result_row_update): Pass query compare_flags
	argument to rasqal_expression_evaluate.
	(rasqal_query_result_literal_sequence_compare): Added with main
	contant from rasqal_engine_query_results_compare.  Operates over
	arrays of values of the given size.
	(rasqal_query_results_row_compare): Call above for order
	conditions or row values to handle ORDER BY(with/without DISTINCT)
	or DISTINCT alone.
	(rasqal_query_results_compare): Added.
	(rasqal_new_tree_node, rasqal_free_tree_node, rasqal_new_tree,
	rasqal_free_tree, rasqal_tree_node_add_row, rasqal_tree_add_row,
	rasqal_tree_node_write_indent, rasqal_tree_node_print_internal,
	rasqal_tree_print, rasqal_tree_node_visit, rasqal_tree_visit,
	rasqal_tree_add_to_sequence): Added to implement tree of rows
	sorted on add with optional distinct results.
	(rasqal_query_execute): Add alternate tree results collation
	enabled by RASQAL_TREE implementing distinct.

	* tests/sparql/sort/Makefile.am: sort-6 now passes.  no sort
	failures

	* tests/sparql/ExprEquals/Makefile.am: "Equality 1-1" and
	"Equality 1-2" now pass.  down to 2 failures

	* rasqal_engine.c (rasqal_engine_check_constraint,
	rasqal_engine_expression_foreach_fold): Use flags argument
	in. rasqal_expression_evaluate taken from query compare_flags
	field.

	* sparql_parser.y (rasqal_sparql_query_engine_init): Set query
	compare_flags to RASQAL_COMPARE_XQUERY enabling XQuery comparison
	and promotions.

	* rasqal_expr.c (rasqal_expression_evaluate): Added flags
	argument, to pass down to rasqal_literal_compare.  Pass it down to
	internal uses of rasqal_expression_evaluate also.

	* rasqal_literal.c: rasqal_literal_type_labels reordered to match
	changes to rasqal_literal_type in rasqal.h
	(rasqal_literal_compare): Added RASQAL_COMPARE_XQUERY to use
	XQuery comparison and type promotions.  When the above flag is
	set, only promote numeric types and otherwise compare different
	types using the order in rasqal_literal_type enum.

	* rasqal_internal.h: rasqal_query gains compare_flags structure

	* rasqal.h: Reordered the types in rasqal_literal_type to make
	them useful for sparql type promotion.  Added define
	RASQAL_COMPARE_XQUERY Added flags argument to
	rasqal_expression_evaluate prototype.

	* roqet.c (roqet_write_indent): Handle any depth indenting.

2005-06-28  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c: Fixes for C++.

	* tests/sparql/check-sparql: Warn short form of cmd lines

2005-06-26  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_prepare): Call
	rasqal_engine_query_fold_expressions.
	(rasqal_engine_expression_foreach_fold): Added to use with
	rasqal_expression_foreach.
	(rasqal_engine_expression_fold): Added, to fold an expression tree
	until no changes are made.
	(rasqal_engine_graph_pattern_fold_expressions): Added, to fold
	expressions inside a graph pattern - in sub graph patterns and in
	constraint expression.
	(rasqal_engine_query_fold_expressions): Added, to fold expressions
	inside a graph - in graph patterns and order conditions.

	* rasqal_expr.c (rasqal_expression_clear): Added, to deallocate a
	static rasqal_expression.
	(rasqal_free_expression): Use above.
	(rasqal_expression_foreach): Do current node explicitly first,
	before op check is done so that the user function could change the
	op potentially.  Handle op LITERAL and op FUNCTION correctly.
	(rasqal_expression_is_constant): Added to check if the expression
	tree is a constant expression.
	(rasqal_expression_convert_to_literal): Convert an expression tree
	into a literal in-situ.

	* rasqal_literal.c (rasqal_literal_is_constant): Added returning
	non-0 if literal is a constant i.e. not a variable.

	* rasqal_internal.h: Added prototypes for
	rasqal_engine_expression_fold,
	rasqal_engine_graph_pattern_fold_expressions,
	rasqal_engine_query_fold_expressions, rasqal_literal_is_constant,
	rasqal_expression_is_constant, rasqal_expression_clear and
	rasqal_expression_convert_to_literal.

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-isLiteral works.  3 fail now.

	* tests/sparql/examples/ex11_0.n3,
	tests/sparql/examples/ex11.2.3.5_0.n3,
	tests/sparql/examples/ex11.2.3.2_0.n3,
	tests/sparql/examples/ex11.2.3.1_1.n3: Date fixes from DAWG CVS

	* tests/sparql/examples/ex11_1.rq,
	tests/sparql/examples/ex11_0.rq,
	tests/sparql/examples/ex11.2.3.7_0.rq,
	tests/sparql/examples/ex11.2.3.2_1.rq,
	tests/sparql/examples/ex11.2.3.2_0.rq,
	tests/sparql/examples/ex11.2.3.1_1.rq,
	tests/sparql/examples/ex11.2.3.1_0.rq: Update for FILTER()

	* tests/sparql/examples/Makefile.am:
	Correct test failures, count remains same

2005-06-25  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/survey/Makefile.am: survey-13 now passes.  now 2
	failures

	* rasqal_query.c (rasqal_query_results_write_xml_20041221,
	rasqal_query_results_write_xml_result2): Use string_len rather
	than strlen().

	* rasqal_internal.h: Added prototype for rasqal_literal_ebv.
	Added constants rasqal_xsd_decimal_uri, rasqal_xsd_datetime_uri
	and rasqal_xsd_string_uri.

	* rasqal_literal.c (rasqal_new_integer_literal,
	rasqal_new_double_literal, rasqal_new_pattern_literal,
	rasqal_new_string_literal, rasqal_new_simple_literal,
	rasqal_new_boolean_literal): Initialise the string_len field.
	(rasqal_literal_string_to_native): Initialise string_len field
	when turning into a boolean.
	(rasqal_literal_expand_qname): Use string_len field to initialise
	raptor_qname_string_to_uri.
	(rasqal_literal_as_node): When making a new typed literal,
	initialise string_len field.
	(rasqal_literal_ebv): Added, to return the Effective Boolean
	Value (EBV) of a literal.

	* rasqal.h: rasqal_literal gains string_len field.

	* sparql_parser.y (sparql_is_builtin_xsd_datatype): Added to check
	for the types that sparql supports.
	(FunctionCall): Use sparql_is_builtin_xsd_datatype to distinguish
	a cast from a function - name is the datatype URI, has 1 arg.

	* rasqal_general.c: Added constants rasqal_xsd_decimal_uri,
	rasqal_xsd_datetime_uri and rasqal_xsd_string_uri constants.
	(rasqal_uri_init, rasqal_uri_finish): Init and free
	rasqal_xsd_decimal_uri, rasqal_xsd_datetime_uri and
	rasqal_xsd_string_uri.

2005-06-24  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/SyntaxFull/syntax-qname-07.rq,
	tests/sparql/SyntaxFull/syntax-qname-08.rq,
	tests/sparql/ValueTesting/extendedType-0.n3,
	tests/sparql/regex/regex-query-001.rq,
	tests/sparql/regex/regex-query-002.rq,
	tests/sparql/regex/regex-query-003.rq,
	tests/sparql/regex/regex-query-004.rq,
	tests/sparql/Expr1/expr-1.rq, tests/sparql/Expr1/expr-2.rq,
	tests/sparql/Expr1/expr-3.rq, tests/sparql/Expr2/query-bev-1.rq,
	tests/sparql/Expr2/query-bev-3.rq,
	tests/sparql/Expr2/query-bev-4.rq,
	tests/sparql/Expr2/query-bev-5.rq,
	tests/sparql/Expr2/query-bev-6.rq,
	tests/sparql/ExprBuiltins/q-datatype-1.rq,
	tests/sparql/ExprBuiltins/q-str-1.rq,
	tests/sparql/ExprBuiltins/q-str-2.rq,
	tests/sparql/ExprBuiltins/q-str-3.rq,
	tests/sparql/ExprBuiltins/q-str-4.rq,
	tests/sparql/ExprEquals/query-eq-1.rq,
	tests/sparql/ExprEquals/query-eq-2.rq,
	tests/sparql/ExprEquals/query-eq-3.rq,
	tests/sparql/ExprEquals/query-eq-4.rq,
	tests/sparql/ExprEquals/query-eq-5.rq,
	tests/sparql/ExprEquals/query-eq2-1.rq,
	tests/sparql/ExprEquals/query-eq2-2.rq,
	tests/sparql/SyntaxFull/manifest.ttl,
	tests/sparql/SyntaxFull/syntax-expr-01.rq,
	tests/sparql/SyntaxFull/syntax-expr-05.rq,
	tests/sparql/SyntaxFull/syntax-expr-06.rq: Updates from DAWG CVS

	* rasqal_query.c: Moved rasqal_query_result_row to
	rasqal-internal.h
	(rasqal_new_query_result_row): Handle no order_conditions_sequence
	present.  Set NULL literal values when they appear, as from
	OPTIONAL.
	(rasqal_query_results_update): Added, based on core of
	rasqal_query_results_next to get next result from query engine,
	including offsets.
	(rasqal_query_execute): Use rasqal_query_results_update when not
	sorting and make a query_results->row
	(rasqal_free_query_results): Free any row field used.
	(rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): Return row
	values, using query_results row field for stream results.

	* rasqal_raptor.c (rasqal_raptor_bind_match): Use
	rasqal_new_literal_from_literal when binding literal values, do
	not turn them into nodes this early.

	* tests/sparql/sort/Makefile.am: sort-4 sort-7 pass now only fail
	sort-6

	* rasqal_expr.c (rasqal_expression_evaluate): For case
	RASQAL_EXPR_LT, RASQAL_EXPR_GT, RASQAL_EXPR_LE, RASQAL_EXPR_GE -
	invert the test for the result of rasqal_literal_compare test as
	it was totally backwards for ints and doubles.

	* rasqal_literal.c (rasqal_literal_compare): Return correct <0, 0,
	>0 for integers and doubles.  It was formerly negative the right
	result.

	* rasqal_internal.h: Added struct rasqal_query_result_row internal
	for now.  rasqal_query_results gains field row for use as the
	current result row when streaming results.

	* tests/sparql/check-sparql: tidy messages

	* rasqal_query.c (rasqal_new_query_result_row): Just do
	allocations here, and use rasqal_query_result_row_update to update
	the contents from the current query engine result.
	(rasqal_query_result_row_update): Added, updating the given row
	with the current query engine result.

2005-06-23  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_literal.c (rasqal_literal_print):
	Fix formats for decimal, datetime

	* rasqal_query.c (rasqal_query_results_write_xml_20041221,
	rasqal_query_results_write_xml_result2,
	rasqal_query_results_get_triple): Handle RASQAL_LITERAL_FLOAT (as
	a double), RASQAL_LITERAL_DECIMAL (as a string) and
	RASQAL_LITERAL_DATETIME (as a string).

	* rasqal_literal.c (rasqal_new_double_literal): Added, based on
	rasqal_new_floating_literal.
	(rasqal_new_floating_literal): Now a wrapper around the above.
	(rasqal_literal_string_to_native): Promote xsd:float too.
	(rasqal_free_literal, rasqal_literal_print,
	rasqal_literal_as_boolean, rasqal_literal_as_integer,
	rasqal_literal_as_floating, rasqal_literal_as_string,
	rasqal_literal_compare, rasqal_literal_equals,
	rasqal_literal_as_node): Handle RASQAL_LITERAL_FLOAT (as a
	double), RASQAL_LITERAL_DECIMAL (as a string) and
	RASQAL_LITERAL_DATETIME (as a string).

	* rasqal_redland.c: Use RASQAL_LITERAL_DOUBLE instead of
	RASQAL_LITERAL_FLOATING

	* sparql_lexer.l, rdql_lexer.l, rasqal_expr.c: Replace
	rasqal_new_floating_literal with rasqal_new_double_literal

	* rasqal_general.c: Added rasqal_xsd_float_uri URI constant.
	(rasqal_uri_init, rasqal_uri_finish): Init/free it.

	* rasqal_internal.h: Added rasqal_xsd_float_uri.

	* rasqal.h: Added RASQAL_LITERAL_DOUBLE (formerly
	RASQAL_LITERAL_FLOATING), RASQAL_LITERAL_FLOAT,
	RASQAL_LITERAL_DECIMAL and RASQAL_LITERAL_DATETIME.  float uses
	the 'double floating' field.  decimal and datetime use the string
	field, for now.  Deprecated rasqal_new_floating_literal Added
	prototype for rasqal_new_double_literal

	* roqet.c: Added a -e/--exec option to execute a query string
	directly.  Usage updated to show the two forms.

2005-06-22  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Makefile.am: Added ChangeLog.1 ChangeLog.2

	* win32_rasqal_config.h: win32 fixes from John Barstow.

2005-06-17  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Fixes for GCC 4.0 warnings:

	* sparql_lexer.l, rdql_lexer.l: Check for sscanf failure and
	return errors for hex, floating, \u and \U constants.

	* rasqal_literal.c (rasqal_literal_string_to_native): Add error
	handler and data args.  Use it if sscanf fails on converting a
	float string.
	(rasqal_new_string_literal): If rasqal_literal_string_to_native
	fails, tidy up and return NULL.
	(rasqal_literal_expand_qname): if rasqal_literal_string_to_native
	fails, tidy up and return 1.

	* rasqal_internal.h: Update rasqal_literal_string_to_native
	prototype to take an error handler and data.

	* rasqal_general.c (rasqal_escaped_name_to_utf8_string): Check for
	sscanf failure with \u and \U such as \uGHIJ which isn't hex.

	* rasqal.spec.in: License not Copyright header

2005-06-15  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/check-sparql: updated messages

	* tests/sparql/regex/Makefile.am: 1 failure

	* tests/sparql/ExprEquals/Makefile.am: 4 failures.  Add explicit
	count.

	* tests/sparql/ExprBuiltins/Makefile.am: 4 failures

	* tests/sparql/Expr2/Makefile.am: 6 failures.  Add explict count.

	* tests/sparql/Expr1/Makefile.am: 2 failures.  Add explict count.

	* tests/sparql/ExprBuiltins/Makefile.am: manifest.ttl

	* configure.ac: Add tests/sparql regex, Expr1, Expr2,
	ExprBuiltins, ExprEquals dirs

	* tests/sparql/Expr1/Makefile.am, tests/sparql/Expr1/data-1.ttl,
	tests/sparql/Expr1/expr-1-result.ttl,
	tests/sparql/Expr1/expr-1.rq,
	tests/sparql/Expr1/expr-2-result.ttl,
	tests/sparql/Expr1/expr-2.rq,
	tests/sparql/Expr1/expr-3-result.ttl,
	tests/sparql/Expr1/expr-3.rq, tests/sparql/Expr1/manifest.n3,
	tests/sparql/Expr2/Makefile.am, tests/sparql/Expr2/data-1.ttl,
	tests/sparql/Expr2/data-2.ttl, tests/sparql/Expr2/manifest.n3,
	tests/sparql/Expr2/query-bev-1.rq,
	tests/sparql/Expr2/query-bev-2.rq,
	tests/sparql/Expr2/query-bev-3.rq,
	tests/sparql/Expr2/query-bev-4.rq,
	tests/sparql/Expr2/query-bev-5.rq,
	tests/sparql/Expr2/query-bev-6.rq,
	tests/sparql/Expr2/result-bev-1.ttl,
	tests/sparql/Expr2/result-bev-2.ttl,
	tests/sparql/Expr2/result-bev-3.ttl,
	tests/sparql/Expr2/result-bev-4.ttl,
	tests/sparql/Expr2/result-bev-5.ttl,
	tests/sparql/Expr2/result-bev-6.ttl,
	tests/sparql/ExprBuiltins/Makefile.am,
	tests/sparql/ExprBuiltins/data-builtin-1.ttl,
	tests/sparql/ExprBuiltins/manifest.ttl,
	tests/sparql/ExprBuiltins/q-blank-1.rq,
	tests/sparql/ExprBuiltins/q-datatype-1.rq,
	tests/sparql/ExprBuiltins/q-str-1.rq,
	tests/sparql/ExprBuiltins/q-str-2.rq,
	tests/sparql/ExprBuiltins/q-str-3.rq,
	tests/sparql/ExprBuiltins/q-str-4.rq,
	tests/sparql/ExprBuiltins/q-uri-1.rq,
	tests/sparql/ExprBuiltins/result-blank-1.ttl,
	tests/sparql/ExprBuiltins/result-datatype-1.ttl,
	tests/sparql/ExprBuiltins/result-str-1.ttl,
	tests/sparql/ExprBuiltins/result-str-2.ttl,
	tests/sparql/ExprBuiltins/result-str-3.ttl,
	tests/sparql/ExprBuiltins/result-str-4.ttl,
	tests/sparql/ExprBuiltins/result-uri-1.ttl,
	tests/sparql/ExprEquals/Makefile.am,
	tests/sparql/ExprEquals/data-eq.ttl,
	tests/sparql/ExprEquals/manifest.n3,
	tests/sparql/ExprEquals/query-eq-1.rq,
	tests/sparql/ExprEquals/query-eq-2.rq,
	tests/sparql/ExprEquals/query-eq-3.rq,
	tests/sparql/ExprEquals/query-eq-4.rq,
	tests/sparql/ExprEquals/query-eq-5.rq,
	tests/sparql/ExprEquals/query-eq2-1.rq,
	tests/sparql/ExprEquals/query-eq2-2.rq,
	tests/sparql/ExprEquals/result-eq-1.ttl,
	tests/sparql/ExprEquals/result-eq-2.ttl,
	tests/sparql/ExprEquals/result-eq-3.ttl,
	tests/sparql/ExprEquals/result-eq-4.ttl,
	tests/sparql/ExprEquals/result-eq-5.ttl,
	tests/sparql/ExprEquals/result-eq2-1.ttl,
	tests/sparql/ExprEquals/result-eq2-2.ttl,
	tests/sparql/Makefile.am, tests/sparql/regex/Makefile.am,
	tests/sparql/regex/manifest.n3,
	tests/sparql/regex/regex-data-01.n3,
	tests/sparql/regex/regex-query-001.rq,
	tests/sparql/regex/regex-query-002.rq,
	tests/sparql/regex/regex-query-003.rq,
	tests/sparql/regex/regex-query-004.rq,
	tests/sparql/regex/regex-result-001.n3,
	tests/sparql/regex/regex-result-002.n3,
	tests/sparql/regex/regex-result-003.n3,
	tests/sparql/regex/regex-result-004.n3: Import Expr1 Expr2
	ExprBuiltins ExprEquals regex from DAWG tests

2005-06-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_select_NULL_last_compare): Added helper
	for removing duplicate select variables.
	(rasqal_engine_assign_variables): Look for duplicate select
	variables, warn about them and remove them by sorting and then
	deleting NULL variables.

	* tests/sparql/syntax/Makefile.am: Added select-dup.rq

	* tests/sparql/syntax/select-dup.rq: Test for duplicates in select

2005-06-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-isBlank now works

	* tests/sparql/survey/Makefile.am: survey-2 now works.

	* rasqal_query.c (rasqal_query_prepare): Call
	rasqal_engine_merge_basic_graph_patterns

	* rasqal_engine.c (rasqal_engine_join_basic_graph_patterns): Move
	the triples and constraints from a source to a destination graph
	pattern.
	(rasqal_engine_make_basic_graph_pattern): Use
	rasqal_engine_join_basic_graph_patterns to merge:
	1) a group of all basic graph patterns
	2) an optional group of all basic graph patterns
	3) a graph pattern with 1 sub-graph pattern
	Have to play some games with graph pattern operators.
	(rasqal_engine_merge_basic_graph_patterns): Use
	rasqal_engine_join_basic_graph_patterns to merge all basic graph
	patterns in a group into group of a single basic graph pattern of
	all the triples and constraints.

	* rasqal_internal.h: Added prototypes for
	rasqal_engine_join_basic_graph_patterns and
	rasqal_engine_merge_basic_graph_patterns

	* rasqal_query.c (rasqal_query_execute): For ordering results,
	directly use rasqal_engine_get_next_result to avoid doing limit
	and offset checks too early.  Start off from result_count 1.
	(rasqal_query_results_next): For ordered results, handle limit and
	offset with a loop and a check with
	rasqal_engine_check_limit_offset.  For streaming results, move
	check code to rasqal_engine_check_limit_offset and use it.
	(rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): For ordered
	results, use result_count-1 as an index.

	* rasqal_engine.c (rasqal_engine_check_limit_offset): Added to
	check the current query result is in the range specified by limit
	and offset

	* rasqal_internal.h: Added prototype for
	rasqal_engine_check_limit_offset

2005-06-09  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h, configure.ac: Bumped version to 0.9.11

	* Snapshotted rasqal_0_9_10 for 0.9.10 release

	* tests/sparql/ValueTesting/Makefile.am: extendedType-eq-pass
	passes

	* rasqal_query.c (rasqal_new_query_result_row): Added offset to
	store original sort order in case it is needed to order two
	identical literals.
	(rasqal_query_result_row_print): Print offset.
	(rasqal_engine_query_results_compare): Renamed from
	rasqal_engine_query_results_sort.  Lots more debug messages and
	checks.  Order NULL literals before other types.
	(rasqal_query_execute): Pass result offset into
	rasqal_new_query_result_row.

	* rasqal_literal.c (rasqal_literal_compare): Make comparison
	stable for URIs and datatyped strings - use strcmp on string
	values of URIs.

	* tests/sparql/sort/Makefile.am: sort-3 works

	* librasqal.3: Updates for 0.9.10

2005-06-08  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h: Undefine OPTIONAL as something in win32
	defines it.

	* sparql_parser.y, roqet.c, rasqal_query.c, rasqal_internal.h,
	rasqal_graph_pattern.c, rasqal_engine.c: Rename
	rasqal_graph_pattern_operator variables called 'operator' to 'op'
	for C++.  Other casts for C++

	* rasqal_internal.h: Added RASQAL_DEPRECATED_WARNING to generate a
	rasqal warning once only.

	* sparql_parser.y (OrderCondition): Use RASQAL_DEPRECATED_WARNING
	to explain ASC[] and DESC[] have been replaced.

	* sparql_parser.y (OrderCondition): Use RASQAL_EXPR_ORDER_COND_ASC
	or DESC not NONE which is deleted.

	* rasqal_query.c, rasqal_expr.c, rasqal.h: Deleted
	RASQAL_EXPR_ORDER_COND_NONE

	* rasqal_query.c (rasqal_engine_query_results_sort): If result is
	0 at the end, use the difference between the object pointers to
	create a stable sort when duplicates occur.

	* Makefile.am: Do not build rasqal_xsd_datatypes_test unless
	RASQAL_DATATYPES makefile conditional is enabled.

	* configure.ac: Add makefile conditional RASQAL_DATATYPES true
	when datatypes enabled.

	* rasqal.pc.in: Add PKGCONFIG_REQUIRES, PKGCONFIG_LIBS and
	PKGCONFIG_CFLAGS

	* configure.ac: Tidy specification of min versions
	Added pkgconfig specific additions: +PKGCONFIG_REQUIRES, PKGCONFIG_LIBS
	and PKGCONFIG_CFLAGS substituted into rasqal.pc.in
	Add PCRE cflags, libs to PKGCONFIG cflags/libs when used.
	Add libxml-2.0 to PKGCONFIG requires when used.

	* rasqal_query.c (rasqal_query_execute): When sorting, set
	finished flag if there are no results.
	(rasqal_query_results_next): When sorting, set finished flag if
	match or exceed number of results.
	(rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): When sorting, set
	finished flag if current row is beyond results.

2005-06-07  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/ValueTesting/extendedType-ne-fail.rq,
	tests/sparql/ValueTesting/extendedType-eq-pass-result.n3: Update
	to DAWG cvs

	* tests/sparql/ValueTesting/extendedType-eq-pass-result.n3: delete
	results from extendedType-eq-pass-result.n3

	* tests/sparql/ValueTesting/Makefile.am: 2 fail

	* configure.ac: Added tests/sparql/ValueTesting

	* tests/sparql/Makefile.am, tests/sparql/ValueTesting/.cvsignore,
	tests/sparql/ValueTesting/Makefile.am,
	tests/sparql/ValueTesting/extendedType-0.n3,
	tests/sparql/ValueTesting/extendedType-eq-pass-result.n3,
	tests/sparql/ValueTesting/extendedType-eq-pass.rq,
	tests/sparql/ValueTesting/extendedType-ne-fail-result.n3,
	tests/sparql/ValueTesting/extendedType-ne-fail.rq,
	tests/sparql/ValueTesting/manifest.n3: Added ValueTesting

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): Allow
	OPTIONAL to gather up inner basic graph patterns.  Print operator
	type when debugging.

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): More
	debug explanations of why merging/not merging.  Only work on a
	GROUP graph pattern.

	* rasqal_query.c (rasqal_new_query, rasqal_free_query): Init/free
	query->results_sequence.  Added internal rasqal_query_result_row
	(rasqal_new_query_result_row): Added to make a row out from a copy
	of all of the values of the current query result including the
	values of the ordering expressions for this row.
	(rasqal_free_query_result_row): Added to free a row.
	(rasqal_query_result_row_print): Added to print a row.
	(rasqal_engine_query_results_sort): Sequence helper function to do
	the query results ordering using rasqal_literal_compare.
	(rasqal_query_execute): If an ordering condition sequence is
	present, gather all the results, order them and store them in
	query->results_sequence.
	(rasqal_query_results_next, rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_value_by_name): Handle getting
	ordered result values from query->results_sequence.

	* rasqal_expr.c (rasqal_expression_evaluate): Return the
	expression argumetn for ordering conditions.

	* tests/sparql/sort/Makefile.am: Fail 4 now it does something

	* tests/sparql/check-sparql: Handle sorted results by not sorting,
	and unsorted results by sorting.  Clear?

	* rasqal_internal.h: rasqal_query structure gains internal
	results_sequence

	* rasqal_literal.c (rasqal_literal_as_node): Handle unbound
	variable values.

	* librasqal.3: rasqal_query_results_write: Note 2005-05-27 WD and
	add format uris

	* rasqal_query.c (rasqal_query_results_write): Note 2005-05-27 WD
	and add format uris

	* sparql_parser.y (PatternElementsList 2): Added debugging.

	* sparql_parser.y (PatternElementsList): Doesn't need mygp

2005-06-04  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_execute_init): Update the hack
	modification to report it with a debug dump after, and set top
	graph pattern operator to GROUP

	* sparql_parser.y (PatternElementsList): Set graph pattern
	operator to GROUP bydefault.

	* configure.ac: Simplify libxml check Add message/report for
	datatypes support

	* configure.ac: Check for libxml2, add xml2-config and xmlschema
	header files.
	Added --enable-datatypes method to enable linking libxml for
	datatypes.

	* rasqal_xsd_datatypes.c: Protect xml includes with
	HAVE_LIBXML_XMLSCHEMAS_H

2005-06-03  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Makefile.am: Remove XML2_CONFIG

2005-06-02  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): Change
	resulting graph parent pattern operator to BASIC if it was GROUP

	* tests/sparql/SyntaxFull/Makefile.am: 0 failures now

	* sparql_parser.y: Document the 12 shift/reduce conflicts now.
	(PropertyListOpt): Docs.
	(PropertyListTail): Use PropertyListOpt to allow ending on a ';'

	* sparql_parser.y (AskClause): ASK is done

	* tests/sparql/SyntaxFull/Makefile.am: Update lists

	* tests/sparql/SyntaxFull/syntax-forms-03.arq: Remove unused tests

	* tests/sparql/SyntaxFull/syntax-query-pat-01.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-02.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-03.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-04.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-05.rq: Delete old tests

	* tests/sparql/SyntaxFull/syntax-bnodes-08.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-09.rq: Remove unused tests

	* tests/sparql/SyntaxFull/Makefile.am: Added check-sparql-correct
	target

	* tests/sparql/SyntaxFull/syntax-bnodes-08.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-09.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-01.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-02.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-03.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-04.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-05.rq: Added
	syntax-bnodes-08.rq syntax-bnodes-09.rq syntax-query-pat-01.rq
	syntax-query-pat-02.rq syntax-query-pat-03.rq
	syntax-query-pat-04.rq syntax-query-pat-05.rq tests

	* tests/sparql/SyntaxFull/Makefile.am: 3 to 1 failure

	* rasqal_xsd_datatypes.c: Pull in libxml schema headers

	* sparql_parser.y (OrderClauseOpt, LimitClauseOpt,
	OffsetClauseOpt): Check that ORDER BY is not used with ASK, LIMIT
	or OFFSET rather than put in grammar now.
	(OrderCondition): Allow FunctionCall, Var and '(' Expression ')'
	after rq23 latest.

	* Makefile.am: Added XML2_CONFIG for datatypes testing

	* rasqal_xsd_datatypes.c (main): run rasqal_init/finish.

	* sparql_parser.y: Document 6 shift/reduce

	* tests/sparql/SyntaxFull/Makefile.am: from 4 to 3 failures

	* sparql_lexer.l: Ensure <> does not get grabbed as LT GT

	* tests/sparql/SyntaxFull/Makefile.am: from 8 to 4 failures

	* sparql_parser.y: Added PropertyListOpt as an outer triple in
	SPARQL can be just a subject [ :a :b ]
	(ObjectTail): Added to tidy up Object lists, remove duplicates.

	* rasqal_graph_pattern.c (rasqal_graph_pattern_print): No \n after (

	* sparql_parser.y (GraphPattern):
	Do not set graph pattern operator here.
	(PropertyListTail): Added after last WD grammer to aid in allowing
	a trailing ;
	(PatternElementsList): Set default operator to basic.
	(PropertyList): Use PropertyListTail
	(PropertyList): Added
	(VarOrBnodeOrURI): Moved '[' ']' to BlankNode.
	(BlankNode): Allow '[' ']' in all cases.

2005-06-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/SyntaxFull/Makefile.am: crashes stopped

	* sparql_parser.y (VarOrBnodeOrURI): Added, used for Predicate and
	allows explicit bnode or []

	* rasqal_graph_pattern.c (rasqal_graph_pattern_init): Add init of
	current_graph_pattern field when there are sub-graph patterns.
	Moved from rasqal_engine_execute_init.

	* rasqal_engine.c (rasqal_engine_execute_init): Move init of
	current_graph_pattern field into rasqal_graph_pattern_init

	* tests/sparql/examples/ex11.2.3.1_0-result.n3,
	tests/sparql/examples/ex11.2.3.2_0-result.n3,
	tests/sparql/examples/ex11.2.3.5_0-result.n3,
	tests/sparql/examples/ex11_0-result.n3,
	tests/sparql/examples/ex11_1-result.n3: Updated DAWG
	tests. Examples

	* tests/sparql/sort/query-sort-6.rq,
	tests/sparql/sort/query-sort-5.rq,
	tests/sparql/sort/query-sort-4.rq,
	tests/sparql/sort/query-sort-3.rq,
	tests/sparql/sort/query-sort-2.rq: Updated DAWG tests. using ASC()
	and DESC()

	* tests/sparql/sort/manifest.ttl: Updated DAWG tests. rdfs:comment

	* tests/sparql/SyntaxFull/Makefile.am: 10 failures

	* tests/sparql/SyntaxFull/Makefile.am: note latest failures

	* tests/sparql/SyntaxFull/Makefile.am: Added new tests

	* tests/sparql/SyntaxFull/manifest.ttl: Updated DAWG tests. Added
	tests syntax-bnodes-0[567] syntax-limit-offset-0[789] and
	syntax-order[06]

	* tests/sparql/SyntaxFull/syntax-limit-offset-07.rq,
	tests/sparql/SyntaxFull/syntax-limit-offset-08.rq,
	tests/sparql/SyntaxFull/syntax-limit-offset-09.rq: Updated DAWG
	tests.  Tests for limit and offset

	* tests/sparql/SyntaxFull/syntax-bnodes-03.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-04.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-05.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-06.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-07.rq: Updated DAWG tests.
	More bnodes forms

	* tests/sparql/SyntaxFull/syntax-order-02.rq,
	tests/sparql/SyntaxFull/syntax-order-03.rq,
	tests/sparql/SyntaxFull/syntax-order-04.rq,
	tests/sparql/SyntaxFull/syntax-order-05.rq,
	tests/sparql/SyntaxFull/syntax-order-06.rq: Updated DAWG
	tests. ASC/DESC using () not []s

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-RDFterm-equal now passes

	* sparql_parser.y (OrderCondition): Accept ASC() and DESC()
	deprecating ASC[] and DESC[]

	* sparql_lexer.l: ASC and DESC are just the tokens, no [

2005-05-31  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c (roqet_graph_pattern_walk): Print graph pattern operator

	* sparql_parser.y: Updates for graph pattern operators, not flags.
	(GraphPattern): Set group graph pattern operator.
	(PatternElementsList): Start off with an unknown grpah pattern
	operator, to catch missing cases.
	(PatternElement): Set basic graph pattern operator.
	(OptionalGraphPattern): Set optional graph pattern operator.
	(GraphGraphPattern): Set graph graph pattern operator.
	(UnionGraphPattern): Set union graph pattern operator.

	* rdql_parser.y (rasqal_rdql_query_engine_prepare): Make a root
	basic graph pattern.

	* rasqal_engine.c (rasqal_engine_get_next_result): Print the graph
	pattern operator and update to check for optional step by
	operator.
	(rasqal_engine_make_basic_graph_pattern): Fold in a set of
	sub-graph patterns that are all basic graph patterns.

	* rasqal_graph_pattern.c (rasqal_new_graph_pattern_from_sequence,
	rasqal_graph_pattern_add_triples): Final argument is now a graph
	pattern operator.
	(rasqal_graph_pattern_order): Sort optionals by operator.
	(rasqal_graph_pattern_init): Check for graph pattern operator.
	(rasqal_graph_pattern_get_operator,
	rasqal_graph_pattern_operator_as_string): Added.
	(rasqal_graph_pattern_print): Print the graph pattern operator.

	* rasqal_query.c (rasqal_graph_pattern_get_flags): Deprecated,
	always returns 0.

	* rasqal_internal.h: Added operator field to rasqal_graph_pattern.
	Change final argument of rasqal_new_graph_pattern_from_sequence
	and rasqal_graph_pattern_add_triples to operator.

	* rasqal.h: Added rasqal_graph_pattern_operator Deprecated
	rasqal_graph_pattern_get_flags Added prototypes for
	rasqal_graph_pattern_get_operator and
	rasqal_graph_pattern_operator_as_string

	* sparql_parser.y: Update grammar doc references to use SPARQL
	Query Language for RDF, 19 April 2005
	http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050419/

2005-05-24  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c: Removed deprecated flags -f and -o

	* rasqal_expr.c (rasqal_triple_set_flags,
	rasqal_triple_get_flags): Removed deprecated functions.

	* rasqal_engine.c (rasqal_new_triples_match): Removed
	rasqal_triples_source deprecated factory method new_triples_match.

	* rasqal_query.c:
	(rasqal_new_query, rasqal_free_query,
	rasqal_query_add_data_graph): Removed rasqal_query deprecated list
	sources.
	(rasqal_query_add_source, rasqal_query_get_source_sequence,
	rasqal_query_get_source, rasqal_query_add_constraint,
	rasqal_query_get_constraint_sequence,
	rasqal_query_get_constraint): Removed deprecated functions.

	* rasqal_internal.h: Removed rasqal_query deprecated list sources.

	* rasqal.h: Removed deprecated functions: rasqal_query_add_source,
	rasqal_query_get_source_sequence, rasqal_query_get_source,
	rasqal_query_add_constraint, rasqal_query_get_constraint_sequence,
	rasqal_query_get_constraint, rasqal_triple_set_flags and
	rasqal_triple_get_flags.  Removed rasqal_triples_source deprecated
	factory method new_triples_match

	* rasqal_engine.c (rasqal_set_triples_source_factory): Does not
	need RASQAL_API in the C

	* rasqal_engine.c (rasqal_reset_triple_meta): Removed code that
	will never be called, freeing triples_match field for the second
	time

	* rasqal_engine.c (rasqal_engine_expand_wildcards): Added,
	containing code from rasqal_engine_assign_variables to handle
	wildcard *.  Handle remaining query verbs.
	(rasqal_engine_assign_variables): Moved wildcard handling code
	above.
	(rasqal_engine_prepare): Call rasqal_engine_expand_wildcards.

2005-05-19  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h, configure.ac:
	Bumped version to 0.9.10

	* Snapshotted rasqal_0_9_9 for 0.9.9 release

	* rasqal_engine.c (rasqal_new_triples_match): Restore but
	deprecate rasqal_triples_source factory method new_triples_match
	for now.

	* rasqal.h: Restore rasqal_triples_source factory method
	new_triples_match for now.

	* win32/README.txt, win32/Makefile.am, win32/rasqal.vcproj:
	Import configuration from John Barstow

	* rasqal.h: RASQAL_API before public statics

	* win32_rasqal_config.h: Added #define YY_NO_UNISTD_H

2005-05-18  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y: Add print handler to all sequences, not
	conditional on debugging.

	* configure.ac: default memory-signing no

	* rasqal_general.c:
	(rasqal_free_memory, rasqal_alloc_memory, rasqal_calloc_memory):
	Added, for allocating and freeingmemory inside rasqal.

	* rasqal.h: Added prototypes for rasqal_free_memory,
	rasqal_alloc_memory and rasqal_calloc_memory

	* librasqal.3: Updates for 0.9.9

	* rasqal_query.c: thethe

	* configure.ac, roqet.c: Bugs to http://bugs.librdf.org/

	* sparql_lexer.l (NCCHAR): Add _ which the comment says but wasn't
	actually done.
	(NCCHARV): Adjust comment to match regex

2005-05-17  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_redland.c (rasqal_redland_init_triples_match): Renamed
	from rasqal_redland_new_triples_match.  Takes an existing
	rasqal_triples_match structure and returns non-0 on failure.

	* rasqal_raptor.c (rasqal_raptor_init_triples_match): Renamed from
	rasqal_raptor_new_triples_match.  Takes an existing
	rasqal_triples_match structure and returns non-0 on failure.

	* rasqal_engine.c (rasqal_new_triples_match): Call
	init_triples_match factory method with an already alloced
	rasqal_triples_match structure.  Free it here on error.

	* rasqal.h: rasqal_triples_source factory method new_triples_match
	changed to init_triples_match, taking an initialised rtm field,
	returning a status.

	* rasqal_literal.c, rasqal_general.c, rasqal_expr.c,
	rasqal_engine.c, rasqal.h: Casts for RASQAL_FREE.
	
	* rdql_lexer.l, sparql_lexer.l: Use RASQAL_MALLOC/CALLOC/FREE

	* configure.ac: Added --with-memory-signing rasqal signing memory
	debugging

	* rasqal_general.c (rasqal_sign_malloc, rasqal_sign_calloc,
	rasqal_sign_realloc, rasqal_sign_free): Added rasqal signing
	memory debugging trigged by RASQAL_MEMORY_SIGN.

	* rasqal_internal.h: Added rasqal signing memory debugging trigged
	by RASQAL_MEMORY_SIGN

	* rasqal_query_test.c (main): Use RASQAL_MALLOC/FREE

2005-05-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y (TriplesList):
	Do not lose triples sequence after sequence join.

	* rasqal_expr.c: docs

2005-05-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y, roqet.c, rasqal_query.c, rasqal_expr.c:
	Casts for C++

	* sparql_parser.y (DefaultGraphClause, NamedGraphClause):
	Free URI literal

	* sparql_parser.y: ItemList is now a raptor_sequence of rasqal_formula.
	(ItemList): Update to do that, copy over any underlying triples
	(Collection): Walk the list of formula to create the RDF collection
	triples.

2005-05-12  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/survey/Makefile.am: survey-11 works

	* rasqal_engine.c (rasqal_engine_assign_variables): adjust anon
	variables offsets to point to absolute index in full list of
	variables (rasqal_query field variables)

	* sparql_parser.y (Triples): When predicate list is empty, return
	subject formula.

	* sparql_parser.y (Triples): Protect when list is empty

	* sparql_parser.y (Triples):
	Copy along any triples from subject formula.

	* rasqal_query.c, rasqal_engine.c (rasqal_query_prepare,
	rasqal_engine_execute_init): Move
	rasqal_engine_make_basic_graph_pattern call to
	rasqal_query_prepare after factory has prepared (parsed)

	* roqet.c: Really make sparql the default

	* roqet.c (roqet_graph_pattern_walk): space

	* roqet.c (roqet_graph_pattern_walk): Add {}s around constraints

	* roqet.c (roqet_query_walk): Print bound variables.

	* roqet.1: Updates for 0.9.9
	Do not mention deprecated -f/--format and -o/--output.
	Merge -f and -o into in -r/--results and complete the list.
	Added V1 and V2 of sparql query results xml format.
	For -i, note sparql is default query language.

	* rasqal_general.c (rasqal_init):
	sparql is now the default query language.

	* roqet.c: Deprecated -f/--format and -o/--output both now in
	-r/--results.  Add V1 and V2 xml results formats.  Deleted invalid
	argument help for -r, see usage instead.

	* roqet.c (roqet_write_indent): Added.
	(roqet_graph_pattern_walk): Add lots of {...}s around blocks.  use
	#number for gps, triples.  Change to use roqet_write_indent.
	(roqet_query_walk): Take indent arg, use it with roqet_write_indent.
	Walk constructed triples.

	* rasqal_query.c (rasqal_query_get_construct_triples_sequence,
	rasqal_query_get_construct_triple): Added, to get access to construct
	triples via API.
	(rasqal_query_verb_as_string): Added to get a string for a verb.
	(rasqal_query_print): Use the above.

	* rasqal.h:
	Added prototypes for rasqal_query_get_construct_triples_sequence and
	rasqal_query_get_construct_triple

	* roqet.c: Make -c/--count work properly.
	Print count to stdout.
	Tidy result format wording.

	* rasqal_query.c (rasqal_query_results_get_count):
	Adjust the returned count by any offset.
	(rasqal_query_results_next): Implement limit and offset.
	Addresses Issue#0000005 - http://bugs.librdf.org/mantis/view.php?id=5

	* rasqal_query.c (rasqal_query_results_next): Adjust result_count
	here.

	* rasqal_engine.c (rasqal_engine_get_next_result): Move
	result_count to rasqal_query_results_next.

2005-05-08  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_results_write_xml_20041221): Check
	only variable bindings are asked for.
	(rasqal_query_results_write_xml_result2): Check only variable
	bindings or boolean are asked for.  Add boolean results format.

	* rasqal_query.c (rasqal_query_results_write_xml_result2):
	Write <binding> with name attribute.

	* rasqal_query.c (rasqal_query_results_write_xml_result2): Write
	out bnode strings right.

	* roqet.c: Default to unpublished version2 of the XML results format.

	* rasqal_query.c (rasqal_query_results_write_xml_20041221): Added,
	renamed from rasqal_query_results_write contents to emit the
	2004-12-21 XML format
	(rasqal_query_results_write_xml_result2): Added, to emit the
	unpublished version2 of the XML format.
	(rasqal_query_results_write): Call above functions depending on
	the format_uri.

2005-05-06  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* librasqal.3: Updated for 0.9.9

	* rasqal_query.c: typo

2005-05-05  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_get_wildcard): Added

	* rasqal.h: Added prototype for rasqal_query_get_wildcard

	* rasqal.h:
	Added prototypes for rasqal_query_get_order_conditions_sequence
	rasqal_query_get_order_condition

	* rasqal_query.c:
	(rasqal_query_get_order_conditions_sequence,
	rasqal_query_get_order_condition): Added to return query order
	conditions.

2005-05-04  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_lexer.l (VARNAME): Use NCCHARV to allow vars to start
	with _, [0-9] too.

	* tests/sparql/SyntaxFull/.cvsignore: ignore autostuff

2005-05-03  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* configure.ac: Added tests/sparql/sort dir

	* tests/sparql/Makefile.am: Added sort dir

	* tests/sparql/sort/result-sort-3.rdf,
	tests/sparql/sort/result-sort-4.rdf,
	tests/sparql/sort/result-sort-5.rdf,
	tests/sparql/sort/result-sort-6.rdf,
	tests/sparql/sort/result-sort-7.rdf,
	tests/sparql/sort/result-sort-8.rdf,
	tests/sparql/sort/query-sort-5.rq,
	tests/sparql/sort/query-sort-6.rq,
	tests/sparql/sort/result-sort-1.rdf,
	tests/sparql/sort/result-sort-2.rdf,
	tests/sparql/sort/query-sort-3.rq,
	tests/sparql/sort/query-sort-4.rq, tests/sparql/sort/manifest.ttl,
	tests/sparql/sort/query-sort-1.rq,
	tests/sparql/sort/query-sort-2.rq,
	tests/sparql/sort/data-sort-1.ttl,
	tests/sparql/sort/data-sort-3.ttl,
	tests/sparql/sort/data-sort-4.ttl,
	tests/sparql/sort/data-sort-6.ttl,
	tests/sparql/sort/data-sort-7.ttl,
	tests/sparql/sort/data-sort-8.ttl, tests/sparql/sort/.cvsignore,
	tests/sparql/sort/Makefile.am: added dawg sort tests

2005-05-02  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/survey/Makefile.am: More diagnosis of failures

	* rasqal_engine.c (rasqal_engine_assign_variables): Add anonymous
	variables to the variables/variables_declared_in arrays.
	(rasqal_query_graph_pattern_build_declared_in_variable): Added
	helper.
	(rasqal_query_graph_pattern_build_declared_in): Use above
	(rasqal_engine_do_optional_step): Check any outermost constraint
	expression if there is a match.
	(rasqal_engine_make_basic_graph_pattern): Use
	rasqal_graph_pattern_add_constraint when moving constraints.
	Rebuild constraints expression after moving constraints.

	* tests/sparql/survey/Makefile.am: 5 failures now

	* roqet.c (roqet_query_walk): Start from top graph pattern, not
	contents of it.

	* rasqal_query.c (rasqal_query_get_query_graph_pattern): Added to
	get the top graph pattern.

	* rasqal.h: Added prototype for rasqal_query_get_query_graph_pattern

	* rasqal_engine.c (rasqal_engine_assign_variables): Use the
	wildcard flag for SELECT * and CONSTRUCT *

	* rasqal_query.c: Added rasqal_query_verb_labels for debug printing.
	(rasqal_query_print): Print out the query verb.
	(rasqal_query_results_is_bindings, rasqal_query_results_is_boolean,
	rasqal_query_results_is_graph): Use the query verb to decide this.
	(rasqal_query_get_verb): Added.

	* sparql_parser.y (Report):
	Set the query verb to SELECT, CONSTRUCT, DESCRIBE or ASK.
	Do not use select_is_describe or ask.
	(SelectClause): Set wildcard flag with SELECT (DISTINCT) *
	(ConstructClause): Set the wildcard flag with CONSTRUCT *

	* rdql_parser.y (Query): Set query verb to SELECT.
	(SelectClause): Set wildcard flag with SELECT *

	* rasqal_internal.h:
	rasqal_query gains a verb and wildcard fields replacing select_all,
	select_is_describe, construct_all and ask

	* rasqal.h: Added rasqal_query_verb enum.
	Added prototype for rasqal_query_get_verb

	* sparql_parser.y (OptionalGraphPattern):
	Do not set optional flags on triples.

	* rasqal_graph_pattern.c (rasqal_graph_pattern_init):
	Record triple_meta is_exact field.

	* rasqal_expr.c: Removed rasqal_triple_flag_strings
	(rasqal_triple_print): Removed printing flags.
	(rasqal_triple_set_flags, rasqal_triple_get_flags): Note deprecated.

	* rasqal_engine.c (rasqal_graph_pattern_get_next_match):
	Use triple_meta file is_exact
	instead of rasqal_triple flag field
	(rasqal_engine_prepare): No longer init triple flags.

	* rasqal.h:
	Deprecated rasqal_triple flags field. - the value EXACT was only
	used in the execution engine and properly lives in
	rasqal_triple_meta. The value OPTIONAL was never used.
	Added is_exact file to rasqal_triple_meta.
	Deprecated rasqal_triple_set_flags and rasqal_triple_get_flags.

	* rasqal_engine.c (rasqal_engine_execute_init): Transform the
	query graph pattern for execution purposes - make basic graph
	patterns and make sure the top is always a sequence of graph
	patterns, for now.

	* sparql_parser.y (rasqal_sparql_query_engine_prepare): Remove the
	building of basic graph patterns from here. Just build the
	simplest graph pattern and let the execution engine change it if
	it needs to.

	* rdql_parser.y (rasqal_rdql_query_engine_prepare): Just build the
	simplest graph pattern here, let the executionengine change it if
	it needs to.

2005-05-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/SyntaxFull/Makefile.am: Updated for tests updates,
	removals for required top level graph pattern.

	* tests/sparql/SyntaxFull/syntax-bnodes-06.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-07.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-08.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-09.rq: Removed renamed
	syntax-bnodes tests

	* tests/sparql/SyntaxFull/syntax-query-pat-03.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-04.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-05.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-01.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-02.rq: Removed WHERE
	no {} tests

2005-04-27  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-str works with right data

	* tests/sparql/examples/Makefile.am:
	sparql-query-example-Testing-Values-str fails

	* sparql_parser.y (CallExpression): use nflags for pattern
	expression flags

	* tests/sparql/SyntaxFull/Makefile.am: fix dup terms

	* tests/sparql/SyntaxFull/Makefile.am: Added empty.nt

	* tests/sparql/SyntaxFull/empty.nt: empty.nt

	* tests/sparql/SyntaxFull/syntax-bnodes-04.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-03.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-02.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-01.rq,
	tests/sparql/SyntaxFull/manifest.ttl,
	tests/sparql/SyntaxFull/Makefile.am: Added syntax-bnodes-01,02,03
	and 04

	* tests/sparql/check-sparql: Handle no result in manifest

	* rasqal_engine.c
	(rasqal_engine_convert_blank_node_to_anonymous_variable): Helper added.
	(rasqal_engine_build_anonymous_variables): Added to turn bnodes
	inside graph pattern triples into variables.  ISSUE: should not do
	this with construct triples

	* rasqal_query.c (rasqal_new_query, rasqal_free_query): init/free
	anon_variables_sequence
	(rasqal_query_print): Print anonymous variables

	* rasqal_expr.c (rasqal_new_variable_typed): Added with type
	parameter.
	(rasqal_new_variable): Changed to use it.
	(rasqal_variable_print): Print variable type.

	* rasqal_internal.h: Added anon_variables_sequence and
	anon_variables_count

	* rasqal.h: typo

	* rasqal.h: Added rasqal_variable_type enum.  rasqal_variable
	gained field 'type' Added prototypes for
	rasqal_query_set_distinct, rasqal_query_set_limit,
	rasqal_query_set_offset and rasqal_new_variable_typed

	* rasqal_query.c (rasqal_query_set_distinct,
	rasqal_query_set_limit, rasqal_query_set_offset): Added.

	* sparql_parser.y, sparql_lexer.l:
	Removed unused tokens PATTERN_LITERAL and '&'.

	* tests/sparql/survey/Makefile.am: fix failure count

	* tests/sparql/syntax/cast1.rq: no == operator

	* tests/sparql/survey/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/part1/Makefile.am,
	tests/sparql/bound/Makefile.am: Remove check-sparql-works targets
	- check-sparql-correct does it better and using manifest

	* tests/sparql/examples/ex11.2.3.5_0-result.n3,
	tests/sparql/examples/ex11.2.3.5_0.n3,
	tests/sparql/examples/ex11.2.3.6_0-result.n3: Fix what I think are
	test query/data bugs

	* tests/sparql/examples/Makefile.am: Added ex11_1.rq
	ex11_1-result.n3 Note which query files have the failing query.

	* tests/sparql/examples/ex11_1-result.n3,
	tests/sparql/examples/ex11_1.rq: example ex11_1

	* tests/sparql/examples/manifest.n3,
	tests/sparql/examples/ex11.2.3.6_0-result.n3,
	tests/sparql/examples/ex11_0-result.n3: Sync tests to dawg

2005-04-26  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/rdql/testsuite/check-rdql, tests/sparql/check-sparql
	(toDebug): Handle no value.

	* tests/sparql/survey/Makefile.am: Added expected failures

	* sparql_lexer.l: Remove == token

	* sparql_lexer.l: Align name tokens with rq23 post WD 2005-04-19
	CVS 1.326

	* tests/sparql/bound/bound1.rq: new turtley syntax

	* tests/sparql/examples/Makefile.am: Annotate failures.

	* sparql_parser.y: less super-debuggy

	* sparql_parser.y:
	(CallExpression) Copy the string from rasqal_literal_as_string
	when making pattern literals or flags. Free the unused literal
	args.

	* rasqal_expr.c:
	(rasqal_expression_evaluate) For the RASQAL_EXPR_STR operation,
	copy the string from rasqal_literal_as_string.

	* sparql_parser.y (rasqal_sparql_query_engine_prepare): Restore
	hack to build an outer list of GPs if the folding made it all into
	one.

	* sparql_parser.y (rasqal_sparql_query_engine_prepare): Just call
	rasqal_engine_make_basic_graph_pattern on the query graph pattern.

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): More
	debug messages.  Always merge a GP with a GP of size 1 inside.
	Ignore any inner OPTIONAL GPs Merge sequences of triples if seen.

	* tests/sparql/SyntaxFull/Makefile.am: syntax-struct-01.rq no
	longer crashes

	* sparql_parser.y (OptionalGraphPattern): Don't die if no
	GraphPattern.

	* sparql_parser.y: Debug messages

	* rasqal_graph_pattern.c (rasqal_graph_pattern_print): Print graph
	pattern/triple sequence sizes.

	* rasqal_query.c (rasqal_new_query): Set initial offset to unset
	(<0)

	* rasqal_engine.c (rasqal_query_build_declared_in): warning
	wording

	* rasqal_engine.c (rasqal_query_build_declared_in): No \n in
	warning.

	* sparql_parser.y (UnionGraphPatternList): Added.
	(UnionGraphPattern): Make a graph pattern with the contained union
	graphs.  Renamed from OptionalGraphPatternList.

	* tests/sparql/SyntaxFull/Makefile.am: Fixed syntax-union-02.rq

	* sparql_parser.y (OptionalGraphPatternList): Require UNION
	between GPs

	* tests/sparql/SyntaxFull/Makefile.am: Typo

	* rasqal_expr.c (rasqal_expression_evaluate): Warn and then return
	false for function expressions - not implemented.

	* sparql_parser.y: Removed string operators STR_EQ STR_NE
	STR_MATCH STR_NMATCH
	(OptionalGraphPatternList): List cannnot be empty Lots of renaming
	of grammar terms to match rq23 / WD 19 April 2005
	(RelationalExpression): Renamed from ValueLogical and merged with
	former RelationalExpression.
	(CallExpression): Renamed from BuiltinExpression and reordered to
	match rq23

	* sparql_lexer.l: Removed regex pattern literals, PATTERN state,
	sparql_copy_regex_token, EQ/eq, NE/NE, =~, ~~, !~

	* sparql_parser.y (OptionalGraphPatternList): Added, to allow
	GraphPattern UNION GraphPattern*

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern):
	Verbose debugging if RASQAL_DEBUG > 1

2005-04-25  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/SyntaxFull/Makefile.am: Note failures so far

	* sparql_parser.y (BuiltinExpression): Move URIBrace work into
	FunctionCall
	(FunctionCall): Pick cast or function, I choose function

	* sparql_lexer.l: Widen QUOTEDURI and include <>

	* sparql_parser.y (WhereClauseOpt): Warn WHERE omitted.
	(BuiltinExpression): Call FunctionCall
	(PrimaryExpression): Add '(' Expression ')'
	(FunctionCall): Add URI name.
	(ArgList): Now a list of expressions

	* sparql_parser.y (OrderClauseOpt): Use OrderConditionList and
	store it in query field order_conditions_seequence.
	(OrderConditionList): Added, making a raptor_sequence of
	expressions
	(OrderCondition): Implemented ASC/DESC/none
	(OrderExpression): Added, using FunctionCall or Var
	(ItemList): Init $$->triples and set formula.
	(PrimaryExpression): Use FunctionCall
	(FunctionCall): Restored, now it's used twice.

	* rasqal.h: Added RASQAL_EXPR_ORDER_COND_ASC,
	RASQAL_EXPR_ORDER_COND_DESC and RASQAL_EXPR_ORDER_COND_NONE

	* rasqal_internal.h: Added order_conditions_sequence to query

	* rasqal_query.c (rasqal_query_print): Print order conditions.

	* rasqal_query.c (rasqal_new_query,rasqal_free_query): Init and
	free order_conditions_sequence

	* rasqal_expr.c (rasqal_free_expression,
	rasqal_expression_foreach, rasqal_expression_evaluate,
	rasqal_expression_print): Added cases for
	RASQAL_EXPR_ORDER_COND_ASC, RASQAL_EXPR_ORDER_COND_DESC and
	RASQAL_EXPR_ORDER_COND_NONE

	* sparql_lexer.l: ASC, DESC take following [ too
	(sparql_token_print): Added ASC, DESC

	* sparql_parser.y, sparql_lexer.l: Added ASC, DESC

	* sparql_lexer.l (PREFIX, NAME): Allow . after first char

	* sparql_lexer.l: Added '''strings''' (not in Turtle)

	* sparql_lexer.l: Added """string""" literals

	* tests/sparql/SyntaxFull/syntax-union-01.rq,
	tests/sparql/SyntaxFull/syntax-union-02.rq,
	tests/sparql/SyntaxFull/syntax-struct-09.rq,
	tests/sparql/SyntaxFull/syntax-struct-10.rq,
	tests/sparql/SyntaxFull/syntax-struct-07.rq,
	tests/sparql/SyntaxFull/syntax-struct-08.rq,
	tests/sparql/SyntaxFull/syntax-struct-06.rq,
	tests/sparql/SyntaxFull/syntax-struct-03.rq,
	tests/sparql/SyntaxFull/syntax-struct-04.rq,
	tests/sparql/SyntaxFull/syntax-struct-05.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-04.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-05.rq,
	tests/sparql/SyntaxFull/syntax-struct-01.rq,
	tests/sparql/SyntaxFull/syntax-struct-02.rq,
	tests/sparql/SyntaxFull/syntax-qname-14.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-01.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-02.rq,
	tests/sparql/SyntaxFull/syntax-query-pat-03.rq,
	tests/sparql/SyntaxFull/syntax-qname-12.rq,
	tests/sparql/SyntaxFull/syntax-qname-13.rq,
	tests/sparql/SyntaxFull/syntax-qname-11.rq,
	tests/sparql/SyntaxFull/syntax-qname-09.rq,
	tests/sparql/SyntaxFull/syntax-qname-10.rq,
	tests/sparql/SyntaxFull/syntax-qname-07.rq,
	tests/sparql/SyntaxFull/syntax-qname-08.rq,
	tests/sparql/SyntaxFull/syntax-pat-04.rq,
	tests/sparql/SyntaxFull/syntax-pat-03.rq,
	tests/sparql/SyntaxFull/syntax-pat-01.rq,
	tests/sparql/SyntaxFull/syntax-pat-02.rq,
	tests/sparql/SyntaxFull/syntax-order-04.rq,
	tests/sparql/SyntaxFull/syntax-order-05.rq,
	tests/sparql/SyntaxFull/syntax-order-01.rq,
	tests/sparql/SyntaxFull/syntax-order-02.rq,
	tests/sparql/SyntaxFull/syntax-order-03.rq,
	tests/sparql/SyntaxFull/syntax-lit-14.rq,
	tests/sparql/SyntaxFull/syntax-lit-13.rq,
	tests/sparql/SyntaxFull/syntax-lit-12.rq,
	tests/sparql/SyntaxFull/syntax-lit-11.rq,
	tests/sparql/SyntaxFull/syntax-lit-10.rq,
	tests/sparql/SyntaxFull/syntax-lit-09.rq,
	tests/sparql/SyntaxFull/syntax-lit-07.rq,
	tests/sparql/SyntaxFull/syntax-lit-08.rq,
	tests/sparql/SyntaxFull/syntax-lit-06.rq,
	tests/sparql/SyntaxFull/syntax-lit-05.rq,
	tests/sparql/SyntaxFull/syntax-lit-04.rq,
	tests/sparql/SyntaxFull/syntax-lit-02.rq,
	tests/sparql/SyntaxFull/syntax-lit-03.rq,
	tests/sparql/SyntaxFull/syntax-lists-03.rq,
	tests/sparql/SyntaxFull/syntax-lists-04.rq,
	tests/sparql/SyntaxFull/syntax-lists-05.rq,
	tests/sparql/SyntaxFull/syntax-lit-01.rq,
	tests/sparql/SyntaxFull/syntax-lists-01.rq,
	tests/sparql/SyntaxFull/syntax-lists-02.rq,
	tests/sparql/SyntaxFull/syntax-forms-01.rq,
	tests/sparql/SyntaxFull/syntax-forms-02.rq,
	tests/sparql/SyntaxFull/syntax-forms-03.arq,
	tests/sparql/SyntaxFull/syntax-expr-04.rq,
	tests/sparql/SyntaxFull/syntax-expr-05.rq,
	tests/sparql/SyntaxFull/syntax-expr-06.rq,
	tests/sparql/SyntaxFull/syntax-expr-01.rq,
	tests/sparql/SyntaxFull/syntax-expr-02.rq,
	tests/sparql/SyntaxFull/syntax-expr-03.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-07.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-08.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-09.rq,
	tests/sparql/SyntaxFull/syntax-basic-05.rq,
	tests/sparql/SyntaxFull/syntax-basic-06.rq,
	tests/sparql/SyntaxFull/syntax-bnodes-06.rq,
	tests/sparql/SyntaxFull/syntax-basic-01.rq,
	tests/sparql/SyntaxFull/syntax-basic-02.rq,
	tests/sparql/SyntaxFull/syntax-basic-03.rq,
	tests/sparql/SyntaxFull/syntax-basic-04.rq,
	tests/sparql/Makefile.am, tests/sparql/SyntaxFull/Makefile.am,
	tests/sparql/SyntaxFull/manifest.ttl, configure.ac: Added
	SyntaxFull tests from dawg

2005-04-20  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/survey/Makefile.am: data is survey-sample.ttl

2005-04-19  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_expr.c (rasqal_expression_evaluate): Handle unbound
	variable values in RASQAL_EXPR_DATATYPE, RASQAL_EXPR_ISURI,
	RASQAL_EXPR_ISBLANK, RASQAL_EXPR_ISLITERAL

	* sparql_lexer.l: Make keyword tokens case independent not just
	upper or lowercase.

	* tests/sparql/examples/Makefile.am: Update for new example files

	* sparql_parser.y: No conflicts

	* tests/sparql/examples/ex11.2.3.1_0.n3,
	tests/sparql/examples/ex11.2.3.1_0.rq,
	tests/sparql/examples/ex11.2.3.1_1.n3,
	tests/sparql/examples/ex11.2.3.1_1.rq,
	tests/sparql/examples/ex11.2.3.2_0.n3,
	tests/sparql/examples/ex11.2.3.2_0.rq,
	tests/sparql/examples/ex11.2.3.2_1.rq,
	tests/sparql/examples/ex11.2.3.3_0.n3,
	tests/sparql/examples/ex11.2.3.3_0.rq,
	tests/sparql/examples/ex11.2.3.4_0.n3,
	tests/sparql/examples/ex11.2.3.4_0.rq,
	tests/sparql/examples/ex11.2.3.5_0.n3,
	tests/sparql/examples/ex11.2.3.5_0.rq,
	tests/sparql/examples/ex11.2.3.6_0.n3,
	tests/sparql/examples/ex11.2.3.6_0.rq,
	tests/sparql/examples/ex11.2.3.7_0.n3,
	tests/sparql/examples/ex11.2.3.7_0.rq,
	tests/sparql/examples/ex11.2.3.8_0.n3,
	tests/sparql/examples/ex11.2.3.8_0.rq,
	tests/sparql/examples/ex11_0.n3, tests/sparql/examples/ex11_0.rq,
	tests/sparql/examples/ex3.rq,
	tests/sparql/examples/ex11.2.3.1_0-result.n3,
	tests/sparql/examples/ex11.2.3.1_1-result.n3,
	tests/sparql/examples/ex11.2.3.2_0-result.n3,
	tests/sparql/examples/ex11.2.3.2_1-result.n3,
	tests/sparql/examples/ex11.2.3.3_0-result.n3,
	tests/sparql/examples/ex11.2.3.4_0-result.n3,
	tests/sparql/examples/ex11.2.3.5_0-result.n3,
	tests/sparql/examples/ex11.2.3.6_0-result.n3,
	tests/sparql/examples/ex11.2.3.7_0-result.n3,
	tests/sparql/examples/ex11.2.3.8_0-result.n3,
	tests/sparql/examples/ex11_0-result.n3,
	tests/sparql/examples/manifest.n3: Imported updated examples

	* tests/sparql/check-sparql: remove debug print

	* sparql_parser.y: Make construct work again.
	Now %type <seq>: TriplesList ConstructTemplate
	(ConstructClause): Take triples from seq ConstructTemplate
	(ConstructTemplate): Use TriplesList
	(TriplesList): Added, making a raptor_sequence of triples from
	triples in Triples formulas.

	* rasqal_graph_pattern.c (rasqal_new_graph_pattern): Init columns
	to defaults here.

	* rasqal_engine.c (rasqal_engine_make_basic_graph_pattern): Added.

	* rasqal_internal.h: Added rasqal_engine_make_basic_graph_pattern
	prototype.

	* sparql_parser.y (rasqal_sparql_query_engine_prepare): Call
	rasqal_engine_make_basic_graph_pattern on the top level subgraph
	patterns.

	* tests/sparql/syntax/Makefile.am: Print failure summaries

	* tests/sparql/syntax/offset0.rq, tests/sparql/syntax/cast1.rq,
	tests/sparql/syntax/cast0.rq: updates for turtle sparql syntax

	* tests/sparql/check-sparql: Read manfiest.ttl or manifest.n3

	* tests/rdql/testsuite/check-rdql, tests/sparql/check-sparql: Emit
	failing roqet line when roqet returns errors.

	* tests/rdql/testsuite/check-rdql, tests/sparql/check-sparql: Emit
	failing roqet line on FAILURE

2005-04-17  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y: Updates to SPARQL rq23 around $Revision: 1.303
	$ of $Date: 2005/04/16 17:13:51 $ Removed AND, WITH.  Added NAMED.
	Removed many %type that were used with NULL value or none.
	(DatasetClauseOpt, DefaultGraphClause): Added after rq23
	(NamedGraphClauseList): Added
	(PatternElementsList): Renamed from PatternElementList and now in
	rq23, returns a graph pattern.  FILTER handled here, not in older
	PatternElementConstraint.
	(PatternElementConstraint): Deleted.
	(ItemList): Moved adjacent to Collection which it serves.
	(URIList): Deleted, no longer used.

	* rasqal_engine.c (rasqal_engine_build_constraints_expression):
	Handle no graph pattern.
	(rasqal_engine_execute_init): Handle no graph pattern.

	* tests/sparql/syntax/groups.rq, tests/sparql/syntax/describe1.rq,
	tests/sparql/syntax/construct1.rq, tests/sparql/syntax/limit0.rq,
	tests/sparql/syntax/distinct0.rq,
	tests/sparql/syntax/construct2.rq,
	tests/sparql/syntax/construct0.rq, tests/sparql/syntax/ask0.rq:
	Update to turtle query syntax

	* rasqal_graph_pattern.c (rasqal_new_graph_pattern_from_sequence):
	Do not flatten gps.

	* tests/sparql/part1/dawg-query-003,
	tests/sparql/part1/dawg-query-003.rq,
	tests/sparql/part1/dawg-query-004,
	tests/sparql/part1/dawg-query-004.rq,
	tests/sparql/part1/manifest.n3, tests/sparql/part1/Makefile.am,
	tests/sparql/part1/dawg-query-001,
	tests/sparql/part1/dawg-query-001.rq,
	tests/sparql/part1/dawg-query-002,
	tests/sparql/part1/dawg-query-002.rq: Updated to turtle query
	syntax and renamed dawg-query-001.rq dawg-query-002.rq
	dawg-query-003.rq dawg-query-004.rq

	* tests/sparql/examples/ex2-1a.rq,
	tests/sparql/examples/ex2-1b.rq, tests/sparql/examples/ex2-1c.rq,
	tests/sparql/examples/ex2-1e.rq, tests/sparql/examples/ex2-2a.rq,
	tests/sparql/examples/ex2-3a.rq, tests/sparql/examples/ex2-4a.rq,
	tests/sparql/examples/manifest.n3: update to turtle syntax
	queries, latest naming

	* tests/sparql/simple/data-03.n3,
	tests/sparql/simple/dawg-tp-05.rq: import from dawg

	* tests/sparql/simple/dawg-tp-01.rq,
	tests/sparql/simple/dawg-tp-02.rq,
	tests/sparql/simple/dawg-tp-03.rq,
	tests/sparql/simple/dawg-tp-04.rq,
	tests/sparql/simple/manifest.n3: update to turtle syntax queries

	* rdql_parser.y (rasqal_rdql_query_engine_prepare): Init query
	graph pattern.

	* rasqal_query.c (rasqal_new_query): Start with a NULL query graph
	pattern.

	* sparql_lexer.l: -AND

	* sparql_lexer.l: -WITH, +NAMED

	* tests/sparql/survey/manifest.ttl: Added manifest.ttl

	* tests/sparql/survey/query-survey-8.rq,
	tests/sparql/survey/query-survey-9.rq,
	tests/sparql/survey/result-survey-10.ttl,
	tests/sparql/survey/result-survey-3.ttl,
	tests/sparql/survey/survey-sample.ttl,
	tests/sparql/survey/query-survey-1.rq,
	tests/sparql/survey/query-survey-10.rq,
	tests/sparql/survey/query-survey-11.rq,
	tests/sparql/survey/query-survey-12.rq,
	tests/sparql/survey/query-survey-13.rq,
	tests/sparql/survey/query-survey-2.rq,
	tests/sparql/survey/query-survey-3.rq: Update to latest DAWG
	versions of test

	* tests/sparql/survey/Makefile.am: manifest file is manifest.ttl

	* autogen.sh: allow envariables to override the programs

2005-04-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y: First set of sparql turtle syntax changes Added
	%token: ORDER, BY, REGEX Added %type: OrderClauseOpt,
	PatternElementList, DotOptional, ConstructTemplate, Triples,
	PropertyList, ObjectList, ItemList Collection, Subject, Predicate
	Object, TriplesNode, GraphPattern, GraphGraphPattern,
	UnionGraphPattern (based on rq23) Removed %type: VarOrURIOrBNode
	as turtle syntax rules cover it Many terms renamed to match rq23
	terms, updated to use formula.  Other changes:
	(Query): Added OrderClauseOpt
	(BaseDeclOpt, PrefixDeclOpt): moved in source, no change.
	(WhereClauseOpt): Just assign GraphPattern value
	(OrderClauseOpt): Skeletal and incomplete.
	(GraphPattern): Take a list of .-separated triples, with optional
	.  or an empty {}
	(DotOptional): Added
	(Triples, PropertyList, ObjectList, ItemList, Subject, Predicate,
	Object, Collection): imported for turtle and updated to pass
	around rasqal_formula and use them to store triples + literal
	value.
	(TriplesNode): Imported from rq23 partially.
	(BuiltinExpression): Added REGEX

	* sparql_lexer.l: Added tokens: ORDER, By, REGEX, ., ; for rq23
	sparql Noted FIXME to remove old comparison ops EQ/eq, NE/ne, ==,
	!=

	* rasqal.h: Added rasqal_generate_bnodeid_handler typedef.  Added
	prototypes for
	rasqal_query_set_default_generate_bnodeid_parameters and
	rasqal_query_set_generate_bnodeid_handler

	* rasqal_graph_pattern.c: docs

	* rasqal_internal.h: Added bnodeid handler params to query.
	Added prototype for rasqal_query_set_generate_bnodeid_handler.
	Added extern references for rasqal_rdf_namespace_uri,
	rasqal_rdf_first_uri, rasqal_rdf_rest_uri and rasqal_rdf_nil_uri

	* rasqal_general.c:
	Add rdf uris for namespace, rdf:first, rdf:rest, rdf:nul
	(rasqal_uri_init, rasqal_uri_finish): Init and tidy up above.
	(rasqal_query_set_default_generate_bnodeid_parameters,
	rasqal_query_set_generate_bnodeid_handler,
	rasqal_default_generate_bnodeid_handler,
	rasqal_query_generate_bnodeid): Added, import from raptor.

	* rasqal_literal.c: Added rasqal_formula for sparql parser.
	(rasqal_new_formula): Added constructor
	(rasqal_free_formula): Added destructor
	(rasqal_formula_print): Added print method, for sequences of formulas

	* rasqal_internal.h: Added rasqal_formula for sparql parser.
	Added prototypes for rasqal_new_formula, rasqal_free_formula and
	rasqal_formula_print

	* tests/sparql/syntax/cast1.rq, tests/sparql/syntax/cast0.rq: AND
	to FILTER

	* tests/sparql/syntax/Makefile.am: Added offset0.rq

	* sparql_parser.y: Added tokens FILTER OFFSET A Now up to
	expecting 3 shift/reduce (filter + offset can both be missing)
	Added LimitClauseOpt OffsetClauseOpt types
	(Query): Added OffsetClause
	(OffsetClauseOpt): Added, not in 2005-02-17 SPARQL WD
	(PatternElementConstraint): Deprecate AND (removed 2005-04-19
	SPARQL WD) and add FILTER.

	* roqet.c (roqet_query_walk): Print any result offset
	(main): Fix help message

	* tests/sparql/syntax/offset0.rq: LIMIT and OFFSET test

	* rasqal_engine.c (rasqal_engine_query_constraints_has_qname):
	Handle no query_graph_pattern present.

	* sparql_lexer.l: Added FILTER, OFFSET, A tokens

	* rasqal_query.c (rasqal_query_get_offset): Added, returning the
	query results offset.
	(rasqal_query_print): Print query results offset

	* rasqal.h: Added rasqal_query_get_offset prototype.

	* rasqal_internal.h: Added offset to query structure

2005-04-11  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_lexer.l: Deleted keyword LOAD

	* sparql_parser.y (LoadClauseOpt): Deleted, along with old keyword LOAD

	* sparql_parser.y: Removed deprecated [ ... ] syntax for optionals

	* sparql_parser.y, sparql_lexer.l: Removed deprecated SOURCE keyword

	* configure.ac: Added tests/sparql/survey/Makefile

	* tests/sparql/Makefile.am: Added survey dir

	* tests/sparql/survey/result-survey-12.ttl,
	tests/sparql/survey/result-survey-13.ttl,
	tests/sparql/survey/result-survey-2.ttl,
	tests/sparql/survey/result-survey-3.ttl,
	tests/sparql/survey/result-survey-8.ttl,
	tests/sparql/survey/result-survey-9.ttl,
	tests/sparql/survey/survey-sample.ttl,
	tests/sparql/survey/query-survey-2.rq,
	tests/sparql/survey/query-survey-3.rq,
	tests/sparql/survey/query-survey-8.rq,
	tests/sparql/survey/query-survey-9.rq,
	tests/sparql/survey/result-survey-1.ttl,
	tests/sparql/survey/result-survey-10.ttl,
	tests/sparql/survey/result-survey-11.ttl,
	tests/sparql/survey/.cvsignore, tests/sparql/survey/Makefile.am,
	tests/sparql/survey/query-survey-1.rq,
	tests/sparql/survey/query-survey-10.rq,
	tests/sparql/survey/query-survey-11.rq,
	tests/sparql/survey/query-survey-12.rq,
	tests/sparql/survey/query-survey-13.rq: dawg survey tests

2005-04-10  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h, configure.ac: Bumped version to 0.9.9

	* Snapshotted rasqal_0_9_8 for 0.9.8 release

2005-03-21  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_graph_pattern.c (rasqal_graph_pattern_init): Set origin
	parts only if there is an origin.

	* rasqal_engine.c (rasqal_query_graph_pattern_build_declared_in):
	Set origin vars only if there is an origin.

	* rasqal_query.c (rasqal_graph_pattern_set_origin): Set all
	columns, not 1 less.

	* rasqal_graph_pattern.c (rasqal_graph_pattern_init): Add origin
	triple parts.

	* rasqal_engine.c (rasqal_query_graph_pattern_build_declared_in):
	Mark vars declared in origin.

	* rdql_parser.y (Query): Add background data graphs as this rdql
	does not allow origin queries.

	* sparql_parser.y (LoadClauseOpt): Add named data graphs from LOAD
	(GraphOrPattern, NamedGraphPattern, OptionalGraphPattern): Add FIXMEs
	for UNION, GRAPH *, SOURCE *, deprecated SOURCE, deprecated []

	* rasqal_query.c (rasqal_query_add_data_graph,
	rasqal_query_add_variable, rasqal_query_add_prefix): Add data
	graphs, sources, variables, prefixes to the end of the sequence -
	more sensible and also quicker.

	* rasqal_graph_pattern.c (rasqal_graph_pattern_add_constraint):
	Add constraints to end of sequence - more sensible and also
	quicker.

	* rdql_parser.y (Query): Make data graphs here, don't edit
	deprecated sources list.

	* rasqal_raptor.c (rasqal_raptor_new_triples_source): Pass in
	graph names as base URIs to parsing.

	* rasqal_redland.c (rasqal_redland_new_triples_source): Use data
	graphs to gather source URIs and graph URI names.  Pass in graph
	names as base URIs to parsing.

	* rasqal_raptor.c (rasqal_raptor_new_triples_source): Use data
	graphs to gather source URIs and graph URI names

2005-03-20  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y (NamedGraphClauseOpt):
	Set name uri when adding a data graph, to same
	uri as source uri

	* librasqal.3: style, refs, 0.9.8 API changes

	* rasqal.h, rasqal_query.c:
	(rasqal_query_get_variable_sequence, rasqal_query_add_triple):
	Removed.  Were announced deprecated in 0.9.7

	* rasqal_expr.c (main):
	Call rasqal_uri_init and rasqal_uri_finish around test code.

	* rasqal_literal.c (rasqal_new_integer_literal):
	Use rasqal_xsd_integer_uri.
	(rasqal_new_floating_literal): Use rasqal_xsd_double_uri.
	(rasqal_literal_string_to_native): Use rasqal_xsd_integer_uri and
	rasqal_xsd_double_uri.
	Also convert xsd:boolean rdf literals into internal
	RASQAL_LITERAL_BOOLEAN
	* rasqal_expr.c (main): Call rasqal_uri_init and rasqal_uri_finish
	around test code.

	* rasqal_literal.c (rasqal_new_integer_literal):
	Use rasqal_xsd_integer_uri.
	(rasqal_new_floating_literal): Use rasqal_xsd_double_uri.
	(rasqal_literal_string_to_native): Use rasqal_xsd_integer_uri and
	rasqal_xsd_double_uri.
	Also convert xsd:boolean rdf literals into internal
	RASQAL_LITERAL_BOOLEAN

	* rasqal_general.c (rasqal_init): Call rasqal_uri_init
	(rasqal_finish): Call rasqal_uri_finish and always call raptor_finish.
	(rasqal_uri_init, rasqal_uri_finish): Added to initialise/free
	URIs used in the library.

	* rasqal_internal.h: Added internal URIs rasqal_xsd_namespace_uri,
	rasqal_xsd_integer_uri, rasqal_xsd_double_uri and
	rasqal_xsd_boolean_uri.
	Added prototypes for rasqal_uri_init and rasqal_uri_finish to
	make them.

	* tests/sparql/syntax/cast1.rq: Type check should be xsd:integer.

2005-03-17  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_get_next_result): Finish if the
	query has no query graph or the query graph has no graph patterns
	in it.

2005-03-16  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/syntax/Makefile.am, tests/sparql/syntax/cast1.rq:
	Added cast1.rq

	* sparql_parser.y (PatternElementConstraint):
	Added, Taking the AND Expression out of
	PatternElement, ensuring the constraint gets added to the adjacent
	graph pattern rather than one with no other content.
	Replaced all other references to PatternElement with this term.
	[now have 2 shift/reduce conflicts]

	* rasqal_engine.c (rasqal_query_build_declared_in):
	Less debug noise for defined variables

	* tests/sparql/syntax/describe1.rq: use ?p in the query

	* tests/sparql/syntax/groups.rq: select ?mbox mentioned in query

2005-03-15  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* Makefile.am, rasqal_engine.c, rasqal_graph_pattern.c,
	rasqal_internal.h: Move rasqal_graph_pattern to new
	rasqal_graph_pattern.c

2005-03-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_query_constraints_has_qname):
	Check for query constraints in sub-graph patterns via
	rasqal_engine_graph_pattern_constraints_has_qname on
	query_graph_pattern.
	(rasqal_engine_graph_pattern_constraints_has_qname): Check in
	sub-graph patterns here.
	(rasqal_engine_expand_graph_pattern_constraints_qnames): Expand
	qnames in sub graph patterns via recursion.
	(rasqal_engine_expand_query_constraints_qnames): Expand via
	rasqal_engine_expand_graph_pattern_constraints_qnames on
	query_graph_pattern.
	(rasqal_engine_build_constraints_expression): Build constraints in
	sub graph patterns via recursion.
	(rasqal_new_graph_pattern_from_triples): Use
	rasqal_graph_pattern_add_triples to init.
	(rasqal_graph_pattern_add_triples): Added, to add triples to an
	existing graph pattern.
	(rasqal_graph_pattern_init): Init sub graph_patterns by recusion.
	Optional flags are now stored per graph pattern.
	(rasqal_query_graph_pattern_build_declared_in): Added to build the
	variables_declared_in fields per graph_pattern.
	(rasqal_query_build_declared_in): Use the above to init from the
	query_graph_pattern down.
	(rasqal_engine_prepare): Use
	rasqal_engine_build_constraints_expression to init
	query_graph_pattern constraints.
	(rasqal_engine_execute_init): Moved graph pattern sequence init
	into rasqal_graph_pattern_init.
	(rasqal_engine_move_to_graph_pattern): Move within an outer graph
	pattern not a query.
	(rasqal_engine_do_step, rasqal_engine_do_optional_step): Perform a
	step within an outer graph_pattern containing graph pattern gp.
	(rasqal_engine_get_next_result): Execute over contents of query's
	query_graph_pattern.

	* sparql_parser.y (WhereClauseOpt): Append to query_graph_pattern

	* rdql_parser.y (rasqal_rdql_query_engine_prepare): Use
	rasqal_graph_pattern_add_sub_graph_pattern on query_graph_pattern

	* rasqal_query.c (rasqal_new_query, rasqal_free_query): Remove
	graph_patterns and optional_graph_pattern fields.
	(rasqal_query_add_constraint,
	rasqal_query_get_constraint_sequence,
	rasqal_query_get_constraint): Still deprecated, but now use the
	query's query_graph_pattern field.
	(rasqal_query_get_graph_pattern_sequence,
	rasqal_query_get_graph_pattern): Use the graph pattern sequence
	inside the query's query_graph_pattern.
	(rasqal_graph_pattern_add_sub_graph_pattern): Added.
	(rasqal_query_print): Print from the query_graph_pattern.

	* rasqal_internal.h: Moved from structure rasqal_query to
	rasqal_graph_pattern fields: current_graph_pattern,
	max_optional_graph_pattern, optional_graph_pattern_matches_count
	to graph_pattern structure for execution of sub-graph patterns.
	Added prototype of rasqal_graph_pattern_add_triples.

	* rasqal.h:
	Added prototype for rasqal_graph_pattern_add_sub_graph_pattern

2005-03-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_new_graph_pattern): Added.

	* rasqal_query.c (rasqal_new_query, rasqal_free_query): Init
	query_graph_pattern using rasqal_new_graph_pattern.

	* rasqal_internal.h: Added prototype for rasqal_new_graph_pattern

	* sparql_parser.y, rdql_parser.y: execute factory method takes
	rasqal_query_results* arg

	* rasqal_engine.c: style

	* rasqal_query.c (rasqal_query_execute): execute factory method takes
	rasqal_query_results*

	* rasqal_internal.h: execute method takes rasqal_query_results*

	* rasqal_internal.h: style

2005-03-10  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_parser.y (rasqal_sparql_query_engine_prepare):
	Move qname expansion checks from sparql_parse.

	* sparql_parser.y:
	Restore TriplePatternList as first part of PatternElement.

	* tests/sparql/syntax/data.n3: Add something for casting

	* rasqal_expr.c (rasqal_expression_evaluate):
	Evaluate RASQAL_EXPR_CAST.

	* rdql_parser.y (main): Cast for C++

	* tests/sparql/syntax/Makefile.am: Added cast0.rq

	* tests/sparql/syntax/cast0.rq: Added cast test

	* sparql_lexer.l: and {QUOTEDURI} add optional ')' and return
	URI_LITERAL_BRACE, QNAME_LITERAL_BRACE instead of URI_LITERAL /
	QNAME_LITERAL.

	* sparql_parser.y:
	Added tokens URI_LITERAL_BRACE QNAME_LITERAL_BRACE for URI+'(' and
	QNAME+'('
	(URIBrace): Added for handling the two above, replacing two
	alternatives in BuiltinExpression, removing a conflict.

	* rasqal_expr.c (rasqal_new_cast_expression): Added for type casting
	(rasqal_free_expression, rasqal_expression_foreach,
	rasqal_expression_evaluate, rasqal_expression_print): Added
	RASQAL_EXPR_CAST support

	* rasqal.h: Added RASQAL_EXPR_CAST for sparql type casting
	Added prototype for rasqal_new_cast_expression

	* sparql_lexer.l, rdql_lexer.l: Tidy to use .|\n to match any char

	* rdql_lexer.l, sparql_lexer.l ('-strings, and "-strings): Count
	passed into sparql_copy_string_token is one too small.

	* rasqal_query.c (rasqal_graph_pattern_set_origin): Set origin
	only on this graph pattern's columns/triples.

	* roqet.c: Indenting tidying

2005-03-09  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c (roqet_graph_pattern_walk): Print constraints per-graph
	pattern.

	* rasqal_engine.c (rasqal_graph_pattern_get_constraint): use idx

	* sparql_lexer.l: Remove NOT

	* sparql_parser.y: Updates to grammar structure to match that of
	the 17 February 2005 WD in
	http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050217/ Remove
	unused NOT token 1 shift/reduce conflcit near: URI '(' which can
	be a cast in a rule part of BuiltinExpression or a Literal.

	* sparql_parser.y (sparql_parse): Use
	rasqal_engine_query_constraints_has_qname.

	* rdql_parser.y: Construct constraints in parsing via query field
	constraints_sequence
	(rasqal_rdql_query_engine_prepare): Init constraints_sequence and
	after parsing, assign to the main graph pattern and delete it.
	Then do the qname expansion.
	(rdql_parse): Remove qname expansion to above function.
	(main): Use rasqal_query_prepare rather than writing internal
	fields directly.

	* rasqal.h: Deprecate rasqal_query_add_constraint,
	rasqal_query_get_constraint_sequence and
	rasqal_query_get_constraint Added prototypes for
	rasqal_graph_pattern_add_constraint,
	rasqal_graph_pattern_get_constraint_sequence and
	rasqal_graph_pattern_get_constraint

	* rasqal_query.c: Moved constraints code to graph_pattern
	(rasqal_free_query): Removed constraints code.
	(rasqal_query_add_source, rasqal_query_get_source_sequence,
	rasqal_query_get_source, rasqal_query_get_variable_sequence): Add
	RASQAL_DEPRECATED_MESSAGE pointing at new choice.
	(rasqal_query_add_constraint,
	rasqal_query_get_constraint_sequence,
	rasqal_query_get_constraint): Deprecated to methods on a
	rasqal_graph_pattern
	(rasqal_query_print): Remove constraints printing.

	* rasqal_engine.c (rasqal_engine_query_constraints_has_qname):
	Renamed from rasqal_engine_constraints_has_qname
	(rasqal_engine_graph_pattern_constraints_has_qname): Added.
	(rasqal_engine_expand_graph_pattern_constraints_qnames): Renamed
	from rasqal_engine_expand_constraints_qnames
	(rasqal_engine_expand_query_constraints_qnames): Added.
	(rasqal_free_graph_pattern): Free constraints_expression and
	constraints when present (moved from rasqal_free_query).
	(rasqal_graph_pattern_add_constraint): Added, based on
	rasqal_query_add_constraint.
	(rasqal_graph_pattern_get_constraint_sequence): Added, based on
	rasqal_query_get_constraint_sequence
	(rasqal_graph_pattern_get_constraint): Added, based on
	rasqal_query_get_constraint
	(rasqal_graph_pattern_print): Add printing of constraints
	(rasqal_engine_prepare): Build constraints expressions per graph
	pattern.
	(rasqal_engine_check_constraint, rasqal_engine_do_step,
	rasqal_engine_do_optional_step): Operate constraints per-current
	graph pattern.

	* rasqal_internal.h: RASQAL_DEPRECATED_MESSAGE gains a count so it
	warns just once.  rasqal_graph_pattern gains constraints,
	constraints_expression fields.  rasqal_query internal looses
	constraints.  Gains constraints_equence for rdql parsing use.
	Added prototypes for rasqal_engine_query_constraints_has_qname,
	rasqal_engine_graph_pattern_constraints_has_qname,
	rasqal_engine_expand_query_constraints_qnames and
	rasqal_engine_expand_graph_pattern_constraints_qnames

2005-03-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c: Update to use rasqal_data_graph* and methods.

	* rasqal_query.c (rasqal_query_print):
	Prefer printing query->data_graphs not sources.

	* sparql_parser.y (FromClauseOpt): Add either a NAMED or
	BACKGROUND rasqal_data_graph with FROM and WITH respectively.

	* rasqal_internal.h: rasqal_query gains data_graphs field, note
	sources is DEPRECATED.

	* rasqal_query.c (rasqal_new_query, rasqal_free_query):
	Added data_graphs field init, tidy.
	(rasqal_query_add_data_graph, rasqal_query_get_data_graph_sequence,
	rasqal_query_get_data_graph): Added for rasqal_data_graph access
	(rasqal_query_add_source, rasqal_query_get_source_sequence,
	rasqal_query_get_source): Added deprecated docs

	* rasqal_expr.c (rasqal_query_add_source,
	rasqal_query_get_source_sequence and rasqal_query_get_source):
	Added deprecated notices.
	(rasqal_new_data_graph, rasqal_free_data_graph,
	rasqal_data_graph_print): Added for rasqal_data_graph class.

	* rasqal.h: Added rasqal_data_graph and rasqal_data_graph_flags.
	Deprecated rasqal_query_add_source, rasqal_query_get_source_sequence and
	rasqal_query_get_source
	Added prototypes for rasqal_query_add_data_graph,
	rasqal_query_get_data_graph_sequence, rasqal_query_get_data_graph,
	rasqal_new_data_graph, rasqal_free_data_graph,
	rasqal_data_graph_print

2005-02-27  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h, configure.ac, NEWS.html, ChangeLog:
	Bumped version to 0.9.8

	* configure.ac, win32_rasqal_config.h: Bumped version to 0.9.8

	* Snapshotted rasqal_0_9_7 for 0.9.7 release

2005-02-24  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.1: roqet is a query util

	* roqet.c (roqet_graph_pattern_walk): Renamed from
	roqet_walk_graph_pattern

	* roqet.c (roqet_query_walk): Added to do all query API walking.

	* rasqal_query.c (rasqal_query_print): Tweak distinct, limits wording>

	* tests/sparql/syntax/Makefile.am: Added distinct0.rq limit0.rq

	* tests/sparql/syntax/distinct0.rq, tests/sparql/syntax/limit0.rq:
	Tests for DISTINCT and LIMIT syntax

	* librasqal.3: Added rasqal_query_get_distinct and
	rasqal_query_get_limit

	* sparql_parser.y (LimitClauseOpt): Set limit field.

	* rasqal_query.c: Tidy some docucomments.
	(rasqal_new_query): Initialise distinct, limit fields.
	(rasqal_query_get_distinct): Added, returning if query results should
	be distinct.
	(rasqal_query_get_limit): Added, returning the query results limit
	specified in the query.
	(rasqal_query_print): Print distinct, limit fields.

	* rasqal.h: Added rasqal_query_get_distinct and rasqal_query_get_limit

	* rasqal_internal.h: Added limit field to struct rasqal_query_s

	* rasqal_literal.c (rasqal_literal_compare):
	Recheck for NULL variable values so that
	?var1 compare ?var2 fails properly when one is not bound.

	* sparql_parser.y: tweak optional warning

2005-02-23  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c: Casts for C++

	* rasqal_redland.c (rasqal_redland_new_triples_source):
	Return -1 on no data.

	* rasqal_raptor.c (rasqal_raptor_new_triples_source):
	Return -1 on no data.

	* rasqal_query.c (rasqal_query_prepare):
	Init line, column, byte to undefined.

	* rasqal_engine.c (rasqal_new_triples_source):
	Throw no data/general error when
	new triple source factory fails to construct.
	(rasqal_engine_execute_init): Remove error throwing from here.

	* rasqal.h: new_triples_source factory method document return value

	* roqet.c:
	Use raptor_stringbuffer to read large queries from files, > buffer
	size.

2005-02-19  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/part1/Makefile.am: Add dawg-query-004
	dawg-result-004.n3

	* tests/sparql/part1/dawg-query-001,
	tests/sparql/part1/dawg-query-002,
	tests/sparql/part1/dawg-query-003,
	tests/sparql/part1/dawg-query-004: 2005-02-17 WD syntax changes

2005-02-18  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/syntax/construct1.rq,
	tests/sparql/syntax/construct2.rq, tests/sparql/syntax/ask0.rq,
	tests/sparql/syntax/construct0.rq: FROM to WITH for 2005-02-17 WD

	* sparql_parser.y (PatternElementForms): Remove unused vars.

	* sparql_parser.y: Some updates for 2005-02-17 SPARQL query WD.
	Added GRAPH, WITH tokens
	(FromClauseOpt): Warn about FROM, add WITH.
	(PatternElementForms): Warn with SOURCE, add GRAPH.
	Use rasqal_graph_pattern_set_origin to pass on the varOrURI
	(PatternElementForms): Warn about []

	* sparql_lexer.l: Added graph, with

	* rasqal_internal.h: Added rasqal_graph_pattern_set_origin prototype.

	* rasqal_query.c (rasqal_graph_pattern_set_origin): Added, to
	recursively set the origin on all triples inside.

2005-02-17  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* librasqal.3: Document 0.9.7 and graph pattern api calls.

	* roqet.1: Document -d, -n

	* roqet.c: Added -n/--dryrun to stop after preparing the query.
	Added -w/--walk-query to walk and print the query using the API.
	(roqet_walk_graph_pattern): Added to walk the tree.

	* rasqal_query.c (rasqal_graph_pattern_get_triple): fix range check

	* rasqal_query.c (rasqal_query_add_triple): Deprecated as it
	doesn't construct the graph patterns and is of little use.
	(rasqal_query_get_graph_pattern_sequence,
	rasqal_query_get_graph_pattern): Added to get the
	rasqal_graph_patterns inside a query.
	(rasqal_graph_pattern_get_triple): Added to get a rasqal_triple
	inside a graph_pattern.
	(rasqal_graph_pattern_get_sub_graph_pattern_sequence,
	(rasqal_graph_pattern_get_sub_graph_pattern): Added to get a
	sub-graph pattern inside a graph pattern.
	(rasqal_graph_pattern_get_flags): Added to get graph pattern flags.

	* rasqal_internal.h:
	Move rasqal_graph_pattern typedef, rasqal_pattern_flags and
	rasqal_graph_pattern_print to public api.
	Added RASQAL_DEPRECATED_MESSAGE macro.

	* rasqal.h: Export rasqal_graph_pattern typedef
	Export rasqal_pattern_flags enum with value
	RASQAL_PATTERN_FLAGS_OPTIONAL
	Deprecate rasqal_query_add_triple as it doesn't construct the graph
	patterns and is of little use.
	Added prototypes for rasqal_query_get_graph_pattern_sequence,
	rasqal_query_get_graph_pattern, rasqal_graph_pattern_get_triple,
	rasqal_graph_pattern_get_sub_graph_pattern_sequence,
	rasqal_graph_pattern_get_sub_graph_pattern,
	rasqal_graph_pattern_get_flags
	and exported rasqal_graph_pattern_print

	* tests/rdql/testsuite/check-rdql, tests/sparql/check-sparql:
	Handle roqet select: and bound variables:

	* rasqal.h: Added RASQAL_DEPRECATED macro.  Deprecated
	rasqal_query_get_variable_sequence 
	Added rasqal_query_get_bound_variable_sequence and
	rasqal_query_get_all_variable_sequence.

	* rasqal_query.c (rasqal_query_get_variable_sequence): Deprecate,
	prefer rasqal_query_get_bound_variable_sequence
	(rasqal_query_get_bound_variable_sequence): Added, returning the
	sequence of rasqal_variable* that are to be bound - appearing in
	the query result.
	(rasqal_query_get_all_variable_sequence): Added, return the
	sequence of all rasqal_variable* mentioned in the query.
	(rasqal_query_print): Print all variables as well as selected.

	* rasqal_literal.c (rasqal_literal_as_integer,
	rasqal_literal_as_floating, rasqal_literal_as_string,
	rasqal_literal_compare): Added remaining LITERAL enums for
	-Wswitch-enum.
	(rasqal_literal_compare): Handle two literal values.
	(rasqal_literal_as_node): Handle RASQAL_LITERAL_BOOLEAN into a
	xsd:boolean typed value.

	* rasqal_query.c (rasqal_query_results_get_binding_name): Work
	even when query results are finished.

	* rasqal_query.c (rasqal_query_set_feature): Added
	RASQAL_FEATURE_LAST case for -Wswitch-enum (there are no
	features).
	(rasqal_query_results_write, rasqal_query_results_get_triple):
	Added RASQAL_LITERAL_UNKNOWN case for -Wswitch-enum.
	(rasqal_query_results_get_triple): Added remaining LITERAL enums
	for -Wswitch-enum.  Note why forbidden - literal subjects,
	predicates, bnode predicates.

	* rasqal_expr.c (rasqal_free_expression,
	rasqal_expression_foreach, rasqal_expression_evaluate,
	rasqal_expression_print): Added RASQAL_EXPR_UNKNOWN case for
	-Wswitch-enum.  Deleted "pattern" from rasqal_op_labels.
	(rasqal_expression_print): Deleted RASQAL_EXPR_PATTERN.
	Handle RASQAL_EXPR_FUNCTION.

	* rasqal_literal.c (rasqal_free_literal, rasqal_literal_print,
	rasqal_literal_as_boolean, rasqal_literal_as_integer,
	rasqal_literal_as_floating, rasqal_literal_as_string,
	rasqal_literal_compare, rasqal_literal_equals): Added
	RASQAL_LITERAL_UNKNOWN case for -Wswitch-enum.
	(rasqal_literal_as_integer, rasqal_literal_as_floating): Return
	RASQAL_LITERAL_BLANK as an error.

	* rasqal.h: Deleted RASQAL_EXPR_PATTERN - never used.

	* configure.ac: Add -Wswitch-enum to maintainer-mode gcc switches
	to catch missing enum values in switches.  Lots of those near
	expression and literal handling.

2005-02-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h: Define RASQAL_INLINE to __inline

	* rasqal_query.c: Change inline to RASQAL_INLINE

	* rasqal_internal.h:
	Add RASQAL_INLINE protection and set RASQAL_DEBUG if LIBRDF_DEBUG set.

	* rasqal.h: rasqal_query_results_write with RASQAL_API prefix.

2005-02-12  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_reset_triple_meta): End any triples
	match when resetting rasqal_triple_meta; this frees any resources
	that were providing a source of triples.

2005-02-10  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query_test.c (main): Execute a query/free twice with no
	checking of results in between.

2005-02-08  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/bound/Makefile.am,
	tests/sparql/examples/Makefile.am, tests/sparql/part1/Makefile.am,
	tests/sparql/simple/Makefile.am, tests/sparql/syntax/Makefile.am,
	configure.ac, tests/rdql/testsuite/Makefile.am: Add @RAPPER_PATH@
	to the PATH before check-rdql/sparql calls so that if both raptor
	and rasqal are being built, rapper can be found before
	installation.

2005-02-06  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* configure.ac, win32_rasqal_config.h:
	Bumped version to 0.9.7

	* Snapshotted rasqal_0_9_6 for 0.9.6 release

2005-02-04  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* autogen.sh: Add autoheader and libtoolize to the path search.

	* configure.ac:
	AM_PROG_LIBTOOL to AC_PROG_LIBTOOL seems to make things happier

2005-02-03  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_lexer.l, rasqal_expr.c: casts for C++

	* configure.ac: In maintainer mode, stop if flex is too old, no
	flex or YACC is not GNU bison.

	* sparql_lexer.l (sparql_copy_string_token): Fix wrong length on
	checking qname.

	* sparql_lexer.l ({QNAME}): Now assigns a uri using sparql_copy_qname.
	(sparql_copy_qname): expands and returns a raptor_uri* here.
	When running standalone as rasqal_lexer_test, ignore unexpanded
	qnames.
	(sparql_copy_string_token): When running standalone as
	rasqal_lexer_test, ignore unexpanded qnames.

	* sparql_lexer.l (sparql_copy_string_token):
	Check and expand datatype qnames here,
	since prefixes are always defined before qname use..

	* rasqal_expr.c: Added support for expressions:
	STR, LANG, DATATYPE, ISURI, ISBLANK and ISLITERAL
	(rasqal_free_expression, rasqal_expression_foreach,
	rasqal_expression_print_op, rasqal_expression_print):  Updated to
	handle the expression types above.
	(rasqal_expression_evaluate): Print evaluation before and after debug
	messages.  Edit main body to not return in cases.
	Implement the expressions above.

	* sparql_parser.y:
	Added tokens STR, LANG, DATATYPE, ISURI, ISBLANK and ISLITERAL
	(BuiltinExpression): Use the tokens above to implement built in
	functions of the same names.

	* sparql_lexer.l: Added keywords STR, LANG, DATATYPE, ISURI,
	ISBLANK and ISLITERAL

	* rasqal.h: Added rasqal_op RASQAL_EXPR_STR, RASQAL_EXPR_LANG,
	RASQAL_EXPR_DATATYPE, RASQAL_EXPR_ISURI, RASQAL_EXPR_ISBLANK,
	RASQAL_EXPR_ISLITERAL,

	* librasqal.3, rasqal_literal.c: Updates for 0.9.6

2005-02-02  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal.rdf.in: Updates for schema

2005-02-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_do_optional_step): When the
	constraint fails, zero the new_bindings_count since none matter
	now.

	* sparql_lexer.l: Added BNAME token
	({BNAME}): Added to just do a blank node.

	* configure.ac: Added dir tests/sparql/bound

	* tests/sparql/syntax/Makefile.am,
	tests/sparql/syntax/construct2.rq: Construct with bnodes in
	construct2.rq

	* tests/sparql/bound/.cvsignore, tests/sparql/bound/Makefile.am,
	tests/sparql/bound/bound1-result.n3, tests/sparql/bound/bound1.rq,
	tests/sparql/bound/data.n3, tests/sparql/bound/manifest.n3: DAWG
	BOUND tests

	* tests/sparql/Makefile.am: added bound

	* sparql_lexer.l ({QNAME}): If it starts _:, make a BLANK_LITERAL
	(sparql_token_print, sparql_token_free): Added BLANK_LITERAL support.

	* sparql_parser.y:
	Added tokens BLANK_LITERAL ConstructPattern (rq23) BNode (rq23),
	TripleTemplate (rq23) and VarOrLiteralOrBNode VarOrURIOrBNode
	(ConstructClause): Now using ConstructPattern
	(ConstructPattern): Added from rq23, using TripleTemplate
	(TripleTemplate): Added from rq23, using VarOrURIOrBNode for subject
	and VarOrLiteralOrBNode for object.
	(VarOrURIOrBNode): Added, using BNode
	(VarOrLiteralOrBNode): Added, using BNode
	(BNode): Added from rq23

	* rasqal_expr.c (rasqal_free_expression,
	rasqal_expression_evaluate, rasqal_expression_print_op): Added
	RASQAL_EXPR_BOUND support.

	* rasqal.h: Added RASQAL_EXPR_BOUND

	* sparql_parser.y:
	Updates from http://www.w3.org/2001/sw/DataAccess/rq23/
	$Revision: 1.187 $ of $Date: 2005/02/01 10:56:24 $
	Added tokens BASE LOAD BOUND
	Renumbered some of comments to rq23 above.
	(ReportFormat) Moved big () inside Query here
	(SelectClause, DescribeClause, ConstructClause): Note now in rq23
	(AskClause): Added from rq23.
	(LoadClauseOpt): Added from rq23.
	(LimitCaluseOpt): Added from rq23.
	(PatternElementForms OPTIONAL GraphPattern1): Mark the graph pattern
	as optional in the flags.
	(BaseDeclOpt): Added from rq23.
	(UnaryExpression): Call BuiltinExpression
	(BuiltinExpression): Added from rq23 just with BOUND

	* sparql_lexer.l:
	Added OPTIONAL, BASE, LOAD and BOUND tokens and keywords

2005-01-31  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_execute): Init ask_result.
	(rasqal_free_query_results, rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_is_graph):
	Docs.
	(rasqal_query_results_next, rasqal_query_results_get_triple,
	rasqal_query_results_next_triple): C style.
	(rasqal_query_results_get_triple): FIXME about bnodeids is done.
	(rasqal_query_results_get_boolean): Docs and implement by getting
	first result and storing if it worked.

	* rasqal_internal.h: Added ask_result to rasqal_query.

	* tests/sparql/syntax/Makefile.am: Added ask0.rq

	* tests/sparql/syntax/ask0.rq: ASK test

2005-01-30  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_engine_assign_variables): C99

	* rasqal_xsd_datatypes.c: Casts for C++

	* rasqal_redland.c (rasqal_redland_bind_match): Updated untested
	redland origin code.

	* rasqal_query.c: Casts for C++

	* rasqal_engine.c (rasqal_graph_pattern_get_next_match): int parts

	* librasqal.3: Updates for API changes to 2005-01-30

2005-01-29  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.1: Document -f/--format.  Reference -o xml spec

	* roqet.c: Note that -o xml writes the SPARQL xml format.

	* rasqal_engine.c (rasqal_engine_assign_variables):
	variables_declared_in is now an array of integer (triple) column
	numbers not pointers to graph patterns.
	(rasqal_reset_triple_meta): Return number of variables that were
	set to NULL.
	(rasqal_graph_pattern_init): Update to compare triple column
	numbers, not graph patterns for defining vars.
	(rasqal_query_build_declared_in): Update for variables_declared_in
	changed.
	(rasqal_graph_pattern_get_next_match): Adjust new_bindings_count
	by number of variables reset by rasqal_reset_triple_meta.  Only
	run the bind_match factory method if there are triple parts to
	bind. If it is run, adjust the new_bindings_count when variables
	are set.
	(rasqal_engine_do_optional_step): If there were new bindings,
	return a result otherwise continue searching.
	(rasqal_engine_get_next_result): Reset new_bindings_count on
	entry.

	* rasqal_internal.h: rasqal_query: variables_declared_in is now an
	array of integer column numbers.  Added new_bindings_count

	* rasqal_query.c (rasqal_free_query): tidy free of
	variables_declared_in, now an intarray.

2005-01-28  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c: Add -f / --format to set output syntax format for graph
	results.

	* roqet.c: Update for rasqal_query_results_get_triple returning a
	shared raptor_statement.  Use a raptor_serializer to format it.

	* rasqal_query.c (rasqal_free_query): Free rasqal_triple
	allocated.
	(rasqal_prefix_id): Prefix a blank node id with 'r'<query result
	number>'_'
	(rasqal_query_results_get_triple): Return a shared
	raptor_statement.
	(rasqal_query_results_next_triple): Free the internal
	rasqal_triple before moving on.

	* rasqal_internal.h: Added rasqal_triple internal to rasqal_query

	* rasqal.h: Changed rasqal_query_results_get_triple to return
	raptor_statement

	* rasqal_internal.h: Added raptor_statement to rasqal_query

2005-01-27  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/rdql/testsuite/check-rdql, tests/sparql/check-sparql
	(run_test): don't delete test output files here, let main do it.

	* roqet.c: Free returned triple result

	* roqet.c: Tidy the query result messages

	* roqet.c (main): Format bindings, triples and boolean results.

	* rasqal_query.c (rasqal_query_execute): Init
	current_triple_result.
	(rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_is_graph):
	Added to test query result formats.
	(rasqal_query_results_get_count, rasqal_query_results_next,
	rasqal_query_results_finished, rasqal_query_results_get_bindings,
	rasqal_query_results_get_binding_value,
	rasqal_query_results_get_binding_name,
	rasqal_query_results_get_binding_value_by_name,
	rasqal_query_results_get_bindings_count): Fail if result type is
	not bindings.
	(rasqal_query_results_get_triple): Added, to get the current
	triple from a graph result.
	(rasqal_query_results_next_triple): Added, to move to the next
	triple in a graph result.
	(rasqal_query_results_get_boolean): Added, always false for now.

	* rasqal_literal.c (rasqal_literal_as_node): Handle variable
	values, convert the variable result.

	* rasqal_internal.h: Added current_triple_result to rasqal_query

	* rasqal.h: Added rasqal_query_results_is_bindings,
	rasqal_query_results_is_boolean, rasqal_query_results_get_boolean,
	rasqal_query_results_is_graph, rasqal_query_results_get_triple and
	rasqal_query_results_next_triple

	* rasqal_engine.c (rasqal_engine_assign_variables): Build
	construct triples when CONSTRUCT * is given

	* rasqal_expr.c (rasqal_new_triple_from_triple): Added copy
	constructor

	* rasqal.h: Added rasqal_new_triple_from_triple

	* tests/sparql/syntax/Makefile.am,
	tests/sparql/syntax/construct0.rq,
	tests/sparql/syntax/construct1.rq: CONSTRUCT syntax

2005-01-24  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_expr.c (rasqal_new_function_expression):
	Added to create a function call expression.
	(rasqal_free_expression, rasqal_expression_print): Handle
	RASQAL_EXPR_FUNCTION.

	* rasqal.h: Added name, args fields to rasqal_expression
	Added rasqal_new_function_expression

	* Makefile.am: Added rasqal_xsd_datatypes_test

	* rasqal_xsd_datatypes.c: Rasqal XSD datatypes

2005-01-21  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/rdql/testsuite/Makefile.am: S-03, S-04, S-05 work

	* sparql_lexer.l (PREFIX): Allow \
	(NAME): Allow \
	(<ID>{NAME}, <PREF>{PREFIX}, {QNAME}) Terminate when a name is not
	created.
	(sparql_copy_name, sparql_copy_qname): Use
	rasqal_escaped_name_to_utf8_string to turn the escaped name into
	just UTF-8, then check it is a legal XML name.

	* rdql_lexer.l (PREFIX): Allow \
	(NAME): Allow \
	(<*>{NAME}, {QNAME}, <{QNAME}>) Terminate when a name is not
	created.
	(rdql_copy_name, rdql_copy_qname): Use
	rasqal_escaped_name_to_utf8_string to turn the escaped name into
	just UTF-8, then check it is a legal XML name.

	* rasqal_internal.h: Added prototype for
	rasqal_escaped_name_to_utf8_string

	* rasqal_general.c (rasqal_escaped_name_to_utf8_string): Added to
	turn a UTF-8 and/or \u-escaped name as a UTF-8 string.  Intended
	as a lexer helper function.  A combination of
	raptor_ntriples_string_as_utf8_string and raptor_ntriples_term
	with the parsing part stripped out, and just \u, \U allowed,
	always allowing UTF-8 and working just on full strings.

2005-01-18  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/rdql/testsuite/Makefile.am: Remove S-02 from expected
	failures now that the formatting matches the expected N-Triples
	escaped output.

	* rasqal_literal.c (rasqal_literal_print): Print string as
	N-Triples-escaped using raptor_print_ntriples_string.

2005-01-16  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_query_results_write): Copy original
	base_uri each time, don't lose the original reference.

	* rasqal_query.c (rasqal_query_results_write):
	Handle RASQAL_LITERAL_BLANK. Doh!

	* win32_rasqal_config.h, configure.ac, NEWS.html:
	Bumped version to 0.9.6

	* Snapshotted rasqal_0_9_5 for 0.9.5 release

	* Makefile.am: Add @RASQAL_EXTERNAL_LIBS@ $(MEM_LIBS) to all *_LDADD
	It seems to help mysterious shared library linking problems on Solaris.

	* Makefile.am: Remove AM_LDFLAGS, libtool works that out from the
	LIBADD for librasqal and adds it into the .la and uses it from
	there.

	* Makefile.am: Make the tests using automake rules rather than
	hand-crafted compile and link rules which were tricky to maintain.
	Added EXTRA_PROGRAMS for the tests.

	* rasqal_query_test.c: Handle rdql or sparql tests

	* rasqal_query_test.c:
	(main) Handle no rdql available with an warning and exit 0

2005-01-15  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_literal.c (rasqal_literal_compare): Move declarations to
	start of block.

	* librasqal.3: Updates for 0.9.5

	* configure.ac: Require raptor 1.4.4

	* sparql_parser.y (URIList): Copy the URI before freeing the
	rasqal_literal.

2005-01-14  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/part1/dawg-result-004.n3,
	tests/sparql/part1/manifest.n3, tests/sparql/part1/dawg-query-004:
	Import dawg-query-004 dawg-result-004.n3

2005-01-13  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* win32_rasqal_config.h: RASQAL_INTERNAL should be defined in the
	build configuration

2005-01-12  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* sparql_lexer.l: Updated to use yyterminate() when an error is
	reported, either in the lexer or in a failing function called.
	Deleted use of ERROR_TOKEN.  Mention SPARQL in all the error and
	warning messages.

	* rdql_lexer.l: Updated to use yyterminate() when an error is
	reported, either in the lexer or in a failing function called.
	Deleted use of ERROR_TOKEN.  Mention RDQL in all the error and
	warning messages.

	* sparql_parser.y: Delete ERROR_TOKEN
	(PatternElementForms): Add SPARQL to warning message.
	(sparql_parse): Add SPARQL to error message.

	* rdql_parser.y: Delete ERROR_TOKEN

	* rasqal_expr.c (rasqal_expression_evaluate): For STR_MATCH,
	STR_NMATCH ensure the literal returned from the lhs expression
	evaluation is always freed.

2005-01-11  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rdql_parser.y (rdql_parse): set parsing debug flag before
	starting parse when RASQAL_DEBUG > 2

	* rasqal_engine.c (rasqal_engine_do_optional_step): Handle an all
	optional query and finish all results when first optional
	finishes.

	* rasqal_query.c (rasqal_query_results_write): Handle NULL
	base_uri, pass it on the XML writer.

	* tests/sparql/examples/ex2-4a.rq: Kill the , between SELECT vars

	* rasqal_xml.c: Removed, not used

2005-01-10  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_raptor.c (rasqal_raptor_finish_triples_match): Free any
	literals copied into the triple used for comparing matches.

	* rasqal_raptor.c (rasqal_raptor_bind_match): Reformatting.
	(rasqal_raptor_new_triples_match): Set unbound triple matches
	literal values as shared pointers, not copies of literals.

	* rasqal_redland.c (rasqal_redland_bind_match): Update return
	value.

	* rasqal_engine.c (rasqal_free_graph_pattern): Zap triple_meta
	pointer when done.

	* sparql_lexer.l, rdql_lexer.l (<PATTERN>.): Recover state after
	an error in a regex.

	* rasqal_engine.c (rasqal_graph_pattern_order): Sort using
	pointers in data, not array pointers.

	* rasqal_query.c (rasqal_free_query): Delete ordered_triples tidy.
	(rasqal_query_print): Delete ordered_triples print.

	* rasqal_engine.c: (rasqal_query_order_triples_score,
	rasqal_query_order_triples): Deleted - no longer used.

	* rasqal_internal.h:
	Deleted unused ordered_triples field from rasqal_query.

2005-01-09  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* tests/sparql/part1/Makefile.am:
	All tests pass, empty EXPECTED_SPARQL_CORRECT_FAILURES

	* rasqal_internal.h: Added max_optional_graph_pattern to query.

	* rasqal_engine.c (rasqal_engine_do_step): Set gp->matched flag
	here
	(rasqal_engine_do_optional_step): Set gp->matched flag
	(rasqal_engine_get_next_result): Do not set gp->matched flag here.
	For an optional step, if no bound values were returned ensure
	search continues.

	* rasqal_engine.c: Add a few more debug messages.

	* rasqal_engine.c: delete a #if 1

	* rasqal_engine.c (rasqal_engine_move_to_graph_pattern): Use
	max_optional_graph_patterns to walk through combinations of
	optional graph patterns.
	(rasqal_engine_do_optional_step): Check against
	max_optional_graph_patterns limit and lower it when backtracking.
	(rasqal_engine_get_next_result): Count # returned values and
	continue searching when=0.  This is a fixup hack, not a final
	solution.

	* rasqal_engine.c (rasqal_engine_move_to_graph_pattern): Use
	max_optional_graph_patterns to walk through combinations of
	optional graph patterns.
	(rasqal_engine_do_optional_step): Check against
	max_optional_graph_patterns limit and lower it when backtracking.
	(rasqal_engine_get_next_result): Count # returned values and
	continue searching when=0.  This is a fixup hack, not a final
	solution.

	* rasqal_engine.c (rasqal_engine_move_to_graph_pattern):
	Take a delta since only ever moving by +1 or -1.
	When there are no optionals, just move.
	When backtracking optionals, re-init the finished graph pattern.
	(rasqal_engine_do_step, rasqal_engine_do_optional_step): Update
	calls to above.

2005-01-08  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_engine.c (rasqal_reset_triple_meta): Added.
	(rasqal_free_graph_pattern, rasqal_graph_pattern_get_next_match):
	Call new rasqal_reset_triple_meta
	(rasqal_engine_do_optional_step): Comment out duff test

	* rasqal_engine.c: messages

	* rasqal_engine.c (rasqal_engine_do_optional_step): Copy tidying

	* rasqal_engine.c (rasqal_engine_get_next_result): Debug messages.

	* rasqal_engine.c (rasqal_engine_check_constraint): Added, from
	body of rasqal_engine_get_next_result.
	(rasqal_engine_do_step): Now just for mandatory graph patterns
	rasqal_engine_do_optional_step): Added, just for optional graph
	patterns.
	(rasqal_engine_get_next_result): Call rasqal_engine_do_step or
	rasqal_engine_do_optional_step depending on graph pattern optional
	flag.

	* rasqal_engine.c (rasqal_engine_do_step): Added, from body of
	rasqal_engine_get_next_result
	(rasqal_engine_get_next_result): Smaller, see above.

	* rasqal_engine.c: Added rasqal_engine_step and use in
	(rasqal_engine_get_next_result): Replace step=X; break with
	step=X; continue to let the loop do the work

	* rasqal_engine.c: Added rasqal_engine_step and use in
	rasqal_engine_get_next_result

	* rasqal_engine.c (rasqal_engine_move_to_graph_pattern): No need
	for return

	* rasqal_engine.c (rasqal_engine_get_next_result): Init all
	matched flags to 0 at start.

	* rasqal_engine.c: Comment out not-used triple ordering code.
	(rasqal_triples_match_bind_match): Add parts arg and pass on to
	factory bind_match method.
	(rasqal_new_graph_pattern_from_triples): Add query arg at start.
	Init query, finished, matches_returned.
	(rasqal_new_graph_pattern_from_sequence): Add query arg at start.
	Init query, finished, matches_returned.
	(rasqal_free_graph_pattern): Free variables matching the parts.
	(rasqal_graph_pattern_init): Initialise the triple meta parts
	depending on the variables_declared_in information.
	(rasqal_query_build_declared_in): Added to mark which in graph
	pattern variables are first declared in the query so that they
	are never bound multiple times.  Also warns of selected but never
	used variables.
	(rasqal_graph_pattern_get_next_match): After a triple match ends,
	free variables matching the parts only.
	(rasqal_engine_prepare): Disable ordering triples.
	Call rasqal_query_build_declared_in.
	(rasqal_engine_move_to_graph_pattern): Helper added for:
	(rasqal_engine_get_next_result): Many changes trying to get
	optionals working.

	* rasqal_internal.h: Add query, finished, matches fields to
	graph_pattern.  Add query arg to start of
	rasqal_new_graph_pattern_from_triples and
	rasqal_new_graph_pattern_from_sequence Add variables_declared_in
	array field, optional_graph_pattern_matches_count field to query.

	* rasqal_redland.c (rasqal_redland_bind_match): Take parts
	argument and use to just bind those parts of the triple.

	* rasqal_raptor.c (rasqal_raptor_bind_match): Take parts argument
	and use to just bind those parts of the triple.

	* rdql_parser.y, sparql_parser.y: Add query arg at start of
	rasqal_new_graph_pattern_from_triples and
	rasqal_new_graph_pattern_from_sequence calls.

	* rasqal.h: Added triple parts to rasqal_triple_meta.

	* rasqal_query.c (rasqal_free_query):
	Tidy query->variables_declared_in.

2005-01-06  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal.h: Added rasqal_triple_parts rasqal_triples_match factory
	method bind_match now takes and returns rasqal_triple_parts,
	returns 0 on failure

	* rasqal_redland.c, rasqal_raptor.c, rasqal_engine.c, rasqal.h:
	Invert return value of rasqal_triples_match factory method
	bind_match.  Now returns 0 on failure.

	* rasqal_engine.c (rasqal_engine_get_next_result): Handle failed
	constraint by moving to next match.

	* tests/sparql/part1/dawg-data-01.n3,
	tests/sparql/part1/dawg-result-003.n3: <fred@edu> to <mailto:fred@edu>

	* tests/sparql/check-sparql: Remove =NULL from roqet output to
	handle optionals

	* rasqal_query.c (rasqal_new_query): Init gp->optional_graph_pattern.

	* rasqal_internal.h: Add finished, matches, optional_graph_pattern
	to rasqal_graph_pattern Add optional_graph_pattern to
	rasqal_query.

	* rasqal_engine.c (rasqal_new_graph_pattern_from_triples): Init
	gp->optional_graph_pattern.
	(rasqal_graph_pattern_init): Init optional_graph_pattern, finished
	and matches.
	(rasqal_graph_pattern_order): Added, to sort graph_patterns in a
	query into mandatory first, optional last.
	(rasqal_engine_execute_init): Sort graph_patterns using
	raptor_sequence_sort and above helper
	Initialise query->optional_graph_pattern to the index of the first
	optional graph_pattern.
	(rasqal_engine_get_next_result): Many changes on the way to getting
	optionals working.  Track what patterns have ended with the finished
	flag, and count matches to determine when nothing matched.

2005-01-04  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* rasqal_query.c (rasqal_new_query): Init sources sequence always.
	(rasqal_query_add_source): No need to init sources sequence here.

	* sparql_parser.y (WhereClauseOpt): Don't overwrite
	query->graph_patterns sequence, append if necessary.

	* sparql_parser.y (FromClauseOpt): Don't overwrite query->sources
	sequence, append if necessary.

	* rdql_parser.y (Query): Don't overwrite query->sources sequence,
	append if necessary.
	(TriplePattern): Append to query->triples sequence, don't
	overwrite it.

2005-01-03  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c (main): Declare query_string as void* to prevent type
	punning warning.

	* sparql_lexer.l, roqet.c, rdql_lexer.l, rasqal_query.c: casts
	for C++

2005-01-01  Dave Beckett  <Dave.Beckett@bristol.ac.uk>

	* roqet.c (roqet_xml_print_xml_attribute): Deleted
	(roqet_query_results_print_as_xml): Replaced with call to
	rasqal_query_results_write.
	(main): Set error and fatal_error handlers for query.
	Remove xml format warning.

	* rasqal_query.c (rasqal_query_results_write): Added docs. Declare
	own namespace stack and free up elements.

	* rasqal.h: Added rasqal_query_results_write

