Eric,

I've got. BASE is considered in both cases, but BASE is not a
concatenation, it's resolving according to RFC 1808 so <Sp#> resolved
with <http://www.cellcycleontology.org/ontology/rdf/> gives
<http://www.cellcycleontology.org/ontology/rdf/Sp>, not
<http://www.cellcycleontology.org/ontology/rdf/Sp#> .

So two questions arise for me:
1. what should come first: namespace expansion or base expansion,
because
( <http://> merged with <Sp#> ) concatenated with is_a
gives http://Spis_a
whereas
<http://> merged with ( <Sp#> concatenated with is_a )
gives http://Sp#is_a

2. Whether the resolution is correct when the anchor is empty.

I'll check later today and reply.

Best Regards,

Ivan Mikhailov,
OpenLink Software.

On Wed, 2008-06-25 at 10:02 +0200, Erick Antezana wrote: 
> Hi Hugh,
> 
>   the version we're running for this particular instance is 5.0.5 (Linux 
> 64bits). You can check it out from: 
> http://www.cellcycleontology.org/query/sparql
> 
>   I have run 'explain' with the following query:
> 
> BASE <http://www.cellcycleontology.org/ontology/rdf/>
> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> PREFIX sp:<Sp#>
> SELECT ?prot_label ?biological_process_label
> FROM <Sp>
> WHERE {
> ?prot sp:is_a sp:CCO_B0000000 .
> ?prot rdfs:label ?prot_label .
> ?prot sp:participates_in ?biological_process .
> ?biological_process rdfs:label ?biological_process_label
> }
> 
> and the output is:
> 
> REPORT
> VARCHAR
>  {
>  
>  Precode:
>   0: $25 "org/ontology/rdf/Sp" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE 
> (<constant (http://www.cellcycleontology.org/ontology/rdf/Sp)>)
>   7: $26 "ema#label" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE 
> (<constant (http://www.w3.org/2000/01/rdf-schema#label)>)
>   14: $27 "org/ontology/rdf/Spis_a" := Call 
> DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (<constant 
> (http://www.cellcycleontology.org/ontology/rdf/Spis_a)>)
>   21: $28 "org/ontology/rdf/SpCCO_B0000000" := Call 
> DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (<constant 
> (http://www.cellcycleontology.org/ontology/rdf/SpCCO_B0000000)>)
>   28: $29 "org/ontology/rdf/Spparticipates_in" := Call 
> DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (<constant 
> (http://www.cellcycleontology.org/ontology/rdf/Spparticipates_in)>)
>   35: BReturn 0
>  from DB.DBA.RDF_QUAD by RDF_QUAD_OGPS
>  Key RDF_QUAD_OGPS ASC ($31 "s-6-1-t0.S")
>  <col=415 O = $28 "org/ontology/rdf/SpCCO_B0000000"> , <col=412 G = $25 
> "org/ontology/rdf/Sp"> , <col=414 P = $27 "org/ontology/rdf/Spis_a">
>  row specs: <col=415 O LIKE <constant (Tó)>>
>  
>  Current of: <$33 "<DB.DBA.RDF_QUAD s-6-1-t0>" spec 5>
>  from DB.DBA.RDF_QUAD by RDF_QUAD
>  Key RDF_QUAD ASC ($36 "s-6-1-t2.O", $35 "s-6-1-t2.S")
>   inlined <col=412 G = $25 "org/ontology/rdf/Sp"> , <col=413 S = $31 
> "s-6-1-t0.S"> , <col=414 P = $29 "org/ontology/rdf/Spparticipates_in">
>  row specs: <col=415 O LIKE <constant (Tó)>>
>  
>  Current of: <$38 "<DB.DBA.RDF_QUAD s-6-1-t2>" spec 5>
>  
>  Precode:
>   0: $39 "callret" := Call __all_eq ($35 "s-6-1-t2.S", $31 "s-6-1-t0.S")
>   5: BReturn 0
>  from DB.DBA.RDF_QUAD by RDF_QUAD
>  Key RDF_QUAD ASC ($41 "s-6-1-t1.O")
>   inlined <col=412 G = $25 "org/ontology/rdf/Sp"> , <col=413 S = $31 
> "s-6-1-t0.S"> , <col=414 P = $26 "ema#label">
>  row specs: <col=413 S = $35 "s-6-1-t2.S">
>  
>  Current of: <$43 "<DB.DBA.RDF_QUAD s-6-1-t1>" spec 5>
>  
>  Precode:
>   0: $44 "prot_label" := Call __rdf_sqlval_of_obj ($41 "s-6-1-t1.O")
>   5: BReturn 0
>  from DB.DBA.RDF_QUAD by RDF_QUAD
>  Key RDF_QUAD ASC ($46 "s-6-1-t3.O")
>   inlined <col=412 G = $25 "org/ontology/rdf/Sp"> , <col=413 S = $36 
> "s-6-1-t2.O"> , <col=414 P = $26 "ema#label">
>  
>  Current of: <$48 "<DB.DBA.RDF_QUAD s-6-1-t3>" spec 5>
>  
>  After code:
>   0: $49 "biological_process_label" := Call __rdf_sqlval_of_obj ($46 
> "s-6-1-t3.O")
>   5: BReturn 0
>  Select ($44 "prot_label", $49 "biological_process_label", <$48 
> "<DB.DBA.RDF_QUAD s-6-1-t3>" spec 5>, <$43 "<DB.DBA.RDF_QUAD s-6-1-t1>" 
> spec 5>, <$38 "<DB.DBA.RDF_QUAD s-6-1-t2>" spec 5>, <$33 
> "<DB.DBA.RDF_QUAD s-6-1-t0>" spec 5>)
>  }
> No. of rows in result: 46
> 
> 
> 
> The number of rows in result is correct; however, none of them is shown...
> 
> If I run a slightly different query (note the second prefix):
> 
> BASE <http://www.cellcycleontology.org/ontology/rdf/>
> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> PREFIX sp:<http://www.cellcycleontology.org/ontology/rdf/Sp#>
> SELECT ?prot_label ?biological_process_label
> FROM <Sp>
> WHERE {
> ?prot sp:is_a sp:CCO_B0000000 .
> ?prot rdfs:label ?prot_label .
> ?prot sp:participates_in ?biological_process .
> ?biological_process rdfs:label ?biological_process_label
> }
> 
> 
> then the BASE IRI is considered...
> 
> thanks,
> Erick
> 
> Hugh Williams wrote:
> > Hi Ward,
> >
> > I have tested this in-house and the base keyword does return the same/ 
> > correct results for me:
> >
> > SQL> sparql base <http://oplusopteron.usnet.private:8890/oracle_hr/>  
> > select count(*) from <> where {?s ?p ?o}  ;
> > callret-0
> > INTEGER
> > ________________________________________________________________________ 
> > _______
> >
> > 1545
> >
> > 1 Rows. -- 542 msec.
> > SQL> sparql select count(*)  from <http://oplusopteron.usnet.private: 
> > 8890/oracle_hr/>  where {?s ?p ?o}  ;
> > callret-0
> > INTEGER
> > ________________________________________________________________________ 
> > _______
> >
> > 1545
> >
> > 1 Rows. -- 474 msec.
> > SQL>
> >
> > Can you confirm the version of Virtuoso being used and also if this  
> > instance is accessible such that we can see the problem first hand ?
> >
> > My version is 05.00.3028
> >
> > Can you also provide the output of running the explain function as  
> > detailed at:
> >
> > http://docs.openlinksw.com/virtuoso/fn_explain.html
> >
> > Note you will need to run this function from the Virtuoso isql or  
> > Conductor interactive SQL interface, remembering to add the 'sparql'  
> > prefix before your SPARQL queries such that they are directed to the  
> > SPARQL engine .
> >
> > Best Regards
> > Hugh Williams
> > Professional Services
> > OpenLink Software
> >
> >
> > On 24 Jun 2008, at 16:34, Ward Blondé wrote:
> >
> >   
> >> Dear Virtuoso users,
> >>
> >> I was wondering whether the keyword 'base' to make prefixes shorter is
> >> working in Virtuoso. It didn't give my a compile error when I use it,
> >> but it doesn't give any answers to my query either.
> >>
> >> I used it like this:
> >> base <http://www.mydomain.org/ontology/rdf/>
> >> prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> >> prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> >> prefix obo:<OBO#>
> >> select ?name ?id
> >> from <http://www.mydomain.org/ontology/rdf/OBO>
> >> where {
> >> ?id obo:is_a obo:CCO_U0000000.
> >> ?id rdfs:label ?name.
> >> }
> >>
> >> instead of this:
> >> prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> >> prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> >> prefix obo:<http://www.mydomain.org/ontology/rdf/OBO#>
> >> select ?name ?id
> >> from <http://www.mydomain.org/ontology/rdf/OBO>
> >> where {
> >> ?id obo:is_a obo:CCO_U0000000.
> >> ?id rdfs:label ?name.
> >> }
> >>
> >> thanks,
> >>
> >> Ward
> >>     
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Reply via email to