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

Re: SPARQL Query Language for RDF errata

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Sat, 18 Jun 2005 17:17:24 +0100
Message-ID: <42B44914.70707@hp.com>
To: Richard Newman <r.newman@reading.ac.uk>
Cc: public-rdf-dawg-comments@w3.org


Richard Newman wrote:
> 
> Hi,
>   I believe I've found some minor errata in the EBNF grammar. This  is 
> looking at the edition marked "W3C Working Draft 19 April 2005" at  
> <http://www.w3.org/TR/rdf-sparql-query/>.
> 
> * <AT>, as used in production 74, is not defined in this grammar (or,  
> at least, I can't find it if it is!).

It wasn't - now fixed.  The literal '@' is used in the language tag rule.

> 
> * Production 73 seems to be missing its outer brackets:
> 
> <VAR>  ::=  '?'|'$') (<NCNAME2>|<NCNAME1>

Now fixed - as part of other working group decisions, variables are now the 
productions:

[43]   Var  	  ::=    	 VAR1 | VAR2
[72]   VAR1  	  ::=    	'?' VARNAME
[73]   VAR2 	  ::=   	'$' VARNAME
[87]   VARNAME    ::=    	NCCHAR1 ( NCCHAR1 | "_" | [0-9] | #x00B7 | 
[#x0300-#x036F] | [#x203F-#x2040] )*

so the variable name is closer to being an XML NCNAME without "-" or "."

> 
> * Table 11.1 defines the regex operator as:
> 
>     regex(STRING, PATTERN [, FLAGS])
> 
> and 11.2.3.6 uses it accordingly:
> 
>     regex(str(?mbox), "@work.example")
> 
> but line 4 of production 54 mandates the second comma:
> 
>     'regex' '(' Expression ',' String ',' String? ')'
> 
> This part of the production should probably be
> 
>     'regex' '(' Expression ',' String (',' String)? ')'

This is now:

'REGEX' '(' Expression ',' Expression ( ',' Expression )? ')'

(the keyword is case insensitive) and extends the patterns and flags to be 
expressions.  This is inline with XML XPath/XQuery Functions and Operators 
fn:matches.

> 
> * Likewise for production 57:
> 
>     ArgList  ::=  ( Expression ',' Expression* )?

Yes - they had lost a pair of parentheses as well:
Corrected to be:

      ArgList ::=  '(' ( Expression ( ',' Expression )* )? ')'

> 
> * I haven't thoroughly examined the expansion for production 27, so  I'm 
> probably wrong, but it looks like it allows intermediate triples  to 
> avoid having closing '.'s. (This point is more a note to self to  check 
> my own generated parser for this possibility.)

In the grammar of April working draft the "Triples" production was one or more 
triples with a common subject, not a sequence of any triples.

This area has been rewritten to allow more cases of optional dots on basic 
blocks of triples.

> 
>   Thoughts welcome.
> 
>   Regards,
> -Richard

The changes mentioned are in the editors' draft is at:
   http://www.w3.org/2001/sw/DataAccess/rq23/
and the grammar at:
   http://www.w3.org/2001/sw/DataAccess/rq23/#grammar

The tests for the grammar might be helpful.  They are to be found at:
   http://www.w3.org/2001/sw/DataAccess/tests/data/SyntaxFull/


	Thanks for the comments
	Andy
Received on Saturday, 18 June 2005 16:17:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:48 GMT