Some of the tests in the W3 Conformance suite appear to have relative URIs with no base URI supplied. I'm assuming I need to provide a default. As best I can tell, the specification states that a default base URI is "application-dependent", as per RFC3986, section 5.1.4.
I interpreted this as meaning it could be dependent on the triple-store, and since the store in question here is one I'm not only creating specifically to run tests on, but am also implementing, I figured it was appropriate to set its default base URI to whatever I wanted; namely, something it could interpret specifically as a test-related URI, and therefore look in a special location for the data files it's supposed to load.
For example, the query:
Would go to the server practically as-is, and the server would see <data-g1.ttl> as a relative URI. Seeing no base URI, would assign its default base URI - e.g. "http://testing.mycompany.com/" - combine that with the relative, resulting in "http://testing.mycompany.com/data-g1.ttl", and then interpret that as "go to this special folder of Turtle files on the server's hard drive, find 'data-g1.ttl', and load it".
Am I doing this even close to correctly?
(One of the problems I'm running into involves a translation step between receiving the SPARQL query and processing it. To process it, it needs to be expressed in a different language, and we're using OpenRDF's Sesame library plus our own custom visitor code to handle that. While the query above validates fine according to sparql.org's validator, Sesame considers it a malformed query, precisely because of that relative URI. We can't tell Sesame what the default base URI should be, at the point we need to translate it, at least not without some nontrivial and inappropriate-looking redesign.)
asked 26 Nov '12, 18:21