> Am 13.03.2015 um 17:29 schrieb Sven Van Caekenberghe <[email protected]>:
> 
> 
>> On 13 Mar 2015, at 17:20, Norbert Hartl <[email protected]> wrote:
>> 
>> My concern is more that
>> 
>> 'urn:foo:bar' asUrl
>> 
>> doesn't do what it should :)
> 
> That is because #urn is not in #schemesNotUsingDoubleSlash, it should 
> probably be added. 
> 
> But then I have to read more about it first.
> 
> https://en.wikipedia.org/wiki/Uniform_resource_name

I need to dig into it, too. I just wondered why

'abc' asUrl 

prints '/abc'

That doesn't appear right. What do you think? It is just a URI path or a 
relative URL (depending how you like to put it). A relative URL resolved by a 
base URI will work because 'http://foo.com/foo//abc' <http://foo.com/foo//abc'> 
(<— double slash) is still valid. 

I think that scheme is supposed to be a class and the parsing of the remaining 
string is delegated to that scheme. That would make it more easy to have URL 
(the locator part) as specialization to plain URI. But then it will make the 
code base a lot more complex and performance wise it probably has its cost. But 
then there would be a scheme registry that can easily extended by custom 
schemes.

Just some quick thoughts,

Norbert

Reply via email to