Re: Comments on SPARQL Query Language for RDF (draft)

Relies to comments on the grammar:

Arjohn Kampman wrote:
... other comments ...

> 
> Some issues with the current grammar that might be worth resolving:
> - It allows "DESCRIBE <my:URI> WHERE ..."

Intentional.

> - The first rule for PropertyList is both recursive and repetitive.
>    Substituting the '*' with a '?' would fix this.

Fixed.

> - Same issue as above for ObjectList.

Fixed

> - An equivalent but clearer definition for Collection would be:
>    Collection ::= '(' GraphNode* ')'

Good idea - it's still GraphNode+ because () is handled separately to avoid
making "()."  legal.

> - The rule for ConditionalXorExpression is both unnecessary and
>    confusing. It should probably be removed.

Done

> - The Expression argument for functions like STR, LANG, DATATYPE, etc.
>    seems to be too generic. It even allows one to apply these functions
>    on boolean expressions containing ANDs and ORs. Might it be possible
>    to replace these arguments with VarOrTerm?

It is a bit more general that VarOrTerm - it is supposed to cover the result of 
function call.

> - RDFLiteral allows the definition of literals with both a langauge tag
>    and a datatype. Should be easy to fix, e.g.:
>    RDFLiteral ::= String ( <LANGTAG> | '^^' URI )?

Done

> - <LANGTAG> only allows language tags that consists of max two
>    components. However, the following document also seems to use tags
>    with three or more tags like "zh-min-nan" and "en-GB-oed":
>    http://www.iana.org/assignments/language-tags

I believe the grammar is already aligned with RFC 3066.  The token A2Z is not a
2 characters; it's "A to Z".

<LANGTAG>   ::=  '@' <A2Z>+ ('-' (<A2ZN>)+)?

and RDF 3006 has:

Language-Tag = Primary-subtag *( "-" Subtag )
Primary-subtag = 1*8ALPHA
Subtag = 1*8(ALPHA / DIGIT)

(I also note that the language-tags document has tags that are not covered by 
the production in 3066).

> - The presentation of <QNAME>, <BNODE_LABEL>, <STRING_LITERAL1> and
>    <STRING_LITERAL2> suggest that these have two production rules. It
>    took me quite some time to find out that these were just single rules
>    that were spread over two lines. Placing the full rules on single
>    lines will prevent this confusion for other readers.

Noted.

The changes are in the testable version of the grammar and will get rolled into 
the working draft when the grammar is next updated.

	Thanks for the comments,
	Andy

Received on Tuesday, 29 March 2005 12:14:44 UTC