Re: syntax tests update

Seaborne, Andy wrote:
> 
> 
> Jeen Broekstra wrote:
> ...
>>>>> Also: a fair number of the errors Sesame's parser throws have to do
>>>>> with the queries in the syntax-sparql2 set, which use relative URIs in
>>>>> queries (e.g. <a>, <b>, <p1>, etc.). A relative URI has to be resolved
>>>>> against a base URI - which is normally provided using a BASE clause.
>>>>> However, the queries in this test set do not have such a clause. Andy
>>>>> has pointed out to me that according to RFC3986 (URI) in such cases
>>>>> the base URI should be provided by the 'embedding entity', i.e. the
>>>>> location of the file that contains the query. Sesame's query parser
>>>>> has no feature for this however: it only accepts a query string as an
>>>>> argument, a base URI for resolving any relative referencing inside
>>>>> that query can not be provided seperately. I guess that this is a
>>>>> shortcoming in our current parser that we should deal with in Sesame.
>>>>>
>>>>> However, correct resolution in this fashion is a feature of file
>>>>> processing, not query parsing, IMHO, and the test set is designed to
>>>>> test query parsing, not file processing. So I would suggest that we
>>>>> modify these test cases to have a base URI inside the query. This
>>>>> avoids having implementations fail tests on this problem. Thoughts?
>>> Relative URIs are in the grammar via the production
>>>
>>> [66]     Q_IRI_REF  ::=     '<' ([^<>'{}|^`]-[#x00-#x20])* '>'
>>>
>>> and
>>> http://www.w3.org/2001/sw/DataAccess/rq23/rq25.html#iriRefs
>>>
>>> That does not mean that the parser is required to resolve them at that
>>> point but it seems reasonable to me that a test expect the parser to
>>> accept any legal URI as a syntax test.
>>
>> Yes but my point is  that they are not in and of themselves legal URIs.
>> It requires additional information in the form of a base URI (which is
>> not part of the query itself) to make them into legal URIs.
> 
> I must have missed something - in what way are they illegal URIs?

They are not exactly illegal, but it's always been my impression that
the notion of a relative URI reference is not an independent entity. You
can not _only_ supply a relative URI reference and say "this is a legal
URI", you have to have some means to convey a base URI (for example, by
a BASE clause, or by resolving against the document URL) to determine
the eventual actual (full) URI reference.

The point I'm making is that processing a BASE keyword is part of SPARQL
query parsing, but resolving relative URI references against the
location of a file which happens to contain a query is not about SPARQL
query parsing but about file processing.

At least that's how I see it currently. But as I said, it's a minor
point, and I can certainly see how you can view this differently (for
one thing, I assume it's the parser's job to resolve URIs, which is of
course not always true - it just happens to be the way we implemented it).

Jeen
-- 
Dr. Jeen Broekstra                                          Den Dolech 2
Information Systems Group                                        HG 7.76
Department of Mathematics and Computer Science              P.O. Box 513
Technische Universiteit Eindhoven                      5600 MB Eindhoven
tel. +31 (0)40 247 36 86                                 The Netherlands

Received on Monday, 22 January 2007 09:09:59 UTC