FROM isn't legal inside of a sub-select (at least, it's not according to the grammer at http://www.w3.org/TR/sparql11-query/):
[8] SubSelect ::= SelectClause WhereClause SolutionModifier ValuesClause maybe that's an oversight or worth changing... On Aug 13, 2012, at 8:24 PM, Holger Knublauch <[email protected]> wrote: > On 8/13/2012 14:14, Macedo Maia wrote: >> Sorry, now i understand your question. Do you want to acess any data in a >> virtuoso graph? If yes, you can try this query: > > Yes, but Jena doesn't accept the FROM clause inside the nested SELECT and > that's what my question is about (probably to Andy). > > Thanks > Holger > > >> >> SELECT * >> WHERE >> { >> SERVICE <http://example.org:8890/sparql> >> { >> SELECT ?s ?id >> from <http://ex.com/base> >> WHERE { >> GRAPH ?g{?s a <http://ex.com/resource/Batch> . >> ?s <http://ex.com/resource/id> ?id .} >> } >> } >> } >> >> >>> 2012/8/12 Holger Knublauch <[email protected]> >>>>> The following query is not valid (verified with Jena 2.7.3): >>>>> >>>>> SELECT * >>>>> WHERE >>>>> { >>>>> SERVICE <http://example.org:8890/sparql> >>>>> { SELECT * >>>>> FROM <http://ex.com/base> >>>>> WHERE >>>>> { ?s a <http://ex.com/resource/Batch> . >>>>> ?s <http://ex.com/resource/id> ?id . >>>>> } >>>>> } >>>>> } >>>>> >>>>> The parser complains about the FROM. Is this supposed to work, or are we >>>>> limited to using GRAPH instead? >>>>> >>>>> Thanks >>>>> Holger >>>>> >>>>> >>>> >>>> -- >>>> *Macedo Sousa Maia* >>>> *Bacharel em Computação >>>> Mestrando em Computação >>>> ARIDA(Advanced Research in Database) >>>> * >>>> *Universidade Federal do Ceará(UFC)* >>>> >>>> >>> >>> -- >>> *Macedo Sousa Maia* >>> *Bacharel em Computação >>> Mestrando em Computação >>> ARIDA(Advanced Research in Database) >>> * >>> *Universidade Federal do Ceará(UFC)* >>> >>> >> >> > -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
