Re: GRAPH details and test cases

Kendall Clark <kendall@monkeyfist.com> wrote on 07/04/2006 06:55:57 PM:
> On Jun 26, 2006, at 9:35 AM, Lee Feigenbaum wrote:
> 
> >
> > The results that I got were exactly what I was expecting. I was only
> > including that case as a potential test case as it's potentially a
> > non-obvious situation which would be good to include in the test 
> > suite.
> 
> I agree. Can you add it to the test suite? (Sorry, I've had a backlog 
> of mail for a while, including this thread.)

I've now done this.

The test is source-named/nested-graph-001 (for lack of a better place to 
put it). 

Data:

(no default graph)

<ng1.n3>
@prefix : <http://example.org/ns#> .
:s :p :o, :o1.

<ng2.n3>
@prefix : <http://example.org/ns#> .
:s :p :o, :o2.

Query:

<nested-graph-query.rq>
PREFIX : <http://example.org/ns#>
SELECT ?o
FROM NAMED <ng1.n3>
FROM NAMED <ng2.n3>
{
  GRAPH <ng1.n3> {
  GRAPH <ng2.n3> {
      :s :p ?o .
  }
  }
}

Results:

<nested-graph-query-result.n3>
@prefix rs:      <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> 
.

[]  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
                rs:ResultSet ;
    rs:resultVariable "o";

    rs:solution [ rs:binding  [ rs:value    <http://example.org/ns#o> ;
                                rs:variable "o"
                              ] 
                ] ,
                [ rs:binding  [ rs:value    <http://example.org/ns#o2> ;
                                rs:variable "o"
                              ] 
                ] 

                .


The test runs successfully in my engine.

Lee

Received on Wednesday, 16 August 2006 16:50:02 UTC