Hello Kjetil, It seems to me that the problem is not in DESCRIBE but in the browser that is unable to render an RDF/XML so it displays an empty page. The problem is that SPARQL web service protocol do not allow returning of result of DESCRIBE as an HTML. I've tried your endpoint and found that
DESCRIBE ?uri WHERE { ?g a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> <http://ruby3.computas.no/covers/nfi/48739.jpg> . } } actually returns the proper result but the browser may show a white page if "Display Results As" dropdown is set to HTML. However if you open "view source" window of a browser then you see a proper RDF/XML and if you set "Display Results As" to "Auto" then you'll get a proper TURTLE file. Probably I should change the behavior so HTML and Spreadsheet output modes will produce tree-column table of S P and O of triples made by DESCRIBE (say, no more than first 1000 triples to not kill the browser). That's not right but OK. Best Regards, Ivan Mikhailov, OpenLink Software http://virtuoso.openlinksw.com On Mon, 2008-12-29 at 19:19 +0100, Kjetil Kjernsmo wrote: > All, > > I'm trying to do something analogous to this example from the SPARQL spec: > http://www.w3.org/TR/rdf-sparql-query/#namedAndDefaultGraph > which I have now gotten working, but I'd like to do a DESCRIBE. Now, the > problem is that the client doesn't know the graph names, but it what kind of > graph it is. Thus, I have inserted the following > > INSERT DATA INTO GRAPH <http://msone.computas.no/graphs/> { > <http://msone.computas.no/graphs/instance/nfi> a > <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . } > > i.e. http://msone.computas.no/graphs/ is my default graph and > http://msone.computas.no/graphs/instance/nfi is the graph where the triples > I'm interested in are. > > My simplest test query is > > DESCRIBE <http://www.wizardis.com.au/2005/12/MAVIS#TitleWorkkey48739> FROM > NAMED <http://msone.computas.no/graphs/instance/nfi> > > Now, analogous to the example in the SPARQL spec, I would like to DESCRIBE > this URI, but using an IFP to identify it rather than directly name it. Since > the client doesn't know the graph URI, I would rather reference it > by :InstanceGraph, like this: > > DESCRIBE ?uri WHERE { ?g a > <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . > GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> > <http://ruby3.computas.no/covers/nfi/48739.jpg> . } } > > this returns no result, so I try two things: > SELECT ?uri WHERE { ?g a > <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . > GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> > <http://ruby3.computas.no/covers/nfi/48739.jpg> . } } > > This returns the correct URI, so the solution is OK. Then I do: > > DESCRIBE ?uri FROM NAMED <http://msone.computas.no/graphs/instance/nfi> > WHERE { > ?g a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . > GRAPH ?g > { > ?uri <http://www.computas.com/mediasone#coverArt> > <http://ruby3.computas.no/covers/nfi/48739.jpg> . } > > This returns the desired result. > > So, it seems that the match is OK, but to get the actual data from a > DESCRIBE, > I have to explicitly name the graph. Which creates problems on the client > side... I have to admit that I am a bit confused about graph naming. > > Does this problem have a more trivial solution? > > The endpoint where all this runs is a public test endpoint at > http://msone.computas.no:8890/sparql > > Kind regards > > Kjetil Kjernsmo