> This should only be used against a CG since it will cause it to load > the default graph ( "context" ). If you are dispatching SPARQL, you > should either do it against a CG or use a GRAPH name / variable in the > expression (perhaps with a topLevel binding of the graphs identifier: > g.query(..query..,initBindings={Variable('graphName') : g.identifier > }).
I think saying graph.query(somequery) explicitly says "I want to query this graph", and no ids should be necessary (note... this is what seems to be going on) so though I accept that passing in the initBinding would work, why are you making me do that? And why should CG and Graph act differently here (and why should I have to care?) SPARQL queries are dispatched against RDF datasets, which are > composed of 'multiple' RDF graphs. hmmm... I picked that up from the crazy conditional blocks in rdflib.sparql.Algebra.TopEvaluate (speaking of which, shouldn't we be following http://www.python.org/dev/peps/pep-0008/?) would the determination of dataset be something that should happen outside of the graph API? the fact that a query can call in other resources beyond the graph makes me sort of feel like a more explicit api would be something like this: from rdflib import sparql ... set up a list of graph and resource, etc sparql.query(myquery, data=list_of_graphs_or_resources, default_graphs='someid') Otherwhise, it feels like we are conflating graphs and datasets or at least hiding the actual relationship (and leading to nasty surprises). If my graph is ided as "http://myns/dataname", I expect FROM to use that if my graph is ided "http://myns/dataname" as it, not attempt to download some web resource (what currently happens). Sparql seems to default sensibly the graph the query dispatched from, but not recognize the id of that default graph. -w | david "whit" morriss | | contact :: http://public.xdi.org/=whit "If you don't know where you are, you don't know anything at all" Dr. Edgar Spencer, Ph.D., 1995 "I like to write code like other ppl like to tune their cars or 10kW hifi equipment..." Christian Heimes, 2004
_______________________________________________ Dev mailing list Dev@rdflib.net http://rdflib.net/mailman/listinfo/dev