Fwd: question regarding SERVICE extension

sorry, I wrote wrong the second query, here comes the good one.

SELECT ?gene ?taxon
WHERE
{
SERVICE <http://iproclass.bio2rdf.org/sparql>
     { ?prot <http://bio2rdf.org/ns/iproclass#xGeneid> ?gene .
     SERVICE <http://geneid.bio2rdf.org/sparql> {
         ?gene <http://bio2rdf.org/ns/bio2rdf#xTaxon> ?taxon .
         ?taxon <http://bio2rdf.org/ontology/bio2rdf:xGI> ?xGI . }
         }
}

Dear all,

I've been working in a SPARQL 1.1 federation extension. I have 
implemented the SERVICE part but a couple of questions came to my mind 
and I need a bit of help. First thing is the results of a SERVICE 
clause. I suppose, if I understood correctly 
http://www.w3.org/2009/sparql/docs/fed/service#defn_service that SERVICE 
returns as results all the variables in it. In the following example I 
suppose that first the SERVICE clauses are processed, and then, using 
all the variables from the two services in the query the OPTIONAL would 
be done. The first service output would be ?gene and the second one 
would be ?gene, ?taxon and ?xGI, righ?

SELECT ?gene ?taxon
WHERE
{
SERVICE <http://iproclass.bio2rdf.org/sparql>
     { <http://bio2rdf.org/iproclass:Q8KKD2> 
<http://bio2rdf.org/ns/iproclass#xGeneid> ?gene .}
OPTIONAL {
     SERVICE <http://geneid.bio2rdf.org/sparql> {
         ?gene <http://bio2rdf.org/ns/bio2rdf#xTaxon> ?taxon .
         ?taxon <http://bio2rdf.org/ontology/bio2rdf:xGI> ?xGI . }
}
}

My second question is regarding the possibility of having nested SERVICE 
operators in a query. Is that possible? The grammar allows that, but in 
the specification I think I have not seen anything explicit. Whould this 
be possible? which would be the semantics of the query? is it allowed to 
have variables instead of URIs pointing to an endpoint? which would be 
the semantics?
SELECT ?gene ?taxon
WHERE
{
SERVICE <http://iproclass.bio2rdf.org/sparql>
     { ?prot <http://bio2rdf.org/ns/iproclass#xGeneid> ?gene .}
     SERVICE <http://geneid.bio2rdf.org/sparql> {
         ?gene <http://bio2rdf.org/ns/bio2rdf#xTaxon> ?taxon .
         ?taxon <http://bio2rdf.org/ontology/bio2rdf:xGI> ?xGI . }

}


Thanks a lot :)

Carlos

Received on Tuesday, 3 August 2010 19:13:03 UTC