cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [RT] ComponentizedProcessor (was RE: Migrating TreeProcessor to Fortress)
Date Wed, 12 Nov 2003 10:58:57 GMT
Unico Hommes wrote:
> 
>>Side note: relative URIs
>>------------------------
>>The various considerations about inheritance above leads to 
>>the question 
>>of resolution of relative source URI (Carsten raised this issue some 
>>time ago): what is the base URI that should be used by the resolver?
>>
>>My opinion is that the base URI should be the one of the sitemap 
>>_handling_ the request. This means that "jumping" to another sitemap 
>>through virtual components or view inheritance should not affect the 
>>base URI.
>>
>>However, there are many situations where we want to use a source 
>>relative to the _current_ sitemap regardless on how it's called. For 
>>this, I propose a new protocol similar to how "context:" behaves with 
>>the root sitemap, but for non-root sitemaps. The "sitemap:" protocol 
>>comes to mind, but I'm not sure this is a good name.
>>
> 
> 
> Wild idea: context:/ identifies the current context, context://
> identifies the root sitemap? Like in cocoon: protocol?

 >*shudder*<

PLEASE, read this rant.

I think it is an abuse of the the URL protocol to specify different
semantics for one slash verses two.  You are opening the door to
introducing more errors than this "cool" feature solves.  Please make
relative URLs very different from absolute URLs.

The way relative URLs work according to the spec is to simply have the
portion of the URL that you want to tack on to the end.  For instance,
foo/bar/baz.xml would be tacked on to context://path/to/current/context/
and create the full URL.

The key here is to be able to specify the base URL for resolving URIs.
By default we are still using the file:// URL protocol as our base
URL.  Perhaps that should change?

Bastardized URL specs will be the source of many user requests saying...

Question:
I have the XYZ resource set up in my sitemap, and it is where I told it
to be.  How come the sitemap can't find it?

Answer:
Oh, you are missing a slash from the context:/ URL.  Add that in and it
should work.

THink about it carefully.


Mime
View raw message