2010-02-15 Dave Beckett * Snapshotted rasqal_0_9_19 for 0.9.19 release * NEWS.html, RELEASE.html, configure.ac, src/rasqal.h: 0.9.19 * rasqal.pc.in: Restore Requires: raptor ... * README.html: GIT 2010-02-14 Dave Beckett * Snapshotted rasqal_0_9_18 for 0.9.18 release * utils/Makefile.am: Add -lraptor to internal linking of utility and example programs. Added -lraptor to linking roqet, srxread and srxwrite so that on systems where indirect library symbols (here in libraptor) are not automatically found by looking up the base library (here librasqal), the programs work. This should not affect user programs that link with rasqal since they use pkg-config rasqal --libs or rasqal-config --libs both of which add -lraptor. See also Fedora bug 564885 for rasqal https://bugzilla.redhat.com/show_bug.cgi?id=564885 nd http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking https://fedoraproject.org/wiki/UnderstandingDSOLinkChange Fixes Issue#0000347 http://bugs.librdf.org/mantis/view.php?id=347 2010-02-13 Dave Beckett * src/rasqal.h: reorder to put query results methods together * src/rasqal_general.c: 2010 2010-02-12 Dave Beckett * src/rasqal.h: reorder to group query_results functions * src/rasqal_literal.c: (rasqal_literal_as_node): Return NULL rather than reswitch and die. * src/rasqal_literal.c: autodocs * src/rasqal_literal.c: (rasqal_literal_as_node): Let reswitch - variable values return a NULL value for an unbound variable. * src/sparql_lexer.l: (sparql_copy_string_token): copy language NUL * src/sparql_lexer.l: code style * src/rdql_lexer.l: code style * src/rasqal_prefix.c: add includes * src/Makefile.am: Add rasqal_prefix.c to lib * src/rasqal_result_formats.c: code style * src/rasqal_expr.c, src/rasqal_prefix.c: Move rasqal_prefix class to rasqal_prefix.c * src/Makefile.am, src/rasqal_data_graph.c, src/rasqal_expr.c: Move rasqal_data_graph class to rasqal_data_graph.c * src/Makefile.am, src/rasqal_expr.c, src/rasqal_triple.c: Move rasqal_triple class to rasqal_triple.c * ChangeLog, ChangeLog.7, Makefile.am: Add ChangeLog.7 for 2009 * .gitignore: do not ignore ChangeLog 2010-02-12 Lauri Aalto * .gitignore: ignore *.stackdump files * src/rasqal_general.c: raptor2 compatible rasqal_log_level_labels * src/rasqal_query_results.c: (rasqal_query_results_get_triple): break out of switch properly with raptor2. * tests/algebra/convert_graph_pattern.c, tests/engine/rasqal_construct_test.c, tests/engine/rasqal_graph_test.c, tests/engine/rasqal_limit_test.c, tests/engine/rasqal_order_test.c, tests/engine/rasqal_triples_test.c: Ported test code to raptor2 git HEAD with RAPTOR_V2_AVAILABLE flagging. * src/rasqal_algebra.c: raptor2 raptor_new_sequence() compatibility in test code. * utils/roqet.c: Ported roqet to raptor2 git HEAD with RAPTOR_V2_AVAILABLE flagging. * src/rdql_lexer.l, src/rdql_parser.y: RDQL parser/lexer: raptor2 raptor_uri calls * src/rasqal_raptor.c: (rasqal_raptor_new_triples_source): raptor2 statement_handler, generate_id_handler settings. Removed error_handler setting. (rasqal_raptor_statement_handler): Signature changed to accept non-const raptor_statement for raptor2. (rasqal_raptor_error_handler): Flagged out as unneeded with raptor2. * src/rasqal_raptor.c: (rasqal_raptor_error_handler): raptor2 raptor_locator_format() * src/rasqal_raptor.c: (raptor_statement_as_rasqal_triple): raptor2 compatible variant of the function 2010-02-11 Lauri Aalto * src/rasqal_raptor.c: (rasqal_raptor_new_triples_source): raptor2 raptor_new_parser() call * src/rasqal_algebra.c, src/rasqal_expr.c, src/rasqal_format_json.c, src/rasqal_format_sparql_xml.c, src/rasqal_format_sv.c, src/rasqal_general.c, src/rasqal_query.c, src/rasqal_query_test.c, src/rasqal_query_write.c, src/rasqal_result_formats.c, src/rasqal_row.c, src/rasqal_rowsource.c, src/rasqal_rowsource_graph.c, src/rasqal_rowsource_rowsequence.c, src/rasqal_rowsource_sort.c, src/rasqal_rowsource_triples.c, src/rasqal_variable.c, src/rasqal_xsd_datatypes.c, src/rdql_lexer.l, src/rdql_parser.y, src/sparql_lexer.l, src/sparql_parser.y: Work-in-progress to make rasqal compile with raptor2 git HEAD (with RAPTOR_V2_AVAILABLE defined). Changed RAPTOR_LOG_LEVEL_WARNING to RAPTOR_LOG_LEVEL_WARN Changed function call args: * raptor_uri calls * raptor_print_locator() -> raptor_locator_print() * raptor_new_sequence(): raptor_sequence_{free,print}_handler -> raptor_data_..._handler * raptor_qname_string_to_uri() * tests/.gitignore: ignore roqet.tmp in tests 2010-02-10 Dave Beckett * src/rasqal_literal.c: (rasqal_literal_divide): Make decimal division call rasqal_xsd_decimal_divide() not add! * src/Makefile.am, src/rasqal_formula.c, src/rasqal_literal.c: Added rasqal_formula.c for rasqal_formula class code * src/rasqal_variable.c: Revert "(rasqal_new_variable_from_variable): Do not copy NULL expression" This reverts commit 124173f9eddde4a57ed184ebd650418503d53e5b. * src/rasqal_rowsource_join.c: Revert "(rasqal_new_join_rowsource): Do not copy a NULL expr" This reverts commit f9e92a72533cd8432c78175e0d65dce3392951da. * src/rasqal_expr.c: (rasqal_new_expression_from_expression): Allow NULL arg again for the sake of code simplicity. * src/rasqal_variable.c: Revert "(rasqal_new_variable_from_variable): Do not try to copy NULL literal pointer." This reverts commit b1df8da1d6fadab183457ead62ab019eccde81ec. * src/rasqal_literal.c: (rasqal_new_literal_from_literal): Allow NULL arg again for the sake of code simplicity. * src/rasqal_variable.c: (rasqal_new_variable_from_variable): Do not try to copy NULL literal pointer. * src/rasqal_literal.c: More assertions for NULL args for literal class. Tidied internal autodocs. * src/rasqal_literal.c: (rasqal_new_decimal_literal_from_decimal): Remove assertions already checked in code * src/rasqal_literal.c: casts for literal class arg checking * src/rasqal_internal.h, src/rasqal_literal.c, src/sparql_parser.y: rasqal_new_formula() gains a world arg. * src/rasqal_literal.c: Code style: use var = ... calloc ( ... sizeof(*var) ) * docs/tmpl/section-row.sgml, docs/tmpl/section-variables-table.sgml: doc words * docs/rasqal-docs.xml, docs/rasqal-sections.txt, docs/tmpl/section-query_results.sgml, docs/tmpl/section-row.sgml, docs/tmpl/section-variable.sgml, docs/tmpl/section-variables-table.sgml: Update docs to add row and variables-table sections and new functions * src/rasqal_query_results.c: (rasqal_query_results_add_row): This is public. autodocs and check params 2010-02-10 Lauri Aalto * .gitignore: ignore .libs, *.exe * src/rasqal_raptor.c: raptor_uri * src/rasqal_query_results.c: (rasqal_query_results_get_triple): Construct raptor_statement using v2 raptor_terms. (rasqal_new_query_results): Init static raptor_statement. (rasqal_free_query_results): Free terms owned by static raptor_statement. 2010-02-09 Lauri Aalto * src/rasqal_algebra.c, src/rasqal_engine.c, src/rasqal_engine_sort.c, src/rasqal_expr.c, src/rasqal_feature.c, src/rasqal_format_sparql_xml.c, src/rasqal_format_table.c, src/rasqal_general.c, src/rasqal_graph_pattern.c, src/rasqal_internal.h, src/rasqal_literal.c, src/rasqal_map.c, src/rasqal_query.c, src/rasqal_query_results.c, src/rasqal_query_transform.c, src/rasqal_query_write.c, src/rasqal_raptor.c, src/rdql_lexer.l, src/sparql_lexer.l: Work-in-progress to make rasqal compile with raptor2 git HEAD (with RAPTOR_V2_AVAILABLE defined). (rasqal_escaped_name_to_utf8_string): Changed internal function signature to be compatible with both raptor1 and raptor2. (rasqal_query_results_get_triple): Construct raptor_statement using v2 raptor_terms. (rasqal_new_query_results): Init static raptor_statement. (rasqal_free_query_results): Free terms owned by static raptor_statement. Changed RAPTOR_LOG_LEVEL_WARNING to RAPTOR_LOG_LEVEL_WARN Changed function call args: * raptor_new_namespaces() * raptor_new_xml_writer() * raptor_new_qname(), raptor_new_qname_from_namespace_local_name() * raptor_qname_string_to_uri() * raptor_error_handlers_init() * raptor_new_sax2() * raptor_new_iostream_to_string(), raptor_new_iostream_to_file_handle() * raptor_uri calls * raptor_print_ntriples_string() * raptor_new_sequence(), raptor_sequence_{free,print}_handler -> raptor_data_..._handler * src/rasqal_general.c, src/rasqal_internal.h, src/rdql_lexer.l, src/sparql_lexer.l: (rasqal_escaped_name_to_utf8_string): Changed internal function signature to be compatible with both raptor1 and raptor2. 2010-02-09 Dave Beckett * src/rasqal_expr.c: (rasqal_new_prefix): Allow NULL prefix * src/rasqal_graph_pattern.c: (rasqal_new_graph_pattern_from_sequence): Allow NULL graph_patterns seq. * src/rasqal_variable.c: (rasqal_new_variable_from_variable): Do not copy NULL expression value. * src/rasqal_expr.c: (rasqal_expression_evaluate): Allow locator arg to be NULL. * src/rasqal_rowsource_join.c: (rasqal_new_join_rowsource): Do not copy a NULL expr * src/rasqal_expr.c, src/rasqal_graph_pattern.c, src/rasqal_result_formats.c: Add a lot of assertions for validating parameters are not NULL. * src/rasqal_feature.c, src/rasqal_general.c, src/rasqal_internal.h, src/rasqal_query.c, src/rasqal_query_results.c: Add a lot of assertions for validating parameters are not NULL. * tests/.gitignore: Ignore test output junk * utils/.gitignore: Ignore example exes * src/rasqal_format_json.c: (rasqal_query_results_write_json1): Work when query is NULL and take world from query results. * src/rasqal_internal.h, src/rasqal_query_results.c: Add rasqal_query_results_get_world() * utils/Makefile.am: Add examples target * utils/Makefile.am: Added srxwrite example to create a query results via API and write it * utils/srxwrite.c: Added srxwrite example to create a query results via API and write it * src/rasqal_query_results.c: (rasqal_query_results_get_binding_name): Use variables table to get projection order if there is no query * src/rasqal_format_sparql_xml.c, src/rasqal_row.c: Change rasqal_row_set_value_at semantics to copy the passed-in literal. (rasqal_row_set_value_at): Free any existing literal and copy the literal given. Update all callers to above semantics. * src/rasqal.h, src/rasqal_row.c, src/rasqal_rowsource_assignment.c, src/rasqal_rowsource_graph.c, src/rasqal_rowsource_join.c, src/rasqal_rowsource_project.c: Give row construct a world parameter like other constructors (rasqal_new_row_for_size): Gains world param. (rasqal_new_row_common): Gains world parameter. Update all callers. 2010-02-08 Lauri Aalto * src/rasqal_internal.h, src/rasqal_literal.c: (rasqal_literal_string_to_native): Deleted error_handler, error_data args from internal function - not used. * src/rasqal_format_sparql_xml.c: (rasqal_query_results_get_rowsource_sparql_xml): Removed redundant call to raptor_sax2_set_characters_handler(). * src/rasqal_algebra.c, src/rasqal_engine.c, src/rasqal_engine_sort.c, src/rasqal_format_sparql_xml.c, src/rasqal_format_table.c, src/rasqal_graph_pattern.c, src/rasqal_internal.h, src/rasqal_map.c, src/rasqal_query.c, src/rasqal_query_results.c, src/rasqal_query_transform.c: raptor_new_sequence(), raptor_sequence_{free,print}_handler -> raptor_data_..._handler * src/rasqal_literal.c: raptor_qname_string_to_uri() * src/rasqal_literal.c: raptor_print_ntriples_string() * src/rasqal_internal.h, src/rasqal_literal.c: (rasqal_literal_string_to_native): Deleted error_handler, error_data args from internal function - not used. * src/rasqal_algebra.c, src/rasqal_graph_pattern.c: raptor_new_iostream_to_file_handle() * src/rasqal_expr.c, src/rasqal_feature.c, src/rasqal_format_sparql_xml.c, src/rasqal_general.c, src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_query_write.c: raptor_uri * src/rasqal_format_table.c: raptor_new_iostream_to_string() * src/rasqal_format_sparql_xml.c: (rasqal_query_results_get_rowsource_sparql_xml): Removed redundant call to raptor_sax2_set_characters_handler(). * src/rasqal_format_sparql_xml.c: raptor_new_sax2() * src/rasqal_format_sparql_xml.c: raptor_error_handlers_init() * src/rasqal_format_sparql_xml.c: raptor_new_qname_from_namespace_local_name() * src/rasqal_format_sparql_xml.c: raptor_new_qname() * src/rasqal_format_sparql_xml.c: raptor_new_xml_writer() * src/rasqal_format_sparql_xml.c, src/rasqal_query.c, src/rasqal_query_write.c: raptor_new_namespaces() * src/rasqal_expr.c, src/rasqal_query.c, src/rasqal_query_results.c, src/rasqal_query_transform.c: RAPTOR_LOG_LEVEL_WARNING -> RAPTOR_LOG_LEVEL_WARN * src/rasqal_internal.h: raptor_simple_message_handler -> raptor_message_handler 2010-02-08 Dave Beckett * src/rasqal.h, src/rasqal_internal.h, src/rasqal_variable.c: Export rasqal_variables_table_add to public API. * utils/srxread.c: Use only public API. * src/rasqal.h, src/rasqal_internal.h, src/rasqal_query_results.c, src/rasqal_row.c, src/rasqal_variable.c: Export to public API functions and structs to allow creating standalone results rasqal_variables_table added to public API (opaque struct) rasqal_new_variables_table() and rasqal_free_variables_table() added to public API to make a variables table and free it. rasqal_query_results_type enum added to public API for use with rasqal_new_query_results(). rasqal_new_query_results() added to public API to create a static query result set. rasqal_query_results_add_row() added to public API to add a row to a static query result set. Adjust to return a failure status. rasqal_new_row_for_size(), rasqal_free_row() and rasqal_row_set_value_at() added to public API to make a row with literal values. Add docs plus argument and offset checking to rasqal_row_set_value_at(). * utils/srxread.c: #ws * utils/srxread.c: Use rasqal_new_query_results_formatter2 * docs/rasqal-docs.xml, docs/tmpl/section-data.sgml, docs/tmpl/section-expression.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-query_results_formatter.sgml, docs/tmpl/section-triple.sgml, docs/tmpl/section-updates.sgml, docs/tmpl/section-variable.sgml: Updated doc templates. Added section updates. * src/rasqal.h: rasqal_update_operation - autodocs for flags * src/rasqal_expr.c: rasqal_prefix_print - autodocs * docs/rasqal-sections.txt: Add section-updates * src/rasqal_query_results.c: autodocs * src/rasqal.h, src/rasqal_query_results.c: Added query read and write functions with name, mime type and format args. (rasqal_query_results_write2, rasqal_query_results_read2): Added with new name and mime_type args deprecating versions without the 2 suffix. * src/rasqal_query_results.c: Use rasqal_new_query_results_formatter2 in query results read/write methods. (rasqal_query_results_write, rasqal_query_results_read): Use rasqal_new_query_results_formatter2 with NULL name and mime type args. * utils/roqet.c, utils/srxread.c: Use rasqal_new_query_results_formatter2 in utilities * src/rasqal.h, src/rasqal_result_formats.c: Added rasqal_new_query_results_formatter2 with format name, mime type and URI args. (rasqal_new_query_results_formatter2): Added (rasqal_new_query_results_formatter, rasqal_new_query_results_formatter_by_mime_type): Deprecated for the above. * src/rasqal.h, src/rasqal_algebra.c, src/rasqal_internal.h, src/rasqal_literal.c, src/rasqal_map.c: Add status return code for literal, algebra node, map print methods. (rasqal_literal_print, rasqal_map_print, rasqal_algebra_node_print): Return int status. * src/rasqal_variable.c: autodocs * src/rasqal_expr.c: autodocs * src/rasqal_graph_pattern.c: autodocs * src/rasqal_expr.c: autodocs * src/rasqal_query_write.c: Update query writing for older laqrs insert/delete forms. (rasqal_query_write_sparql_20060406): Handles LAQRS INSERT/DELETE experimental forms. Add comments for what SPARQL 1.1 (Draft) Update forms are done. * tests/sparql/update/Makefile.am: insert-2.rq and delete-data-2.rq now pass 2010-02-07 Dave Beckett * src/rasqal_query_write.c: Format SPARQL Update 1.1 output (rasqal_query_write_sparql_triple_data): Added to help write triple data blocks - GP known to contain just triples. * src/sparql_parser.y: Set RASQAL_UPDATE_FLAGS_SILENT for CREATE / DROP SILENT * src/rasqal.h, src/rasqal_query.c, src/rasqal_query_results.c, src/rasqal_query_transform.c: Delete RASQAL_QUERY_VERB_CLEAR / CREATE / DROP / LOAD * src/sparql_parser.y: Use RASQAL_UPDATE_FLAGS_DATA to mark INSERT / DELETE DATA is using triples. * src/rasqal.h: Add RASQAL_UPDATE_FLAGS_DATA to rasqal_update_flags for triple data. * src/sparql_parser.y: Add UpdateOperationList to allow sequences of update operations * tests/sparql/update/Makefile.am: delete-2.rq passes * src/sparql_parser.y: (UpdateQuery): Use WhereClauseOpt to allow optional WHERE * tests/sparql/update/Makefile.am, tests/sparql/update/clear-1.rq, tests/sparql/update/clear-2.rq, tests/sparql/update/clear-3.rq, tests/sparql/update/create-1.rq, tests/sparql/update/create-2.rq, tests/sparql/update/delete-1.rq, tests/sparql/update/delete-2.rq, tests/sparql/update/delete-data-1.rq, tests/sparql/update/delete-data-2.rq, tests/sparql/update/drop-1.rq, tests/sparql/update/drop-2.rq, tests/sparql/update/insert-1.rq, tests/sparql/update/insert-2.rq, tests/sparql/update/insert-data-1.rq, tests/sparql/update/insert-delete-1.rq, tests/sparql/update/load-1.rq, tests/sparql/update/load-2.rq: Update tests from http://www.w3.org/TR/2010/WD-sparql11-update-20100126/ * tests/sparql/update/Makefile.am, tests/sparql/update/delete-data-2.rq: Add delete-data-2.rq from http://www.w3.org/TR/2010/WD-sparql11-update-20100126/ * src/rasqal.h, src/rasqal_internal.h, src/rasqal_update.c, src/sparql_parser.y: Each rasqal_update_operation can now do inserts and deletes in one. Remove update types insert, delete and merge into RASQAL_UPDATE_TYPE_UPDATE. Added enum RASQAL_UPDATE_FLAGS_SILENT for capturing SILENT from SPARQL update. rasqal_update_operation gains both an insert and delete set of templates. (rasqal_new_update_operation): Gains two templates args to replace one and a flags arg. Update callers to create one rasqal_update_operation instead of 1 or 2. * src/sparql_parser.y: Moved WITH ... INSERT/DELETE ... WHERE query into rasqal_update_operation form * src/rasqal.h, src/rasqal_graph_pattern.c, src/rasqal_internal.h, src/rasqal_update.c, src/sparql_parser.y: Added rasqal_new_basic_graph_pattern_from_triples() (rasqal_new_basic_graph_pattern_from_triples): Added to create a basic graph pattern form a sequence of triples. * src/sparql_parser.y: improve error message for beyond SPARQL 1.0 extensions. * src/sparql_parser.y: Write update operations into query updates Add update to lexer/parser union of type rasqal_update_operation. Add destructor for GraphTriples as type rasqal_update_operation Make all update queries return RASQAL_QUERY_VERB_UPDATE except for previously used RASQAL_QUERY_VERB_INSERT and RASQAL_QUERY_VERB_DELETE that are deprecated now. (GraphTriples) creates and returns an update operation. (InsertQuery, UpdateQuery, DeleteQuery, ClearQuery, DropQuery): Create updates rather than store in query structure directly. * src/rasqal_internal.h, src/rasqal_query.c: Remove query graph_uri and document_uri fields in preference to updates field. * src/rasqal_update.c: rasqal_new_update_operation args can be NULL for CLEAR. * src/rasqal.h, src/rasqal_update.c: Sort rasqal_update_type and fix labels * src/rasqal.h, src/rasqal_expr.c, src/rasqal_graph_pattern.c, src/rasqal_internal.h, src/rasqal_literal.c, src/rasqal_query.c, src/rasqal_row.c, src/rasqal_update.c, src/rasqal_variable.c: Debug print methods now return int status to match raptor_sequence_print_handler method. * src/sparql_parser.y: (LoadQuery): Store document and graph URIs in update operations. * src/rasqal_update.c: cast for malloc * src/rasqal.h, src/rasqal_internal.h, src/rasqal_query.c: Added rasqal_query_add_update_operation - internal for now * src/rasqal.h, src/rasqal_internal.h, src/rasqal_query.c: Add update reading methods to query class (rasqal_query_get_update_operations_sequence): Added to get sequence of updates. (rasqal_query_get_update_operation): Added to get an operation from sequence of updates. rasqal_query_s gains updates sequence field. (rasqal_free_query): Free updates sequence. (rasqal_query_print): Print updates * src/rasqal.h, src/rasqal_internal.h, src/rasqal_update.c: Add document_uri to rasqal_update_operation * src/Makefile.am, src/rasqal.h, src/rasqal_internal.h, src/rasqal_update.c: Add rasqal graph update type, structure and object functions Added rasqal_update_type enum for types of graph update Added rasqal_update_operation for holding an individual update (rasqal_update_type_label): Added to get label for update type. (rasqal_new_update_operation, rasqal_free_update_operation): Added constructor and destructor for update operation. (rasqal_update_operation_print): Added debug print method * src/rasqal_query.c: Add update operations to rasqal_query_verb_labels * src/rasqal.h, src/rasqal_query_results.c, src/rasqal_query_transform.c: Added RASQAL_QUERY_VERB_UPDATE for update operations rasqal_query_verb gains RASQAL_QUERY_VERB_UPDATE Update switch statements on this type to add new case. * src/sparql_parser.y: Restored LAQRS old INSERT and DELETE syntax with deprecated warnings. * tests/improve: allow recursive running of a test to skip dirs where it isn't supported * tests/sparql/update/Makefile.am: Mark insert-2.rq as expected to fail * src/sparql_parser.y: Revert "Improve ConstructTemplate and ConstructTriples rules" This reverts commit f3e05dc3d465ce12677fc2daa12c80dc4ffc278e. Get older tests to work at the cost of new test insert-2 failing. * src/sparql_parser.y: debug message fix * src/sparql_parser.y: Improve ConstructTemplate and ConstructTriples rules Down from expect 31 shift/reduce conflicts to 13 (ConstructTriplesRest): Added for second optional clause in ConstructTriples to reduce conflicts. * src/sparql_parser.y: Adjust comment - EXPLAIN is LAQRS, not in SPARQL 1.1 draft 2010-02-06 Dave Beckett * src/sparql_parser.y: Re-add SPARQL 1.1 WITH .. DELETE/INSERT From 5 shift/reduce conflicts to 31 shift/reduce conflicts - seems to be choices between two optional sequences of triples nearby. Add UpdateQuery option that (for now) marks it as an INSERT. (DeleteQuery): Switch to list of modify templates - which are discarded. (GraphTemplate): Added (ModifyTemplate, ModifyTemplateList): Added. (InsertQuery): Switch to list of modify templates - which are discarded. (UpdateQuery): Added for WITH alternatives. * src/sparql_parser.y: Split ConstructTriplesOpt into ConstructTriples and ConstructTriplesOpt (ConstructTriplesOpt): Moved empty case here (ConstructTriples): Added, calling ConstructTriplesOpt and handling a non-empty list of construct triples. The above makes ConstructTemplate closer to the SPARQL 1.0 grammar for construct triples. The difference is probably extra optional '.'s * src/sparql_parser.y: Revert to make existing sparql tests work Revert commits 83d66dd1c115b9f18b2043f13122630daad594d8 18ce2f8f3fc61dd641068f6ff5fddc01df4106bc so that the older SPARQL tests work. This makes the SPARQL 1.1 draft insert & delete forms tests fail. * tests/improve: truncate log to 15 lines only if too long * tests/rdql/testsuite/check-rdql: (toDebug): Discard @lang from "string"@lang^^datatype * tests/rdql/testsuite/check-rdql: #2010 * .gitignore: Remove rdf files from top level .gitignore * docs/tmpl/section-query.sgml, docs/tmpl/section-variable.sgml: updated generated docs * tests/sparql/update/data.ttl: Data for sparql update test * RELEASE.html: 0.9.18 * src/rasqal_algebra.c, src/rasqal_expr.c, src/rasqal_graph_pattern.c, src/rasqal_query.c, src/rasqal_rowsource.c, src/rasqal_variable.c: Use FILE* for autodocs not #FILE* * src/rasqal.h: rasqal_data_graph autodocs * src/rasqal_literal.c: rasqal_literal_print_type autodocs * src/rasqal.h: rasqal_data_graph autodocs * src/rasqal_literal.c: rasqal_literal_print autodocs * src/rasqal_query.c: remove autodocs indicator * src/rasqal_query_results.c: remove autodocs indicator * src/rasqal_general.c: rasqal_query_set_default_generate_bnodeid_parameters autodocs * src/rasqal_engine.c: remove autodocs indicator * .gitignore, RELEASE.html, autogen.sh, build/.gitignore, build/shave-libtool.in, build/shave.in, build/shave.m4, configure.ac: Use AM_SILENT_RULES and move autotools helper files to build/ dir Update autogen.sh with latest version; dependent on automake 1.11 and it's dependencies to get AM_SILENT_RULES. Update configure.ac to invoke AM_SILENT_RULES defaulting to 'no'. Delete SHAVE. * NEWS.html, configure.ac, src/rasqal.h: Bumped version to 0.9.18 * src/sparql_lexer.l: Make sparql_token_free static * src/rasqal.h: Add user_data field to rasqal_variable. rasqal_variable gains user_data field. Fixes Issue#0000320 http://bugs.librdf.org/mantis/view.php?id=320 * src/rasqal_format_json.c: Use application/json for JSON results format mime type (rasqal_init_result_format_json): Register mime type application/json instead of text/json for JSON results format. Fixes Issue#0000323 http://bugs.librdf.org/mantis/view.php?id=323 2010-02-05 Dave Beckett * src/rasqal_format_sv.c: Give CSV and TSV query result formats mime types and URIs (rasqal_init_result_format_sv): Register result format 'csv' with URI http://www.ietf.org/rfc/rfc4180.txt and result format 'tsv' with mime type text/tab-separated-values and URI http://www.iana.org/assignments/media-types/text/tab-separated-valuesValues taken from Issue#0000345. Fixes Issue#0000345 http://bugs.librdf.org/mantis/view.php?id=345 2010-02-05 Lauri Aalto * src/rasqal_format_table.c: (rasqal_init_result_format_table): Fixed typo in result format MIME type. Fixes Issue #0000343 http://bugs.librdf.org/mantis/view.php?id=343 2010-02-01 Dave Beckett * configure.ac: Set and enforce raptor max version of <= 1.8.99 2010-01-31 Dave Beckett * src/sparql_lexer.l: Make sparql_token_free usable outside this module. 2010-01-24 Dave Beckett * rasqal.pc.in: Use pkg-config (undocumented) Requires.private for raptor 2010-01-19 Dave Beckett * src/sparql_parser.y: Alter DELETE to take a list of templates (sub-graphs) to delete. * src/sparql_parser.y: make WITH DELETE ... INSERT ... WHERE .. SPARQL 1.1 update (draft) work Because the grammar is ambiguous in several places and unstable, in this grammar WITH is required, not optional as the grammar makes it. Shift/reduce conflicts goes from 5 to 13 probably because of insert/delete ambiguity. (ConstructTriples): Added; was part of ConstructTriplesOpt (GraphTemplate): Added. (ModifyTemplate, ModifyTemplateList): To form list of graphs to update. This data is thrown away now, not stored. (UpdateQuery): Added but pretending to be INSERT verb. Only supports WITH DELETE { ... } INSERT { ... } WHERE ... form with no optional WITH; otherwise this is even more ambiguous. * tests/sparql/update/insert-1.rq: ws * src/sparql_lexer.l, src/sparql_parser.y: Add SPARQL 1.1 update draft LOAD [ INTO ] Added INTO keyword to sparql lexer (LoadQuery): Added with the two forms, storing the document URI as well as the optional graph URI * src/rasqal_internal.h, src/rasqal_query.c: Add document_uri field to rasqal_query for SPARQL 1.1 update LOAD document URI * src/rasqal.h, src/rasqal_query_results.c, src/rasqal_query_transform.c: Add RASQAL_QUERY_VERB_LOAD for SPARQL 1.1 update draft LOAD command * src/sparql_parser.y: Code style - break lines and whitespace * src/sparql_parser.y: Code style - break lines, whitespace, move seq size out of loops. * src/sparql_parser.y: Code style - break long lines. * src/sparql_parser.y: Add DELETE triples syntax from SPARQL 1.1 update draft (DeleteQuery): Add DELETE DATA { triples} form, storing the triples to delete in the rasqal_query constructs field, for now. * src/sparql_parser.y: Add INSERT triples syntax from SPARQL 1.1 update draft (GraphTriples): Added to turn a block of triples with optional graph URI into query structure. The insert triples are stored in the query construct triples field. (InsertQuery): Allow SPARQL 1.1 update draft form inserting a set of triples with INSERT DATA { triples }. (GraphpatternListOpt): Fix error message label * src/sparql_parser.y: Add CREATE and DROP syntax from SPARQL 1.1 update draft * src/rasqal.h, src/rasqal_query_results.c, src/rasqal_query_transform.c: Add RASQAL_QUERY_VERB_CREATE and RASQAL_QUERY_VERB_DROP for SPARQL 1.1 update draft * src/sparql_parser.y: Added SPARQL 1.1 Update CLEAR & CLEAR GRAPH (ClearQuery): Added. Stores graph URI when given, in rasqal_query field graph_uri. * tests/sparql/update/Makefile.am: Use -i laqrs in testing for now * src/sparql_lexer.l: (sparql_token_print): Add missing tokens * src/rasqal_internal.h, src/rasqal_query.c: rasqal_query gains graph_uri field for storing CLEAR/DROP graph uri * src/rasqal.h, src/rasqal_query_results.c, src/rasqal_query_transform.c: Added RASQAL_QUERY_VERB_CLEAR for SPARQL 1.1 update CLEAR verb * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update LOAD keyword * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update DROP keyword * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update DATA keyword * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update SILENT keyword * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update CREATE keyword * src/sparql_lexer.l, src/sparql_parser.y: Added SPARQL 1.1 Update CLEAR keyword * configure.ac, tests/sparql/Makefile.am, tests/sparql/update/Makefile.am, tests/sparql/update/bad-1.rq, tests/sparql/update/clear-1.rq, tests/sparql/update/clear-2.rq, tests/sparql/update/clear-3.rq, tests/sparql/update/create-1.rq, tests/sparql/update/create-2.rq, tests/sparql/update/delete-1.rq, tests/sparql/update/delete-data-1.rq, tests/sparql/update/drop-1.rq, tests/sparql/update/drop-2.rq, tests/sparql/update/insert-1.rq, tests/sparql/update/insert-2.rq, tests/sparql/update/insert-data-1.rq, tests/sparql/update/insert-delete-1.rq, tests/sparql/update/load-1.rq, tests/sparql/update/load-2.rq: Add SPARQL 1.1 Update tests * src/sparql_lexer.l, src/sparql_parser.y: Added WITH keyword to SPARQL 1.1 (draft) / LAQRS 2010-01-06 Dave Beckett * LICENSE.html: 2010 * TODO.html: 2010 * INSTALL.html: 2010 * RELEASE.html: 2010 * README.html: 2010 * NEWS.html: 2010 2010-01-02 Dave Beckett * tests/engine/.gitignore: Ignore deps * docs/tmpl/.gitignore: Update another .gitignore * .gitignore, build/.gitignore, docs/.gitignore, src/.gitignore, tests/algebra/.gitignore, tests/engine/.gitignore, utils/.gitignore: Add .gitignore to replace SVN properties svn:ignore