W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2004

RE: variables prefix - ?variable vs. $variable

From: Dirk-Willem van Gulik <dirkx@webweaving.org>
Date: Tue, 31 Aug 2004 05:44:49 -0700 (PDT)
To: "Seaborne, Andy" <andy.seaborne@hp.com>
cc: Alberto Reggiori <alberto@asemantics.com>, RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-ID: <20040831053621.Y64496@skutsje.san.webweaving.org>



On Tue, 31 Aug 2004, Seaborne, Andy wrote:

> So are you saying ALL '?' get processed, even if in a literal?

We've found several JDBC interfaces where this is downright buggy; and
where an escape of a ? which is followed by something which happened to be
a ?validvarname is handled incorrectly.

I.e. {escape 'escape-character'} does not work for some inside a literal.

> How does a client ask query that involves a ? in a string?

Use an escape sequence; such as \.

BUT these are often trapped by, say, the java compiler. So you end up
having to use, say, a more harmless / and end up with:

statement.executeQuery(
  "SELECT * FROM FACT WHERE
	DESC='Dirkx/'s opinion is that escaping sucks too ' {escape '/'}");

statement.executeQuery(
  "SELECT ?x FROM FACT WHERE
	DESC='Where are the pigeons/?' { escape '/'}");

Which gets downright horrible if you need a ", { or ' also in
your query string in a langauge where they also have a special
meaning. (And pray that % and  _ which are special in LIKE
are not part of it - but luckily most DB's allow for the { escape } to
be used multiple times in the same string).

Hence; lets avoid the ? and use a '^', '@', '+' or something harmelss.

Dw.
Received on Tuesday, 31 August 2004 12:56:51 GMT

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