RE: data-r2 version of SPARQL tests

"imikhailov" <imikhailov@openlinksw.com> wrote on 04/15/2007 03:01:18 PM:

> Hello Lee,
> 
> > http://www.w3.org/TR/rdf-concepts/ says that "A plain literal is a
> string
> > combined with an optional language tag."
> > http://www.w3.org/TR/rdf-sparql-query/ , 11.4.7, says that "datatype 
...
> > returns the datatype IRI of typedLit; returns xsd:string if the the 
> > parameter is a simple literal."
> 
> "simple literal" is defined in
> http://www.w3.org/TR/rdf-sparql-query/#operandDataTypes :
> 
> """
> # simple literal denotes a plain literal with no language tag.
> """
> "string"@en has a datatype, and so is not of an acceptable type for
> datatype(). Therefore, datatype() returns an error which propagates to 
the
> top of the FILTER and eliminates :x3 as a possible binding for ?x.
> 
> 
> 
> Thank you for explaination, now I understand why I don't have a bug.
> Nevertheless I see a small problem: there's no way to destinguish 
"string"
> and "string"^^xsd:string using only built-in functions.

This was a design decision by the working group many months ago. 
Nevertheless, I believe that you can make this distinction:

FILTER(!sameTerm(?lit, str(?lit)))

EricP, please correct me if I've got this wrong.

Lee

Received on Sunday, 15 April 2007 21:22:37 UTC