cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: cocoon:// design bug?
Date Sat, 17 May 2003 16:27:57 GMT
On Fri, 2003-05-16 at 22:42, Torsten Knodt wrote:
> Hash: SHA1
> Hello,
> as some perhaps read, I'm currently working on maintaining the URI's during 
> traversal through the pipelines. Now I found something strange. For accessing 
> the root sitemap, the cocoon protocol uses cocoon://. The problem is, that 
> this marks the part after this, before the next / as a hostname, and e.g. 
> can't relativize this pathes.

errr.... unfortunately you're right.

I did some spec-reading [1], and although the most general URI syntax
doesn't specify the format of what follows the scheme (cocoon:),
resolving relative URI's is only supported for those that use the
hierarchical path syntax.

So in short, there's no problem as long as we assume we'll never have to
resolve relative URL's against cocoon: base URL's. But I'd rather avoid
posing this restriction.


> What are your opinions?
> Would you agree to change this?
> And do you have ideas?

I think we'd have a hard time convincing everyone here to change this
syntax now. And it would break backwards compatibility with Cocoon 2.0.

A possible solution would be to add relative URL resolving to the Source
interface, so that the Cocoon source can use its own logic for this,
while the URLSource can use e.g. the class.

> My ideas so far:
> The problem is, that you can't give a protocol and a relative URI. My idea 
> would be to help to get an absolute URI. We use an input module, which gives 
> back a prefix to the actual pipeline. The cocoon protocol will be handled 
> like the file protocol. So you can either give an absolute URI, or use a 
> relative uri, by prepending the prefix to the current pipeline.
> What do you think?

I'm not following you here, maybe explaining with an example will help.

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message