Re: Value testing: implementing str()

It seems logical. I havent implemented it so dont grok the problems yet,
but I have a few minor concerns:

On Sun, Feb 20, 2005 at 02:00:03PM +0000, Andy Seaborne wrote:
> Proposal:
> 
> 1/ str(type literal) return lexical form for the typed literals, without 
> canonicalization

Seems reasonable and useful.

> 2/ str(bNode) is an evaluation error

Is it out of the question to get a string with the same form as a N3 bNode
back? eg _:a. I'm not sure I'd argue for that, but I think that rejecting
all solutions which feature str(?x) where ?x binds to a bNode will be
inconvient and supprising in some cases.

> 3/ str(expression) is legal - change the grammar production

This seems right, but interacts a bit oddly with 1/ in that str(?x) and
str(?x + 0) are quite different, even when ?x is bound to an integer:

	ex:foo rdf:value "001"^^xsd:Integer .

	SELECT ?x WHERE (ex:foo rdf:value ?x) AND str(?x+0) != "999"

Quite possbily not an issue, but ?x and ?x+0 seem similar to me.

> The only other choice I see is that str() only apply (syntactically) to a 
> variable but is we have value-based constraints, this is a rather odd.

Yes, that seems odd.

- Steve

Received on Sunday, 20 February 2005 15:08:25 UTC