cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Cleanup forms/samples/resources
Date Mon, 29 Nov 2004 12:51:46 GMT

On 27 Nov 2004, at 17:26, Sylvain Wallez wrote:

> Reinhard Poetz wrote:
>
>>
>> After working a lot with cForms the last week I was fed up by looking 
>> at the resources directory and always having a sense of staring at a 
>> big mess. I moved all images, css and js into their own directories. 
>> Unfortunatly this broke templates that reference images directly. As 
>> cForms are not stable I wouldn't care about this (it won't be the 
>> last thing that changes until we mark cForms as stable) and simply 
>> add a release note but if others think different, I could add an 
>> additional pipeline for gifs.
>
>
> As the number of resources is growing, it is good to organize them and 
> creating subdirectories is ok. However, we must keep them under a 
> single root resource dir to allow a simple <map:read> to serve any of 
> these resources.
>
> Too often I see sitemaps having a myriad of simple match/read for 
> *.gif, *.jpeg, *.js, *.css, etc when a simple <match 
> pattern="resources/**"> would do the job.

Yes, I was one of the people always doing that !!!
I always assumed you needed to add the mime-type to the <map:read/> so 
needed specific pipelines for each type.

Thanks for the tip !!!

> Also, now that these resources have stabilized, we may move them into 
> the cform's jar, in order to avoid copy/pasting them in every project. 
> The resources pipeline would then become:
>
> <map:match pattern="form-rsrc/**">
>  <map:read src="resource://org/apache/cocoon/forms/resources/{1}"/>
> </map:match>
>
> WDYT?

Certainly makes sense to me, for a stabilised CForms.

More realistically, you would probably want :

<map:match pattern="**form-rsrc/**">
  <map:read src="resource://org/apache/cocoon/forms/resources/{2}"/>
</map:match>

To cater for CForms usage in sub-directories as well.


regards Jeremy

--------------------------------------------------------

                   If email from this address is not signed
                                 IT IS NOT FROM ME

                         Always check the label, folks !!!!!
--------------------------------------------------------


Mime
View raw message