cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Cleanup forms/samples/resources
Date Sat, 27 Nov 2004 17:26:06 GMT
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.

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?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message