Unico Hommes wrote: > > Moving this discussion over to [EMAIL PROTECTED] > +1
> > > I had a hunch you were doing that ;-) I have been thinking about a > > > more IoC like solution for this. In order to do this a the > > > component-configurations section of a sitemap could be transformed > > > into component declarations: > > > > > > <component-configurations> > > > <global-variables> > > > <var1/> > > > </global-variables> > > > </component-configurations> > > > > > > sitemap2xconf.xsl > > > ---> > > > > > > <global-variables id="global-sitemap-variables"> > > > <var1/> > > > </global-variables> > > > > > > This would tell the sitemap container to add that component. > > > > > > Granted it is a little bit different than SitemapConfigurable, but > > > perhaps it covers the same ground? Advantages are that you > > no longer > > > have the SitemapConfigureble lifecycle, thus that any configurable > > > component can be configured local to the current sitemap. > > > > > > WDYT? > > I think, this doesn't work :) (but perhaps I'm wrong). The > > problem lies in the container hierarchy. The global input > > module, that is using the global-variables componnent is > > configured in the root container. > > So, a lookup from the global input module will never look up > > the correct version from a (sub) sitemap. > > > > So, the trick (in Cocoon 2.1) is, to have SitemapConfigurable > > that is able at runtime, to get the correct configuration of > > the current sitemap while the sitemap.variables component is > > a singleton. > > > > How about not using SitemapVariableHolder component anymore but instead > make GlobalInputModule configurable? > Yes, that would do the trick - nearly :) But there are some problems: 1) Compatibility. We have SitemapConfigurable in 2.1 and I would really like to be compatible in this area. 2) The identifier for the component used in the sitemap is currently "global-variables", the name of the input module is "global". Regardless which of the two you change, you end up in an incompatibility again, I think. Carsten
