W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2005

str() and bNodes

From: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
Date: Wed, 9 Nov 2005 11:37:56 +0000
To: DAWG public list <public-rdf-dawg@w3.org>
Message-ID: <20051109113756.GC18049@login.ecs.soton.ac.uk>

A while back I had some concerns over the change of behviour in the
current rq23 draft w.r.t. bNodes.

Suppose you have a load of biblographic entries which have dc:source data
attched, you wish to return the data which does not come from amazon.com.
A reasonable query might look like:

SELECT ?thing ?source
WHERE { ?thing dc:source ?source .
	 FILTER(!regex(str(?source), "amazon.com")) }

Which works fine for things like

[ dc:source <http://amazon.com/whatever/> ]
[ dc:source "amazon.com" ]

but does something unexpected for expressions like

[ dc:source [ a :Library ; dc:title "Library of Congress" ] ]

Its not a huge problem, but its worth noting. Its seems a bit odd that
str(<http://foo/>) is fine and str("1.0"^^:footSize) is fine, but
str(_:a) rasies a type error.

- Steve
Received on Wednesday, 9 November 2005 11:38:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT