From dave at dajobe.org Wed Jan 4 13:41:49 2012 From: dave at dajobe.org (Dave Beckett) Date: Wed, 4 Jan 2012 10:41:49 -0800 (PST) Subject: [redland-dev] redland-dev test message - list service has moved Message-ID: Just checking the new list server is working. Please ignore Dave From richard at ex-parrot.com Thu Jan 5 13:06:26 2012 From: richard at ex-parrot.com (Richard Smith) Date: Thu, 5 Jan 2012 18:06:26 +0000 (GMT) Subject: [redland-dev] Entities in RDFa Message-ID: There was a thread last June about XML entities in RDF: http://lists.librdf.org/pipermail/redland-dev/2011-June/002306.html The conclusion seemed to be that they were rarely used and not high on the list of things to support. However, I've come across situation in RDFa instead of RDF where the use of entities is much more common practice. Here is a complete test case: Test

This page was written by José.

Other than the declaration of the dc namespace, this is entirely valid XML and similar examples are found all over the web. However rapper parses it incorrectly because of the entity in the RDF literal: richard at nevis:~$ rapper --version 2.0.6 richard at nevis:~$ rapper -q -i rdfa test.html rapper: Error - - XML parser error: Entity 'eacute' not defined "Jos"@en . Note the missing e-acute in the name. I think fixing this (at least of builds using libxml2) is as simple as adding the XML_PARSE_DTDLOAD flag to libxml_options in raptor_grddl.c and raptor_sax2.c. Probably it should be done by way of a new raptor option that by default is disabled, much like RAPTOR_OPTION_NO_NET is. Does this seem a worthwhile change? And would it help if I knocked up a patch for it? On an unrelated issue, the property attribute in RDFa is defined as a CURI rather than a QName. In other words ought to be equivalent to but it seems that full URIs are not supported, only QNames. I'm not necessarily volunteering to write a patch for that as it's not inconveniencing me too much, but I thought I'd report it anyway. (The advantage of full URIs is that they can make the document valid against the DTD.) Richard From benno at iri.columbia.edu Thu Jan 5 13:25:55 2012 From: benno at iri.columbia.edu (Benno Blumenthal) Date: Thu, 5 Jan 2012 13:25:55 -0500 Subject: [redland-dev] Entities in RDFa In-Reply-To: References: Message-ID: Unfortunately w3c frequently chooses not to serve their documents, i.e. there is w3c policy of rejecting requests when it is too much for their servers. So while this makes sense in theory, in practice loading the DTD can destroy performance. How w3c can get away with this, I don't really understand, but it is our current reality. Benno On Thu, Jan 5, 2012 at 1:06 PM, Richard Smith wrote: > > There was a thread last June about XML entities in RDF: > > http://lists.librdf.org/**pipermail/redland-dev/2011-**June/002306.html > > The conclusion seemed to be that they were rarely used and not high on the > list of things to support. > > However, I've come across situation in RDFa instead of RDF where the use > of entities is much more common practice. Here is a complete test case: > > > "http://www.w3.org/MarkUp/DTD/**xhtml-rdfa-1.dtd > "> > version="XHTML+RDFa 1.0" xml:lang="en"> > > Test > > >

This page was written by > property="dc:creator">Jos&**eacute;.

