Re: agenda: RDF Data Access 22 Feb

On Mon, Feb 21, 2005 at 12:52:40PM -0600, Pat Hayes wrote:
> >3. SPARQL QL publication
> >
> >ACTION: EricP, make sure editor's draft as an inline issue (to be
> >published) that we need to work this out
> >DONE: http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050217/
> 
> I notice this in 11.2.1.2:
> 
> used in conjunction with optional, it can be used to test whether a 
> graph pattern with at least one variable in it has been matched. When 
> also used in conjunction with not, it can test to see that a triple 
> has not been asserted. This is called Negation as Failure in logic 
> programming.
> 
> but NOT does not appear in the grammar anywhere. Is this an editing 
> bug, or am I missing something?

fixed. or at least changed...
[[
One may test that a graph pattern is not expressed by specifying an
optional graph patten that introduces a variable and testing to see
that the variable is not bound. This is called Negation as Failure in
logic programming.

This query matches the people with a name but no expressed mbox:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
 WHERE ( ?x foaf:name  ?name )
       OPTIONAL ( ?x foaf:mbox ?mbox )
   AND !bound(?mbox)
]]

If there were a rule that everyone had an mbox, one would need to:

   AND isBnode(?mbox)

and if there *might* be such a rule:

   AND !bound(?mbox) || isBnode(?mbox)

Should that go into the spec?

All this will make Pat shudder, I'm quite sure.
-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Wednesday, 23 February 2005 15:35:06 UTC