W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > October 2007

Re: Typos in SPARQL 2007-06-14

From: Lee Feigenbaum <lee@thefigtrees.net>
Date: Thu, 25 Oct 2007 15:28:51 -0400
Message-ID: <4720EE73.3060406@thefigtrees.net>
To: Dave Beckett <dave@dajobe.org>
CC: public-rdf-dawg-comments@w3.org

Dave Beckett wrote:
> In
>   11.6 Extensible Value Testing
>   http://www.w3.org/TR/rdf-sparql-query/#extensionFunctions
> the first paragraph says
>   "An extension function takes some number of RDF terms as arguments and
>    returns an RDF term."
> but the examples don't have *RDFterm* arguments or return values; the
> arguments are all *numeric* and the return values are xsd types.  Those
> are not RDF Terms.

The first paragraph in 11.1 Operand Data Types (#operandDataTypes) says

"""
SPARQL functions and operators operate on RDF terms and SPARQL 
variables. A subset of these functions and operators are taken from the 
XQuery 1.0 and XPath 2.0 Functions and Operators [FUNCOP] and have XML 
Schema typed value arguments and return types. RDF typed literals passed 
as arguments to these functions and operators are mapped to XML Schema 
typed values with a string value of the lexical form and an atomic 
datatype corresponding to the datatype IRI. The returned typed values 
are mapped back to RDF typed literals the same way.
"""

That is, the SPARQL functions operate on and return RDF terms, but there 
is a direct two-way mapping between them and the XSD types that XPath 
F&O defines semantics against.

> In the second example, the return value of xsd:boolean is probably
> wrong, given it's used in as a distance and compared to < 10.
> A < B for A:boolean and B:integer will be evaluated as a numeric
> so that's 0<10 or 1<10.  Probably the return value should be xsd:integer?

Right, thanks. Fixed in the editor's draft.

> So I would have expected:
>  RDFTerm aGeo:distance (RDFTerm x1, RDFTerm y1, RDFTerm x2, RDFTerm y2)
> 
> 
> Also, is this a normative reference?
> $ lynx -dump http://www.w3.org/TR/rdf-sparql-query/|grep -i wikipedia.org
>  752. http://en.wikipedia.org/wiki/Multiset
> 
> :)

No :) But we have added it as an informative reference. Thanks for 
pointing that out.

Lee

> Dave
> 
> 
> 
> 
Received on Thursday, 25 October 2007 19:29:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:52 GMT