From: Rob V. <rv...@do...> - 2014-12-17 10:27:34
|
Mark Please can you provide the exact code you use to reproduce this problem. I have tried in a couple of different ways and cannot reproduce the issue locally It would also be useful to know what version you are using (not that I am aware of any relevant bugs that might be affecting you) Rob From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Monday, 15 December 2014 14:25 To: dotNetRDF User Help and Support <dot...@li...> Subject: Re: [dotNetRDF-Support] typed literals > Hi Rob, > > Thanks for the reply. > > The tuples are getting loaded to the same graph against which the query is > being executed; I verified that by querying for all tuples. > > After reading the interesting article “RDF Literal Types in Practice” [1] I > thought to try the following: > > PREFIX me: <http://www.example.com/> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > SELECT DISTINCT ?s ?p WHERE { > ?s ?p ?o . > FILTER (xsd:integer(?o) = 42) > } > > which in fact does work. > > Somehow the pattern matching doesn’t match, though. > > -Mark > > > > > [1] > http://iswc2011.semanticweb.org/fileadmin/iswc/Papers/Workshops/SSWS/Emmons-et > -all-SSWS2011.pdf > > > > From: Rob Vesse [mailto:rv...@do...] > Sent: Monday, December 15, 2014 7:05 AM > To: dotNetRDF User Help and Support > Subject: Re: [dotNetRDF-Support] typed literals > > > 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%20SPA > RQL#!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# >> <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# >> <http://www.w3.org/2001/XMLSchema> " xmlns:me="http://www.example.com/" >> <http://www.example.com/%22> > >> <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# >> <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/li >> stinfo/dotnetrdf-support > ------------------------------------------------------------------------------ > 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 |