- From: Steve Harris <steve.harris@richmondinformatics.com>
- Date: Mon, 10 Apr 2006 09:17:21 +0100
- To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
I've been implementing the casts in SPARQL (again), and I think there
a need for more tests in this area, for example:
data:
:a :p "12.3"^^xsd:integer .
:b :p "12.3" .
query:
SELECT ?x
WHERE { ?x ?y ?z . FILTER(xsd:decimal(?z) = 12.3) }
from my reading of the spec that will return ?x = :a and :b, which
might surprise anyone who's not familiar with the way RDF doesn't
handle numbers.
Also,
FILTER(xsd:decimal(xsd:integer(?z)) = 12.3)
for which I can't work out what the correct answer is, as it seems
unlikely that "12.3" is a valid lexical value for an xsd:integer, but
it's a bit odd if that gives a different result to the other test.
Also, and I'm sure I've asked this before, but 11.5 seems to indicate
that its legal to cast an IRI to an xsd:string without mentioning STR
(), which is not how I remembered that part of the design.
- Steve
Received on Monday, 10 April 2006 08:17:36 UTC