- From: Andy Seaborne <andy.seaborne@talis.com>
- Date: Thu, 03 Jun 2010 20:34:19 +0100
- To: Gregory Williams <greg@evilfunhouse.com>
- CC: SPARQL Working Group WG <public-rdf-dawg@w3.org>
On 03/06/2010 5:11 PM, Gregory Williams wrote:
> On Jun 3, 2010, at 8:47 AM, Andy Seaborne wrote:
>
>> I've added some text for the new SPARQL 1.1 library functions:
>>
>> COALESCE, IF, IN, NOT IN, IRI, URI, BNODE, STRDT, STRLANG
>
> Andy,
>
> Looking over the text for IN and NOT IN, I'm confused by the examples. The definitions say that the elements of the IN lists are rdfTerms, but the examples seem to use expressions (1/0). rdfTerms would certainly be easier to implement, but I would guess that the definition should be using expressions?
Greg,
The prototype definitions define the types of arguments accepted by the
function and that after evaluation of expressions.
c.f. defining the function log10: (This is actually from
java.lang.Math.log10):
double log10(double a)
means the argument is a double and it returns a double.
You can write
x = log10(1+5) ;
and the expression 1+5 will be evaluated to give 6, converted to 6 as a
double then the function called.
For the SPARQL function whose functional syntax is IN:
?x IN (1, 2, 3+4)
and ?x is bound to 57
an implementation will pass down
57 IN (1, 2, 7)
rdfterm is just the most general thing an expression can evaluate to.
http://www.w3.org/TR/sparql11-query/#defn_RDFTerm
The exceptions are the forms that take expressions (e.g. COALESCE, IF)
because you can't evaluate the expressions then call the function -
these behave differently, processing/evaluating arguments as needed
based on the other arguments.
If you have suggestions for improving the presentation (appearance or
wording), please do suggest them. The general format is inherited from
what was in the SPARQL 1.0 spec except the styling has been lost
somewhere in all the reformatting.
Andy
>
> thanks,
> .greg
>
Received on Thursday, 3 June 2010 19:34:21 UTC