- From: Seaborne, Andy <Andy_Seaborne@hplb.hpl.hp.com>
- Date: Tue, 22 Apr 2003 18:41:38 +0100
- To: "'Arjohn Kampman'" <arjohn.kampman@aidministrator.nl>, "'www-rdf-rules@w3.org'" <www-rdf-rules@w3.org>
Arjohn,
There wasn't a strong reason for doing this except that in RDF the absence
of something isn't the same as undefined. Having an undefined value means
that a result set can explicitly say that the the query did not bind the
variable x. As RDF allows merging of graphs, it is possible (although just
a little strange!) to put different parts of the result in different RDF
models, giving rows URIs and doing a graph merge.
Having rs:undef does complicate things though because, like nulls in
programming langugaes or nil lists, the value is in the space of legal
values and has a meaning outside that space. Doing a query on a result set,
or on the vocabulary, could legitimately bind a variable to rs:undef.
I preferred the explicit recording of the fact that the variable was
undefined (a more complex structure could differentiate the value-as-unbound
case but it didn't seem worth it). In conjunctive graph pattern query
languages, unbound only occurs if the query asks for a variable (e.g. in the
SELECT) and does not reference it in the graph pattern.
Andy
-----Original Message-----
From: Arjohn Kampman [mailto:arjohn.kampman@aidministrator.nl]
Sent: 11 April 2003 10:28
To: www-rdf-rules@w3.org
Subject: #undef resource in Andy's ResultSet vocabulary
Hi all,
While implementing Andy's ResultSet vocabulary [1] some question concerning
the encoding of unbound variables came up. According to the document,
unbound variables are assigned the value rs:undef. What's the reason for
doing this? IMHO, it would be more natural to exclude the binding from the
result set altogether. I.e.: no binding specified --> variable is unbound.
Example: A ResultSet with two variables x and y, with x unbound, would look
like this:
<rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:rs='http://jena.hpl.hp.com/2003/03/result-set#'>
<rs:ResultSet rdf:about=''>
<rs:resultVariable>x</rs:resultVariable>
<rs:resultVariable>y</rs:resultVariable>
<rs:solution>
<rs:ResultSolution>
<rs:binding rdf:parseType='Resource'>
<rs:variable>y</rs:variable>
<rs:value rdf:resource='http://example.com/resource1'/>
</rs:binding>
</rs:ResultSolution>
</rs:solution>
</rs:ResultSet>
</rdf:RDF>
Any comments on this?
Arjohn
[1] http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html
--
arjohn.kampman@aidministrator.nl
aidministrator nederland b.v. - http://www.aidministrator.nl/ prinses
julianaplein 14-b, 3817 cs amersfoort, the netherlands tel.
+31-(0)33-4659987 fax. +31-(0)33-4659987
Received on Tuesday, 22 April 2003 13:47:01 UTC