Custom URI schemes & KDE

Frans Englich frans.englich at
Fri Dec 30 16:39:47 GMT 2005

On Friday 30 December 2005 15:13, David Faure wrote:
> On Friday 30 December 2005 16:13, Frans Englich wrote:
> > Hi all,
> >
> > Some KDE applications needs custom URI schemes. One such is KMyMoney, as
> > discussed kde-devel some time ago. Gentle Internet citizen as we are we
> > cannot simply make up schemes because of the interoperability problems it
> > would lead to
> I don't get it.
> Either the custom URL is purely internal to the application - and then it
> really doesn't matter much what it uses, since it can't clash with another
> application's internal custom URLs - or the URL is used to actually load
> the files using KIO, and then we need a normal-looking protocol to get the
> associated kioslave, not a ",2004:KMyApplication" protocol. What
> do I miss?

An application needs to shuffle data around and -- for internal use -- invents 
a "data" scheme. Then the application grows and the URI scheme becomes part 
of, say, an interface between plugins. Who knows what happens, perhaps KIO 
gains support for the actual data scheme(RFC2397) and the mess is there.

If that imaginary example seems like a strawman, perhaps the KMyMoney case 
doesn't. The scheme name "sql" was decided for, which more or less begs for 
that Oracle, IBM & Acme writes an RFC for the "sql" scheme, which then a DB 
related class in Qt/KDE gains support for ... and then the confusion and 
potentially technical problems are there.

Neither, I don't think the line between internal/public is black and white. 
Not only because the future is difficult to predict, but because URIs often 
have a role of interchange. If people didn't need the "tag" scheme, they 
would just invent rogue schemes as you suggest, or write RFCs.

Here's another example: a DOM 3 Core application need to report errors to a 
DOMErrorHandler. The only way to uniquely identify errors is to put URIs in 
the DOMError's "type" attribute.

Evidently, I think problems can occur with rogue schemes. Thus, from my 
perspective there are two alternatives: either to organize it now such that 
problems /cannot/ occur in the future, or to cross ones thumbs and hope 
people gets it right, and if they don't, attempt to clean it up.

Does the advice "Hey, use the tag scheme for your URIs" or anything else in 
the document have in anyway a negative impact?



PS. I think "normal-looking protocol" is a weird term, 
",2004:KMyApplication" is a fully valid protocol. One could easily 
use something like that with KIO. Say, a custom scheme for loading resource 
files. It doesn't look as simple as say "http", but that's just syntax.

More information about the kde-core-devel mailing list