Daniel Fagerstrom wrote:
Sylvain Wallez wrote:

Leszek Gawron wrote:

other example that I posted some time ago: if every cocoon uses error2html.xsl by default (along with some other default resources) they should be also packed into jars.




Aha! This is something I wanted to talk about when working on Cocoon stacktraces: standardizing the fact that some blocks provide resources and include them in jars.

The first block to do this is CForms, which provides a lot of runtime resources in org/apache/cocoon/forms/resources: XSLs, js, css, etc. We also have a few items for the core block in webapp/stylesheets/system and webapp/resources (js and css). What we see here is that these are runtime resources targeted both at the server side (XSLs) and the client side (js, css and also XSLs for xsl-aware browsers).

What I propose is that we define a standard layout for resources provided by blocks: they should be stored in resource://org/apache/cocoon/{block-name}/resources/


The nice thing with this propsal is that it is back compatible and follow current (emerging) conventions. OTH with the blocks architecture, using the resource protocol is not such a good idea. In OSGi resources have URLs like bundle://3/org.apache.cocoon.foo e.g. where "3" is the number of the bundle and is deployment order dependent and is therefore not usable in sitemaps. In OSGi one typically puts the resources at the top level of the jar or in directories at top level. There is normally not that much reason for puting resources in the Java package structure, as the bundle poften is an apropriate level of granularity anyway.

Look at cforms resources. flattening this structure will give you maintenance headache.

Your proposal makes sense and we should make something about the issues you describe. What you describe will not be particulary future proof though.
It will help at least for now and is applicable also for 2.1.x.

--
Leszek Gawron                                      [EMAIL PROTECTED]
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Reply via email to