Re: Comments on SPARQL (datatypes, valueTesting)

On Mon, 2005-05-16 at 09:17 -0700, Ashok Malhotra wrote:
> Notes on SPARQL Query Language for RDF
> W3C Working Draft 17 February 2005

[...]
> Section 3.  Decimal values cannot be written as literals.  This seems like a needless limitation.  Suggest SPARQL use the literal definitions in XPath,

In XPath, 0.2 represents a decimal and not a float?
I'm pretty sure that's not the case in XPath 1;
checking http://www.w3.org/TR/2005/WD-xpath20-20050404/ ...

Sure enough...

"12.5 denotes the xs:decimal value twelve and one half."
 -- http://www.w3.org/TR/2005/WD-xpath20-20050404/#id-literals

that's news to me!

Andy, Eric, Dave, did you know about that?

> Section 3.1 has a very brief section entitled "Matching Arbitrary Datatypes".   There is no explanation for how this works.

I leave that to the editors...

> Presumably, RDF encodes metadata about data that is represented as XML.  If this is the case, why are all the XML Schema datatypes not supported?  See section 11.2.

Queries over any datatype can be expressed,
but support for functions and operators beyond
integers and strings (and probably dates; the issue is still open)
is optional.


> The RDF datatype URI is a restriction of the XML Schema datatype anyURI in that only absolute URIs are supported.

Well, no; RDF doesn't define a URI datatype. It defines a type of term
called URI, but this type of term isn't a literal at all; it's a name.

http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-URI-reference

>   It might have been simpler just to support the XML Schema datatype and call out this restriction.
> Section 11.2.1.1 introduces the function URI-equal..  How is this different from a string compare?  Does it work if one of the URIs is escaped and the other is not?

EricP, let's have a test for that, shall we?

> Section 11.2.1.3 introduces the function isURI.  Is this necessary?  There is another function that returns the datatype of a variable.

As I say, a literal of type xs:anyURI is a very different beast from a
URI term.

> As far as I can tell, string comparison is defined only using the code point collation.  Other collations are not supported.  This may be a significant limitation.

Right.

> There are a number of typos that we have not pointed out.

Thanks for your review!

> 
> Ashok Malhotra for the XML Query and XSL WGs
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
see you at XTech in Amsterdam 24-27 May?

Received on Monday, 16 May 2005 19:58:52 UTC