- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Fri, 19 Jan 2007 15:47:24 +0000
- To: Jeen Broekstra <j.broekstra@tue.nl>
- CC: Lee Feigenbaum <feigenbl@us.ibm.com>, dawg mailing list <public-rdf-dawg@w3.org>
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?
>
>> The text in rq25 mentions base URIs and how to treat them:
>>
>> http://www.w3.org/2001/sw/DataAccess/rq23/rq25.html#QSynIRI
>>
>> and it was the result of discussion and debate in the working group, not
>> just text some editor put in the doc.
>>
>> The more useful use of relative URIs is in the FROM clause:
>>
>> FROM <data.ttl>
>>
>> meaning maybe read from the same directory. Ditto GRAPH <data.ttl>.
>> This is used in some tests so that the location of the data file is
>> adjacent to the query but otherwise independent of location (i.e. the
>> tests work whereever you unpack them).
>
> Yes, but all of this assumes that the query is delivered to the parser
> through a file.
The query could also be read from a HTTP URL. That would matter for query
indirection for the SPARQL protocol, for example.
> "The same directory" only has meaning in that context.
> But that is not the only way to deliver a query to the parser, in fact
> in practice I suspect this will not be a very prevalent way of
> communicating queries at all. So this is not about query parsing itself
> but about processing a file which contains a query. In my opinion, those
> are separate issues.
>
> But anyway, it's a minor point and of course you are right that the
> parser _should_ be able to handle it at the end of the day. I can leave
> these tests as they are for now.
Cool - but I'd like to fully understand why their illegal because we use them
elsewhere as well so this will come up again.
Andy
>
> Jeen
Received on Friday, 19 January 2007 15:47:57 UTC