From: Rob V. <rv...@do...> - 2014-12-15 12:05:40
|
Mark You've likely run into the fact that when you've loaded your graph the library automatically assigned it a name so then when you ran your query it only considered the default graph which was empty rather than your named graph which contained the actual data. https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20S PARQL#!default-graph You likely just need to make sure that your loaded graph is actually the default graph which you can do in several ways, the easiest of which (assuming you have only a single graph) is simply to set the BaseUri property to null after loading your data so that the graph is treated as the default graph when you add it to a store ready for querying. Rob From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, 12 December 2014 20:50 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] typed literals > I’m noticing some anomalies in the handling of typed literals > > Here’s a very simple RDF/XML file, with just two statements. The first has a > literal with an integer typed value of 42. > > <?xml version="1.0" encoding="utf-8"?> > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xml:base="http://www.w3.org/2001/XMLSchema#" > xmlns:me="http://www.example.com/"> > <rdf:Description rdf:about="urn:guid:00000000-0000-0000-0000-000000000003" > > <me:A > rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">42</me:A> > <me:B rdf:datatype="integer">37</me:B> > </rdf:Description> > </rdf:RDF> > > If I execute the following query, > > PREFIX me: <http://www.example.com/> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > SELECT DISTINCT ?s ?p WHERE { > ?s ?p 42 . > } > LIMIT 25 > > the two external triplestore implementations I tried correctly return one > tuple; however, the dotNetRDF LeviathanQueryProcessor using the in-memory > store does not return any tuples. Is this a bug, or operator error? > > Also, I was hoping to reduce the size of my RDF/XML by using the xml:base > construct, but I don’t seem to be able to get the xml:base attribute to take > effect. Is there a trick to getting that to work? > > Thanks, > -Mark > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |