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

Re: 'FILTER' '(' Expression ')'

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Wed, 08 Jun 2005 14:43:21 +0100
Message-ID: <42A6F5F9.9070408@hp.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
CC: public-rdf-dawg@w3.org

Eric Prud'hommeaux wrote:
> "{ ?p ?s ?o FILTER ?x = q:name () ?p ?o2 }" was ambiguous so AndyS,
> DaveB, SteveH, and Jeen decided we'd put parens around the filter
> expression.

AndyS wasn't expressing an opinion one way or the other in the discussion.

 > AndyS proposed an exception for FILTER (REGEX(?a, ?b)) but
> the rest of us dragged our feet.

Regular expressions seem to be a common feature that people use with RDQL/Jena. 
  It is also a source of many questions as to the syntax.

The fully nested form

FILTER (REGEX(?a, "substring"))

is unnnecessarily bracketted.

 > example test:

I have tested requiring () on filters, except REGEXs, and it seems to work out OK.

As we accepted the syntax tests yesterday, and they would need to change, I have 
not made any changes until it is clear I can or shouldn't.

There are 3 syntax tests to change and there are about 11 examples to change 
from rq23.



== Aside

Note that this does not avoid the other parser issue around this area:

  FILTER ?x = q:name ()

has to greedily accept the () because

  FILTER ?x = q:name

is also legal.

It's common - example - "?x" and "?x + 2"

This is because we use qnames for functions and for expression constants.  Using 
"&" for function call / cast does not have this matter.  I am not proposing this 
as a solution - just giving a complete account.
Received on Wednesday, 8 June 2005 13:44:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:47 UTC