I also think this would be an annoying feature and I would urge people NOT to do it.
I came across this as a feature of another SPARQL store (Virtuoso?), when I was trying to understand a SPARQL query which someone had written, using a prefix I wasn't familiar with, and which was not declared. I couldn't understand at first how the query was even acceptable to the SPARQL store, with the undeclared prefix. Then I had to find out what the prefix was supposed to mean (i.e. what URI it was so supposed to represent), and only then could I work out what the query did. In that case, the lack of a declaration was a barrier to understanding, and wasted a significant amount of time. The point is that the relation between a prefix and a URI is purely conventional. I know from my own experience that the prefix "crm:" is quite commonly associated with two distinct URIs. By allowing the use of undeclared prefixes, you would undermine the intelligibility of your queries both to humans and to SPARQL stores which have a different association for a prefix, or no association. I think this a major disadvantage which outweighs the minor benefit to a query author in not having to specify a prefix. You only have to write the query once, but there may be many people who read the query later, and if it lacks a prefix declaration, you may waste a lot of other people's time. Fuseki's built in web client has a nice feature where, if you type an undeclared prefix in your query, it will insert a prefix declaration for you. I think that a SPARQL editor is the appropriate place to add this kind of functionality; it saves the author time, but it also leaves the query fully explicit and intelligible (and standards-compliant). On 27 February 2018 at 00:33, ajs6f <[email protected]> wrote: > If this becomes a PR, it should be configurable, and should default to > off. To me, far from being helpful, it would be extremely annoying. > > As far as getting changes included in a new SPARQL rec, Andy would know > the most about the potential for that, since he was an editor for the last > one. > > ajs6f > > > On Feb 26, 2018, at 1:51 AM, Laura Morales <[email protected]> wrote: > > > > Because to me it seems like a very useful feature for Fuseki. For users > it's simpler to think in terms of short properties instead of long urls, so > they can submit queries right away without worrying of what is the exact > url for a particular prefix. I'm not saying that this is a fundamental > feature that Fuseki must have, but rather just an option that would be > really useful. By the way, this is already happening with "a". In order to > use this keyword, there is no need to use "PREFIX rdf: < > http://www.w3.org/1999/02/22-rdf-syntax-ns#>" all the time. Which I think > is really useful because I can remember "a" by heart but I would never be > able to recall such a long prefix. > > Should maybe this be in the SPARQL specifications before Fuseki adds it, > the same way "a" is? I could send an email to w3c for consideration. > > > > > > > > > > Sent: Sunday, February 25, 2018 at 10:46 PM > > From: ajs6f <[email protected]> > > To: [email protected] > > Subject: Re: Use PREFIXes by default > > If you are not concerned about performance, why not add those prefixes > client-side? > > > > > > ajs6f > > -- Conal Tuohy http://conaltuohy.com/ @conal_tuohy +61-466-324297