> > > > Other than the declaration of the dc namespace, this is entirely valid XML > and similar examples are found all over the web. However rapper parses it > incorrectly because of the entity in the RDF literal: > > richard at nevis:~$ rapper --version > 2.0.6 > > richard at nevis:~$ rapper -q -i rdfa test.html > rapper: Error - - XML parser error: Entity 'eacute' not defined > > > > "Jos"@en . > > Note the missing e-acute in the name. > > I think fixing this (at least of builds using libxml2) is as simple as > adding the XML_PARSE_DTDLOAD flag to libxml_options in raptor_grddl.c and > raptor_sax2.c. Probably it should be done by way of a new raptor option > that by default is disabled, much like RAPTOR_OPTION_NO_NET is. > > Does this seem a worthwhile change? And would it help if I knocked up a > patch for it? > > > > On an unrelated issue, the property attribute in RDFa is defined as a CURI > rather than a QName. In other words > > > > ought to be equivalent to > > property="dc:creator"> > > but it seems that full URIs are not supported, only QNames. I'm not > necessarily volunteering to write a patch for that as it's not > inconveniencing me too much, but I thought I'd report it anyway. (The > advantage of full URIs is that they can make the document valid against the > DTD.) > > Richard > ______________________________**_________________ > redland-dev mailing list > redland-dev at lists.librdf.org > http://lists.librdf.org/**mailman/listinfo/redland-dev > -- Dr. M. Benno Blumenthal benno at iri.columbia.edu International Research Institute for climate and society The Earth Institute at Columbia University Lamont Campus, Palisades NY 10964-8000 (845) 680-4450 -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard at ex-parrot.com Thu Jan 5 17:34:28 2012 From: richard at ex-parrot.com (Richard Smith) Date: Thu, 5 Jan 2012 22:34:28 +0000 (GMT) Subject: [redland-dev] Entities in RDFa In-Reply-To: References: Message-ID: Benno Blumenthal wrote: > Unfortunately w3c frequently chooses not to serve their > documents, i.e. there is w3c policy of rejecting requests > when it is too much for their servers. I think they almost always just delay for 30s before serving the DTD. If you *really* need it, you'll eventually get it. But that shouldn't matter as that's what SGML/XML catalogues are for, and libxml2 has transparent support for them. For example, on a typical Debian system, if you have the w3c-sgml-lib package installed, it won't go near the W3C servers if you fetch the DTD. But I'm not proposing to make fetching the DTD the default: rather I'm proposing to add an parser option so users can choose to have that behaviour if they need it. And I would add a corresponding --loaddtd option to rapper to enable it. Richard From richard at ex-parrot.com Fri Jan 6 05:54:50 2012 From: richard at ex-parrot.com (Richard Smith) Date: Fri, 6 Jan 2012 10:54:50 +0000 (GMT) Subject: [redland-dev] Entities in RDFa In-Reply-To: References: Message-ID: Richard Smith wrote: > I think fixing this (at least of builds using libxml2) is as simple as adding > the XML_PARSE_DTDLOAD flag to libxml_options in raptor_grddl.c and > raptor_sax2.c. Probably it should be done by way of a new raptor option that > by default is disabled, much like RAPTOR_OPTION_NO_NET is. > > Does this seem a worthwhile change? And would it help if I knocked up a > patch for it? The attached patch implements this via a new raptor parse option called 'loadDTD'. The default behaviour is unchanged. Could someone more familiar with the code confirm that I have got the correct raptor_option_area values for the new option in raptor_option.c? I'm not really sure I properly understand what RAPTOR_OPTION_AREA_PARSER is for. (If this list strips attachments, there won't be a lot of point to this message...) Richard -------------- next part -------------- diff -ur raptor2-2.0.6/configure.ac raptor2-2.0.6+patch/configure.ac --- raptor2-2.0.6/configure.ac 2011-11-24 07:15:15.000000000 +0000 +++ raptor2-2.0.6+patch/configure.ac 2012-01-06 01:51:56.815669830 +0000 @@ -700,6 +700,16 @@ AC_CHECK_FUNCS(xmlSAX2InternalSubset xmlCtxtUseOptions) + AC_MSG_CHECKING(if libxml has parser option XML_PARSE_DTDLOAD) + AC_TRY_LINK([ +#ifdef HAVE_LIBXML_PARSER_H +#include +#endif +], [xmlParserOption foo; foo = XML_PARSE_DTDLOAD], + AC_MSG_RESULT(yes) + AC_DEFINE(RAPTOR_LIBXML_XML_PARSE_DTDLOAD, 1, [does libxml have XML_PARSE_DTDLOA]), + AC_MSG_RESULT(no)) + AC_MSG_CHECKING(if libxml has parser option XML_PARSE_NONET) AC_TRY_LINK([ #ifdef HAVE_LIBXML_PARSER_H diff -ur raptor2-2.0.6/librdfa/rdfa.c raptor2-2.0.6+patch/librdfa/rdfa.c --- raptor2-2.0.6/librdfa/rdfa.c 2011-08-22 07:05:56.000000000 +0100 +++ raptor2-2.0.6+patch/librdfa/rdfa.c 2012-01-06 09:59:25.158089322 +0000 @@ -1218,6 +1218,18 @@ rdfa_init_context(context); #ifdef LIBRDFA_IN_RAPTOR + /* Optionally forbid network requests in the XML parser */ + raptor_sax2_set_option(context->sax2, + RAPTOR_OPTION_NO_NET, NULL, + RAPTOR_OPTIONS_GET_NUMERIC(context, RAPTOR_OPTION_NO_NET)); + + /* Optionally force DTD loads in the XML parser */ + raptor_sax2_set_option(context->sax2, + RAPTOR_OPTION_LOAD_DTD, NULL, + RAPTOR_OPTIONS_GET_NUMERIC(context, RAPTOR_OPTION_LOAD_DTD)); +#endif + +#ifdef LIBRDFA_IN_RAPTOR context->base_uri=raptor_new_uri(context->sax2->world, (const unsigned char*)context->base); raptor_sax2_parse_start(context->sax2, context->base_uri); #endif diff -ur raptor2-2.0.6/librdfa/rdfa.h raptor2-2.0.6+patch/librdfa/rdfa.h --- raptor2-2.0.6/librdfa/rdfa.h 2011-04-26 19:16:35.000000000 +0100 +++ raptor2-2.0.6+patch/librdfa/rdfa.h 2012-01-06 10:03:37.046101513 +0000 @@ -233,6 +233,8 @@ raptor_sax2* sax2; raptor_namespace_handler namespace_handler; void* namespace_handler_user_data; + raptor_object_options options; + #else XML_Parser parser; #endif diff -ur raptor2-2.0.6/src/raptor2.h.in raptor2-2.0.6+patch/src/raptor2.h.in --- raptor2-2.0.6/src/raptor2.h.in 2011-11-27 17:36:30.000000000 +0000 +++ raptor2-2.0.6+patch/src/raptor2.h.in 2012-01-06 02:04:21.895705896 +0000 @@ -494,6 +494,7 @@ * @RAPTOR_OPTION_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11) * @RAPTOR_OPTION_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration. * @RAPTOR_OPTION_NO_NET: Deny network requests. + * @RAPTOR_OPTION_LOAD_DTD: Load document DTDs. * @RAPTOR_OPTION_RESOURCE_BORDER: Border color of resource * nodes for GraphViz DOT serializer. * @RAPTOR_OPTION_LITERAL_BORDER: Border color of literal nodes @@ -568,7 +569,8 @@ RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_WWW_CERT_TYPE, RAPTOR_OPTION_WWW_CERT_PASSPHRASE, - RAPTOR_OPTION_LAST = RAPTOR_OPTION_WWW_CERT_PASSPHRASE + RAPTOR_OPTION_LOAD_DTD, + RAPTOR_OPTION_LAST = RAPTOR_OPTION_LOAD_DTD } raptor_option; diff -ur raptor2-2.0.6/src/raptor_config.h.in raptor2-2.0.6+patch/src/raptor_config.h.in --- raptor2-2.0.6/src/raptor_config.h.in 2011-11-24 07:15:46.000000000 +0000 +++ raptor2-2.0.6+patch/src/raptor_config.h.in 2012-01-06 01:55:06.359679001 +0000 @@ -196,6 +196,9 @@ /* does libxml xmlSAXHandler have initialized field */ #undef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED +/* does libxml have XML_PARSE_DTDLOAD */ +#undef RAPTOR_LIBXML_XML_PARSE_DTDLOAD + /* does libxml have XML_PARSE_NONET */ #undef RAPTOR_LIBXML_XML_PARSE_NONET diff -ur raptor2-2.0.6/src/raptor_grddl.c raptor2-2.0.6+patch/src/raptor_grddl.c --- raptor2-2.0.6/src/raptor_grddl.c 2011-08-31 20:53:24.000000000 +0100 +++ raptor2-2.0.6+patch/src/raptor_grddl.c 2012-01-06 02:07:42.351715591 +0000 @@ -878,6 +878,10 @@ if(RAPTOR_OPTIONS_GET_NUMERIC(xpbc->rdf_parser, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif +#ifdef RAPTOR_LIBXML_XML_PARSE_DTDLOAD + if(RAPTOR_OPTIONS_GET_NUMERIC(xpbc->rdf_parser, RAPTOR_OPTION_LOAD_DTD)) + libxml_options |= XML_PARSE_DTDLOAD; +#endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif @@ -1439,6 +1443,10 @@ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif +#ifdef RAPTOR_LIBXML_XML_PARSE_DTDLOAD + if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_DTD)) + libxml_options |= XML_PARSE_DTDLOAD; +#endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(grddl_parser->xml_ctxt, libxml_options); #endif @@ -1488,6 +1496,10 @@ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) options |= HTML_PARSE_NONET; #endif +#ifdef RAPTOR_LIBXML_XML_PARSE_DTDLOAD + if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_DTD)) + options |= XML_PARSE_DTDLOAD; +#endif htmlCtxtUseOptions(grddl_parser->html_ctxt, options); diff -ur raptor2-2.0.6/src/raptor_librdfa.c raptor2-2.0.6+patch/src/raptor_librdfa.c --- raptor2-2.0.6/src/raptor_librdfa.c 2011-10-21 21:41:16.000000000 +0100 +++ raptor2-2.0.6+patch/src/raptor_librdfa.c 2012-01-06 10:05:44.150107663 +0000 @@ -267,6 +267,8 @@ /* returns RDFa Processing Graph error triples - not used by raptor */ rdfa_set_processor_graph_triple_handler(librdfa_parser->context, NULL); + librdfa_parser->context->options = rdf_parser->options; + rc = rdfa_parse_start(librdfa_parser->context); if(rc != RDFA_PARSE_SUCCESS) return 1; diff -ur raptor2-2.0.6/src/raptor_option.c raptor2-2.0.6+patch/src/raptor_option.c --- raptor2-2.0.6/src/raptor_option.c 2011-08-01 03:02:22.000000000 +0100 +++ raptor2-2.0.6+patch/src/raptor_option.c 2012-01-06 09:40:28.342034303 +0000 @@ -277,6 +277,12 @@ RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwCertPassphrase", "SSL client certificate passphrase" + }, + { RAPTOR_OPTION_LOAD_DTD, + (raptor_option_area)(RAPTOR_OPTION_AREA_PARSER | RAPTOR_OPTION_AREA_SAX2), + RAPTOR_OPTION_VALUE_TYPE_BOOL, + "loadDTD", + "Parsers and SAX2 XML Parser should load DTDs." } }; diff -ur raptor2-2.0.6/src/raptor_rdfxml.c raptor2-2.0.6+patch/src/raptor_rdfxml.c --- raptor2-2.0.6/src/raptor_rdfxml.c 2011-10-21 21:41:16.000000000 +0100 +++ raptor2-2.0.6+patch/src/raptor_rdfxml.c 2012-01-06 02:09:14.807720071 +0000 @@ -1001,6 +1001,11 @@ raptor_sax2_set_option(rdf_xml_parser->sax2, RAPTOR_OPTION_NO_NET, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)); + + /* Optionally force DTD loads in the XML parser */ + raptor_sax2_set_option(rdf_xml_parser->sax2, + RAPTOR_OPTION_LOAD_DTD, NULL, + RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_DTD)); raptor_sax2_parse_start(rdf_xml_parser->sax2, uri); diff -ur raptor2-2.0.6/src/raptor_rss.c raptor2-2.0.6+patch/src/raptor_rss.c --- raptor2-2.0.6/src/raptor_rss.c 2011-08-31 20:53:24.000000000 +0100 +++ raptor2-2.0.6+patch/src/raptor_rss.c 2012-01-06 02:11:18.495726048 +0000 @@ -249,6 +249,11 @@ raptor_sax2_set_option(rss_parser->sax2, RAPTOR_OPTION_NO_NET, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)); + + /* Optionally force DTD loads in the XML parser */ + raptor_sax2_set_option(rss_parser->sax2, + RAPTOR_OPTION_LOAD_DTD, NULL, + RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_DTD)); raptor_sax2_parse_start(rss_parser->sax2, uri); diff -ur raptor2-2.0.6/src/raptor_sax2.c raptor2-2.0.6+patch/src/raptor_sax2.c --- raptor2-2.0.6/src/raptor_sax2.c 2011-11-27 17:36:30.000000000 +0000 +++ raptor2-2.0.6+patch/src/raptor_sax2.c 2012-01-06 10:06:33.994110079 +0000 @@ -518,6 +518,10 @@ if(RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif +#ifdef RAPTOR_LIBXML_XML_PARSE_DTDLOAD + if(RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_LOAD_DTD)) + libxml_options |= XML_PARSE_DTDLOAD; +#endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif diff -ur raptor2-2.0.6/src/raptor_turtle_writer.c raptor2-2.0.6+patch/src/raptor_turtle_writer.c --- raptor2-2.0.6/src/raptor_turtle_writer.c 2011-11-12 21:18:03.000000000 +0000 +++ raptor2-2.0.6+patch/src/raptor_turtle_writer.c 2012-01-06 02:11:56.555727893 +0000 @@ -704,6 +704,7 @@ /* Shared */ case RAPTOR_OPTION_NO_NET: + case RAPTOR_OPTION_LOAD_DTD: /* XML writer options */ case RAPTOR_OPTION_RELATIVE_URIS: From mantis-bug-sender at librdf.org Mon Jan 16 21:38:53 2012 From: mantis-bug-sender at librdf.org (Mantis Bug Tracker) Date: Tue, 17 Jan 2012 02:38:53 +0000 Subject: [redland-dev] [Raptor RDF Syntax Library 0000488]: Turtle parser does not return error status from turtle_parse_chunk() Message-ID: <5921748c34b9d779061135de6f6e9fe6@bugs.librdf.org> The following issue has been SUBMITTED. ====================================================================== http://bugs.librdf.org/mantis/view.php?id=488 ====================================================================== Reported By: Dave Beckett Assigned To: Dave Beckett ====================================================================== Project: Raptor RDF Syntax Library Issue ID: 488 Category: api Reproducibility: always Severity: minor Priority: normal Status: assigned Syntax Name: turtle ====================================================================== Date Submitted: 2012-01-17 02:38 Last Modified: 2012-01-17 02:38 ====================================================================== Summary: Turtle parser does not return error status from turtle_parse_chunk() Description: Expected to return non-0 after encountering an error during a chunk parse. Actually always returns 0. [This may also affect rdfxml and other parsers] Steps to Reproduce: gcc -ggdb -Wall `redland-config --cflags --libs` -o parse_error parse_error.c $ ./parse_error [error] {Raptor} syntax error at 'a' Return value: 0 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-01-17 02:38 Dave Beckett New Issue 2012-01-17 02:38 Dave Beckett Status new => assigned 2012-01-17 02:38 Dave Beckett Assigned To => Dave Beckett 2012-01-17 02:38 Dave Beckett File Added: parse_error.c ====================================================================== From swilsak at vmware.com Wed Jan 18 18:22:10 2012 From: swilsak at vmware.com (Sarah (Sally) Wilsak) Date: Wed, 18 Jan 2012 15:22:10 -0800 Subject: [redland-dev] SPARQL queries with filters cause Redland Python bindings to crash Message-ID: <4F175422.5020009@vmware.com> Hi, I'm trying to evaluate whether Redland (with the BDB backend) would be a good choice for one of our products. While I was testing some more realistic queries, I started getting some odd crashes at a much lower number of triples than we'd like to be able to support. I have Redland/Redland Language Bindings 1.0.13.1, Raptor 2.0.0 and Rasqal 0.9.22 built on 32-bit Linux. If I run the following script with Python 2.6: import RDF storage = RDF.HashStorage("thing", options="hash-type='memory'") model = RDF.Model(storage) lubmNS = RDF.NS("http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#") univNS = RDF.NS("http://www.universityName.edu/") for x in xrange(0, 8000): prof = univNS["Professor%s" % x] ta = univNS["TeachingAssistant%s" % x] paper = univNS["Paper%s" % x] profType = lubmNS.Professor taType = lubmNS.TeachingAssistant paperType = lubmNS.Paper worksFor = lubmNS.WorksFor writtenBy = lubmNS.WrittenBy rdfType = RDF.Node(RDF.Uri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")) model.append(RDF.Statement(ta, worksFor, prof)) model.append(RDF.Statement(paper, writtenBy, prof)) model.append(RDF.Statement(prof, rdfType, profType)) model.append(RDF.Statement(ta, rdfType, taType)) model.append(RDF.Statement(paper, rdfType, paperType)) print "Initialized Model" query = """ SELECT DISTINCT ?target ?type WHERE { { ?target a ?type ; ?reln ?obj . FILTER ( regex(str(?obj), "Professor", "i") ) } FILTER ( ?type != ) }""" print "Querying..." results = model.execute(RDF.SPARQLQuery(query)) print "Results: %s" % results I get the following output: $ python quick_test.py Initialized Model Querying... librdf error - digest SHA1 already registered librdf error - hash memory already registered librdf error - model storage already registered librdf error - storage hashes already registered librdf error - storage trees already registered librdf error - storage memory already registered librdf error - storage file already registered librdf error - storage uri already registered librdf error - query language sparql11 already registered librdf error - query language sparql11-query already registered librdf error - query language sparql11-update already registered librdf error - query language sparql already registered Traceback (most recent call last): File "quick_test.py", line 38, in results = model.execute(RDF.SPARQLQuery(query)) File "/usr/lib/python2.6/dist-packages/RDF.py", line 1156, in execute results = Redland.librdf_model_query_execute(self._model,query._query) RDF.RedlandError: 'digest MD5 already registered' I've tried this with the hashed memory storage as above and with the BDB storage, with the same results. If anyone on this list has some idea of what's happening here, I would be very happy for the insight. Thanks, Sally From lorenae at fing.edu.uy Mon Jan 23 05:23:02 2012 From: lorenae at fing.edu.uy (lorena) Date: Mon, 23 Jan 2012 08:23:02 -0200 Subject: [redland-dev] SPARQL Query Execution test fails under Rasqal 0.9.28 and Ubuntu 10.10 Message-ID: Hi I'm new to Redland libraries and I'm trying to install them on Ubuntu 10.10 First, I've installed Raptor 2.0.6 and then, when I install Rasqal 0.9.28 I receive the following message when performing make check Any clues on this issue? regards Lorena improve: Running testsuites sparql-lexer sparql-parser sparql-query in /home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple Running testsuite sparql-lexer: SPARQL legal lexing .... Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Running testsuite sparql-parser: SPARQL legal parsing .... Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Running testsuite sparql-query: SPARQL Query Execution FFFF Failed tests: dawg-triple-pattern-001 dawg-triple-pattern-002 dawg-triple-pattern-003 dawg-triple-pattern-004 Passed: 0 Failed: 4 Skipped: 0 Xfailed: 0 Uxpassed: 0 Testsuites summary: Failed tests: dawg-triple-pattern-001 dawg-triple-pattern-002 dawg-triple-pattern-003 dawg-triple-pattern-004 Passed: 8 Failed: 4 Skipped: 0 Xfailed: 0 Uxpassed: 0 make[4]: *** [check-local] Error 1 make[4]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' make[3]: *** [check-am] Error 2 make[3]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests' make: *** [check-recursive] Error 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at dajobe.org Mon Jan 23 13:18:01 2012 From: dave at dajobe.org (Dave Beckett) Date: Mon, 23 Jan 2012 10:18:01 -0800 (PST) Subject: [redland-dev] SPARQL Query Execution test fails under Rasqal 0.9.28 and Ubuntu 10.10 In-Reply-To: References: Message-ID: It's hard to say because this particular test isn't very verbose. Since it's the first test run, it might be that the test runner can't work, which is typically because the Perl XML::Parser module is missing. When the libraries are installed, you don't need it. I'm slowly working to remove this as a requirement. Try this to check: $ perl -MXML::Parser -e 'exit 0' If it gives an error, you'll have to install it. On my debian it's in libxml-parser-perl so $ sudo apt-get install libxml-parser-perl Otherwise, try adding the verbose flag to the test runner and maybe it'll give the error This is a pass: $ cd tests/sparql/simple $ perl ../../improve -v improve: Running testsuites sparql-lexer sparql-parser sparql-query in /Users/dajobe/dev/redland/rasqal/tests/sparql/simple Running testsuite sparql-lexer: SPARQL legal lexing dawg-tp-01.rq: pass dawg-tp-02.rq: pass dawg-tp-03.rq: pass dawg-tp-04.rq: pass Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Running testsuite sparql-parser: SPARQL legal parsing dawg-tp-01.rq: pass dawg-tp-02.rq: pass dawg-tp-03.rq: pass dawg-tp-04.rq: pass Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Running testsuite sparql-query: SPARQL Query Execution dawg-triple-pattern-001: pass dawg-triple-pattern-002: pass dawg-triple-pattern-003: pass dawg-triple-pattern-004: pass Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Testsuites summary for dir /Users/dajobe/dev/redland/rasqal/tests/sparql/simple: Passed: 12 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 Result status: pass Dave On Mon, 23 Jan 2012, lorena wrote: > Hi > > I'm new to Redland libraries and I'm trying to install them on Ubuntu 10.10 > > First, I've installed Raptor 2.0.6 and then, when I install Rasqal 0.9.28 I > receive the following message when performing make check > Any clues on this issue? > > regards > Lorena > > > improve: Running testsuites sparql-lexer sparql-parser sparql-query in > /home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple > ??? Running testsuite sparql-lexer: SPARQL legal lexing > ??? .... > ??? Passed: 4? Failed: 0? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ??? Running testsuite sparql-parser: SPARQL legal parsing > ??? .... > ??? Passed: 4? Failed: 0? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ??? Running testsuite sparql-query: SPARQL Query Execution > ??? FFFF > ??? Failed tests: > ????? dawg-triple-pattern-001 > ????? dawg-triple-pattern-002 > ????? dawg-triple-pattern-003 > ????? dawg-triple-pattern-004 > ??? Passed: 0? Failed: 4? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ? Testsuites summary: > ??? Failed tests: > ????? dawg-triple-pattern-001 > ????? dawg-triple-pattern-002 > ????? dawg-triple-pattern-003 > ????? dawg-triple-pattern-004 > ??? Passed: 8? Failed: 4? Skipped: 0? Xfailed: 0? Uxpassed: 0? > make[4]: *** [check-local] Error 1 > make[4]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[3]: *** [check-am] Error 2 > make[3]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[2]: *** [check-recursive] Error 1 > make[2]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql' > make[1]: *** [check-recursive] Error 1 > make[1]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests' > make: *** [check-recursive] Error 1 > > > From lorenae at fing.edu.uy Mon Jan 23 13:08:51 2012 From: lorenae at fing.edu.uy (lorena) Date: Mon, 23 Jan 2012 16:08:51 -0200 Subject: [redland-dev] SPARQL Query Execution test fails under Rasqal 0.9.28 and Ubuntu 10.10 In-Reply-To: References: Message-ID: Hi Following Lauri suggestions I ve performed make check setting RASQAL_DEBUG =1 This provided more info: dawg-triple-pattern-001 in suite sparql-query in /home/lorena/Downloads/rasqal- 0.9.28/tests/sparql/simple PATH=../../../utils:../../..:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin perl ./../check-sparql -s . dawg-triple-pattern-001 exited with code 2 ... Can't locate XML/DOM.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./../check-sparql line 35. BEGIN failed--compilation aborted at ./../check-sparql line 35. Seems that the package libxml-dom-perl was needed and not installed. I ve installed it and all tests passed. Thanks! Lorena On Mon, Jan 23, 2012 at 8:23 AM, lorena wrote: > Hi > > I'm new to Redland libraries and I'm trying to install them on Ubuntu 10.10 > > First, I've installed Raptor 2.0.6 and then, when I install Rasqal 0.9.28 > I receive the following message when performing make check > Any clues on this issue? > > regards > Lorena > > > improve: Running testsuites sparql-lexer sparql-parser sparql-query in > /home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple > Running testsuite sparql-lexer: SPARQL legal lexing > .... > Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 > > Running testsuite sparql-parser: SPARQL legal parsing > .... > Passed: 4 Failed: 0 Skipped: 0 Xfailed: 0 Uxpassed: 0 > > Running testsuite sparql-query: SPARQL Query Execution > FFFF > Failed tests: > dawg-triple-pattern-001 > dawg-triple-pattern-002 > dawg-triple-pattern-003 > dawg-triple-pattern-004 > Passed: 0 Failed: 4 Skipped: 0 Xfailed: 0 Uxpassed: 0 > > Testsuites summary: > Failed tests: > dawg-triple-pattern-001 > dawg-triple-pattern-002 > dawg-triple-pattern-003 > dawg-triple-pattern-004 > Passed: 8 Failed: 4 Skipped: 0 Xfailed: 0 Uxpassed: 0 > make[4]: *** [check-local] Error 1 > make[4]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[3]: *** [check-am] Error 2 > make[3]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[2]: *** [check-recursive] Error 1 > make[2]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql' > make[1]: *** [check-recursive] Error 1 > make[1]: Leaving directory `/home/lorena/Downloads/rasqal-0.9.28/tests' > make: *** [check-recursive] Error 1 > > -- Lorena Etcheverry -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at dajobe.org Mon Jan 23 14:23:55 2012 From: dave at dajobe.org (Dave Beckett) Date: Mon, 23 Jan 2012 11:23:55 -0800 (PST) Subject: [redland-dev] SPARQL Query Execution test fails under Rasqal 0.9.28 and Ubuntu 10.10 In-Reply-To: References: Message-ID: Oops, I meant XML::DOM in my previous message. Hopefully people will find this answer in a search. Dave On Mon, 23 Jan 2012, lorena wrote: > Hi > > Following Lauri suggestions I ve performed make check setting RASQAL_DEBUG > =1 > > This provided more info: > > ?????? dawg-triple-pattern-001 in suite sparql-query in > /home/lorena/Downloads/rasqal- 0.9.28/tests/sparql/simple > ?????PATH=../../../utils:../../..:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/ > bin:/sbin:/bin:/usr/X11R6/bin perl ./../check-sparql -s . > dawg-triple-pattern-001 exited with code 2 > ??????? ... > ??????? Can't locate XML/DOM.pm in @INC (@INC contains: /etc/perl > /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 > /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 > /usr/local/lib/site_perl .) at ./../check-sparql line 35. > ??????? BEGIN failed--compilation aborted at ./../check-sparql line 35. > > Seems that the package? libxml-dom-perl was needed and not installed. > I ve installed it and all tests passed. > Thanks! > Lorena > > > On Mon, Jan 23, 2012 at 8:23 AM, lorena wrote: > Hi > > I'm new to Redland libraries and I'm trying to install them on > Ubuntu 10.10 > > First, I've installed Raptor 2.0.6 and then, when I install > Rasqal 0.9.28 I receive the following message when performing > make check > Any clues on this issue? > > regards > Lorena > > > improve: Running testsuites sparql-lexer sparql-parser > sparql-query in > /home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple > ??? Running testsuite sparql-lexer: SPARQL legal lexing > ??? .... > ??? Passed: 4? Failed: 0? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ??? Running testsuite sparql-parser: SPARQL legal parsing > ??? .... > ??? Passed: 4? Failed: 0? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ??? Running testsuite sparql-query: SPARQL Query Execution > ??? FFFF > ??? Failed tests: > ????? dawg-triple-pattern-001 > ????? dawg-triple-pattern-002 > ????? dawg-triple-pattern-003 > ????? dawg-triple-pattern-004 > ??? Passed: 0? Failed: 4? Skipped: 0? Xfailed: 0? Uxpassed: 0? > > ? Testsuites summary: > ??? Failed tests: > ????? dawg-triple-pattern-001 > ????? dawg-triple-pattern-002 > ????? dawg-triple-pattern-003 > ????? dawg-triple-pattern-004 > ??? Passed: 8? Failed: 4? Skipped: 0? Xfailed: 0? Uxpassed: 0? > make[4]: *** [check-local] Error 1 > make[4]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[3]: *** [check-am] Error 2 > make[3]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql/simple' > make[2]: *** [check-recursive] Error 1 > make[2]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests/sparql' > make[1]: *** [check-recursive] Error 1 > make[1]: Leaving directory > `/home/lorena/Downloads/rasqal-0.9.28/tests' > make: *** [check-recursive] Error 1 > > > > > -- > Lorena Etcheverry > > From lorenae at fing.edu.uy Wed Jan 25 07:23:50 2012 From: lorenae at fing.edu.uy (lorena) Date: Wed, 25 Jan 2012 10:23:50 -0200 Subject: [redland-dev] Some issues running redland-virtuoso-test Message-ID: Hi After installing Redland I wanted to check it's integration with Open Source Virtuoso. I've configured the ODBC connection and run utils/redland-virtuoso-test but the last 3 tests failed. After inspecting the source code I found that the problem was in the query declaration query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char *)query_cmd, NULL); By replacing these lines by the following I was able to successfully run tests 19, 20, 21 query=librdf_new_query(world, "vsparql", NULL, (const unsigned char *)query_cmd, NULL); In particular I want to perform SPARQL GROUP BY queries over Virtuoso, so I decided to modify the tests in order to run this query: SELECT ?s (sum(?o) AS ?sumO) WHERE {graph { ?s ?p ?o }} GROUP BY ?s Consider a graph that only contains the following triples (otherwise the sum operator can not be applied since ?o may bind to some non numeric values): rc |= add_triple_typed(world, context_node, model, "oo", "pp", "10^^< http://www.w3.org/2001/XMLSchema#int>"); rc |= add_triple_typed(world, context_node, model, "oo", "pp", "12^^< http://www.w3.org/2001/XMLSchema#int>"); rc |= add_triple_typed(world, context_node, model, "oo", "pp", "15^^< http://www.w3.org/2001/XMLSchema#int>"); Surprisingly the query still raises an error, since VIrtuoso can not parse this object values as integers. My workaround was to re define the add_triple_typed function, and now I actually pass type URLs as parameters, using * librdf_new_node_from_typed_literal* instead of * librdf_new_node_from_uri_string* to create the nodes. I just wanted to know if this is ok or am I missing something? Regards Lorena -- Lorena Etcheverry -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorenae at fing.edu.uy Wed Jan 25 08:07:18 2012 From: lorenae at fing.edu.uy (lorena) Date: Wed, 25 Jan 2012 11:07:18 -0200 Subject: [redland-dev] Can't install redland php binding on Ubuntu 10.10 Message-ID: Hi After running ./configure --with-php=/usr/bin/php I get the following message and the config.log file I'm attaching Redland build summary: Redland: 1.0.15 Language APIs built: Seems ok, but when I perform make nothing is done! lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1$ sudo make make all-recursive make[1]: Entering directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' Making all in data make[2]: Entering directory `/home/lorena/Downloads/redland-bindings-1.0.14.1/data' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/lorena/Downloads/redland-bindings-1.0.14.1/data' make[2]: Entering directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' make[2]: Leaving directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' make[1]: Leaving directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' I've also tried to perform make in the php dir, and I get this error: lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1/php$ sudo make swig -v -I. -DREDLAND_POST_I -DREDLAND_INIT_I -DREDLAND_DECL_I -DREDLAND_TYPEMAP_I -noproxy -module redland -o redland_wrap.c /usr/local/share/redland/Redland.i swig error : Unrecognized option -noproxy Use 'swig -help' for available options. make: *** [redland_wrap.c] Error 1 lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1/php$ Instead of compiling the sources I've tried installing the php5-librdf package via apt-get. Should librdf or redland appear as a php extension ? If so something is wrong with this mechanism also since php -me lists the following extensions: [PHP Modules] bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcntl pcre Phar posix readline Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] Thanks!! Lorena -- Lorena Etcheverry -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: config.log Type: application/octet-stream Size: 25789 bytes Desc: not available URL: From dave at dajobe.org Thu Jan 26 00:38:35 2012 From: dave at dajobe.org (Dave Beckett) Date: Wed, 25 Jan 2012 21:38:35 -0800 Subject: [redland-dev] Some issues running redland-virtuoso-test In-Reply-To: References: Message-ID: <4F20E6DB.6020405@dajobe.org> On 1/25/12 4:23 AM, lorena wrote: > Hi > > After installing Redland I wanted to check it's integration with Open Source > Virtuoso. > > I've configured the ODBC connection and run utils/redland-virtuoso-test but > the last 3 tests failed. > After inspecting the source code I found that the problem was in the query > declaration What was the problem? What was the test failure error? > query=librdf_new_query(world, (char *)"vsparql", NULL, (const unsigned char > *)query_cmd, NULL); > > By replacing these lines by the following I was able to successfully run > tests 19, 20, 21 > > query=librdf_new_query(world, "vsparql", NULL, (const unsigned char > *)query_cmd, NULL); I don't see the difference here, adding/removing casts would just affect compiler warnings, the generated code would be identical (for C). > In particular I want to perform SPARQL GROUP BY queries over Virtuoso, so I > decided to modify the tests in order to run this query: > > SELECT ?s (sum(?o) AS ?sumO) > WHERE {graph { ?s ?p ?o }} > GROUP BY ?s > > Consider a graph that only contains the following triples > (otherwise the sum operator can not be applied since ?o may bind to some non > numeric values): > > rc |= add_triple_typed(world, context_node, model, "oo", "pp", > "10^^"); > rc |= add_triple_typed(world, context_node, model, "oo", "pp", > "12^^"); > rc |= add_triple_typed(world, context_node, model, "oo", "pp", > "15^^"); The add_triple_typed() must be something you coded, hard to tell what it's doing here. > Surprisingly the query still raises an error, since VIrtuoso can not parse > this object values as integers. > > My workaround was to re define the add_triple_typed function, and now I > actually pass type URLs as parameters, using > /librdf_new_node_from_typed_literal/ instead of > /librdf_new_node_from_uri_string/ to create the nodes. > > > I just wanted to know if this is ok or am I missing something? I don't know the set of datatypes that virtuoso supports but it might be that it uses one of the other XSD integer types. xsd:int is rather rarely seen. mostly xsd:integer is used. yes they are different! See http://www.w3.org/TR/xmlschema-2/#built-in-datatypes Dave From dave at dajobe.org Thu Jan 26 00:43:03 2012 From: dave at dajobe.org (Dave Beckett) Date: Wed, 25 Jan 2012 21:43:03 -0800 Subject: [redland-dev] Can't install redland php binding on Ubuntu 10.10 In-Reply-To: References: Message-ID: <4F20E7E7.1050900@dajobe.org> On 1/25/12 5:07 AM, lorena wrote: > Hi > > After running ./configure --with-php=/usr/bin/php I get the following > message and the config.log file I'm attaching > > Redland build summary: > Redland: 1.0.15 > Language APIs built: > > Seems ok, but when I perform make nothing is done! > > lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1$ sudo make > make all-recursive > make[1]: Entering directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' > Making all in data > make[2]: Entering directory > `/home/lorena/Downloads/redland-bindings-1.0.14.1/data' > make[2]: Nothing to be done for `all'. > make[2]: Leaving directory > `/home/lorena/Downloads/redland-bindings-1.0.14.1/data' > make[2]: Entering directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' > make[2]: Leaving directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' > make[1]: Leaving directory `/home/lorena/Downloads/redland-bindings-1.0.14.1' > > I've also tried to perform make in the php dir, and I get this error: > lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1/php$ > sudo make > swig -v -I. -DREDLAND_POST_I -DREDLAND_INIT_I -DREDLAND_DECL_I > -DREDLAND_TYPEMAP_I -noproxy -module redland -o redland_wrap.c > /usr/local/share/redland/Redland.i > swig error : Unrecognized option -noproxy > Use 'swig -help' for available options. > make: *** [redland_wrap.c] Error 1 > lorena at lorena-virtual-machine:~/Downloads/redland-bindings-1.0.14.1/php$ Normally, swig should never be re-run when you build from a released tarball. The generated code (C) just needs compiling. The issue is here that you must have a version of swig (V1) that's older than supported. You can build a new swig and 'make clean' and retry but I'd recommend starting from a clean tarball again, after installing a new swig. SWIG v2 also seems to work but it might give some warnings. > Instead of compiling the sources I've tried installing the php5-librdf > package via apt-get. > Should librdf or redland appear as a php extension ? If so something is > wrong with this mechanism also since php -me lists the following extensions: > > [PHP Modules] > bcmath > bz2 > calendar > Core > ctype > date > dba > dom > ereg > exif > fileinfo > filter > ftp > gettext > hash > iconv > json > libxml > mbstring > mhash > openssl > pcntl > pcre > Phar > posix > readline > Reflection > session > shmop > SimpleXML > soap > sockets > SPL > standard > sysvmsg > sysvsem > sysvshm > tokenizer > wddx > xml > xmlreader > xmlwriter > zip > zlib > > [Zend Modules] I've got it installed from php5-librdf and it doesn't appear for me. I'm not sure why. Here's a better test using the test.php from the package: $ php /usr/share/doc/php5-librdf/examples/test.php Testing Redland... Redland world opened Redland storage created Redland model created Redland parser created Parsing... Done... Querying for dc:titles: Returned 1 results Executing query again Query results serialized to an XML string size 224 bytes Redland serializer created Serializing... Done... Done Dave From mantis-bug-sender at librdf.org Thu Jan 26 07:37:32 2012 From: mantis-bug-sender at librdf.org (Mantis Bug Tracker) Date: Thu, 26 Jan 2012 12:37:32 +0000 Subject: [redland-dev] [Redland librdf RDF API 0000489]: librdf_model_contains_statement return code is incorrect Message-ID: <273c68f3e5258d9d07e609760a625ae8@bugs.librdf.org> The following issue has been SUBMITTED. ====================================================================== http://bugs.librdf.org/mantis/view.php?id=489 ====================================================================== Reported By: zoggy Assigned To: ====================================================================== Project: Redland librdf RDF API Issue ID: 489 Category: api Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2012-01-26 12:37 Last Modified: 2012-01-26 12:37 ====================================================================== Summary: librdf_model_contains_statement return code is incorrect Description: Hello, Documentation of librdf_model_contains_statement says: Returns : non 0 if the model contains the statement (>0 if the statement is illegal) But it seems that the same positive value (1) is returned when everything went all right (for example see librdf_storage_mysql_contains_statement) or when there is an illegal statement (see the checks done in librdf_model_contains_statement: 1 is returned when the statement is not complete). So by now it is impossible to use the return value to known whether the statement is really contained or if an error occurs. Zoggy ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-01-26 12:37 zoggy New Issue ====================================================================== From mantis-bug-sender at librdf.org Thu Jan 26 19:43:25 2012 From: mantis-bug-sender at librdf.org (Mantis Bug Tracker) Date: Fri, 27 Jan 2012 00:43:25 +0000 Subject: [redland-dev] [Redland Language Bindings 0000490]: SPARQL queries with filters cause Redland Python bindings to crash Message-ID: <2a9ff897930bf0171cfeb15b50580ea0@bugs.librdf.org> The following issue has been SUBMITTED. ====================================================================== http://bugs.librdf.org/mantis/view.php?id=490 ====================================================================== Reported By: swilsak Assigned To: ====================================================================== Project: Redland Language Bindings Issue ID: 490 Category: api Reproducibility: always Severity: crash Priority: normal Status: new Binding Language (java, perl, php, python, ruby, tcl): python ====================================================================== Date Submitted: 2012-01-27 00:43 Last Modified: 2012-01-27 00:43 ====================================================================== Summary: SPARQL queries with filters cause Redland Python bindings to crash Description: Running a query such as: SELECT DISTINCT ?target ?type WHERE { { ?target a ?type ; ?reln ?obj . FILTER ( regex(str(?obj), "Professor", "i") ) } FILTER ( ?type != ) } on a datastore containing tens of thousands of queries causes the following crash: $ python quick_test.py Initialized Model Querying... librdf error - digest SHA1 already registered librdf error - hash memory already registered librdf error - model storage already registered librdf error - storage hashes already registered librdf error - storage trees already registered librdf error - storage memory already registered librdf error - storage file already registered librdf error - storage uri already registered librdf error - query language sparql11 already registered librdf error - query language sparql11-query already registered librdf error - query language sparql11-update already registered librdf error - query language sparql already registered Traceback (most recent call last): File "quick_test.py", line 38, in results = model.execute(RDF.SPARQLQuery(query)) File "/usr/lib/python2.6/dist-packages/RDF.py", line 1156, in execute results = Redland.librdf_model_query_execute(self._model,query._query) RDF.RedlandError: 'digest MD5 already registered' Steps to Reproduce: Run attached script I have reproduced this with some other similar queries as well, such as removing the "DISTINCT" and/or the second "FILTER". This does affect how many triples it takes to cause the crash; it looks like it's somewhere around 15,000-20,000 with SELECT DISTINCT and closer to 40,000 with SELECT. Additional Information: Redland/Redland Language Bindings 1.0.13.1 Raptor 2.0.0 Rasqal 0.9.22 Python 2.6 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-01-27 00:43 swilsak New Issue 2012-01-27 00:43 swilsak File Added: quick_test.py ====================================================================== From dave at dajobe.org Sun Jan 29 16:09:25 2012 From: dave at dajobe.org (Dave Beckett) Date: Sun, 29 Jan 2012 13:09:25 -0800 Subject: [redland-dev] Removing support for expat in Raptor 2.0.7+ - requiring libxml2 Message-ID: <4F25B585.1020704@dajobe.org> Expat hasn't had a release in 4+ years and I can simplify the Raptor code and configuration if libxml2 is required; it has been the default and recommended parser for over 5 years. libxml2 is a very widely installed library and as far as I'm concerned, is the definitive XML library for C. I won't be removing the SAX2 abstraction since that's working fine. I guess there's a small possibility somebody might want a smaller XML subsystem to be usable but it can't be based on an unmaintained library. There are things like lxml (python + C), Xerces-C++ (C++), etc. but integrating them would be tricky. I'm not doing this work. ... and if you were wondering, yes libxml did inspire the librdf name Cheers Dave From dave at dajobe.org Sun Jan 29 16:34:52 2012 From: dave at dajobe.org (Dave Beckett) Date: Sun, 29 Jan 2012 13:34:52 -0800 Subject: [redland-dev] Removing support for expat in Raptor 2.0.7+ - requiring libxml2 In-Reply-To: <4F25B585.1020704@dajobe.org> References: <4F25B585.1020704@dajobe.org> Message-ID: <4F25BB7C.5090905@dajobe.org> On 1/29/12 1:09 PM, Dave Beckett wrote: > Expat hasn't had a release in 4+ years and I can simplify the Raptor code > and configuration if libxml2 is required; it has been the default and > recommended parser for over 5 years. libxml2 is a very widely installed > library and as far as I'm concerned, is the definitive XML library for C. I > won't be removing the SAX2 abstraction since that's working fine. > > I guess there's a small possibility somebody might want a smaller XML > subsystem to be usable but it can't be based on an unmaintained library. > There are things like lxml (python + C), Xerces-C++ (C++), etc. but > integrating them would be tricky. I'm not doing this work. I should have also said libxml2 will be required *only if* you want to build a parser that reads an XML syntax: RDF/XML, RDFa, Atom, GRDDL, all that crappy RSS*. libxml2 won't be required if you (say) just wanted a Turtle parser. Dave