hi hussayn, > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]Im > Auftrag von SAXESS - Hussayn Dabbous > Gesendet: Montag, 10. Februar 2003 15:20 > An: [EMAIL PROTECTED] > Betreff: "global sitemap parameters" and programatic cocoon > configuration > > > Hy, all > > I just fall over a configuration issue: > > 1.) assume you like to use a "global parameter" ${myserver} > within several places in your sitemap AND all subsitemaps. > Is the following (or something equivalent) possible > to do: > > <map:sitemap> > <map:parameter name="myserver" value="http://myserver" /> > > ... > > <map:match pattern="*/canvas/collection"> > <map:read src="html:${/myserver}/index.xml"/> > </map:match> > > ...
I think there's an input module available for stuff like that which IIRC makes those variables also available to subsitemaps. > > 2.) Is it possible to also add such parameters programatically > to the rootsitemap and use them all over in cocoon? > > I.e. i want the variable ${myserver} be preset from an > external configuration, which happens to be separate from > sitemap.xmap. > background: I would like to keep the customisation at one > place and keep my customers away from sitemap.xmap if possible. > > is something like this possible with cocoon: > > 1.) on-startup of cocoon process an additional java-class-instance > (a servlet, or better an initilisation-component > specified in cocoon.xconf) you can of course have another servlet declared in the web.xml and have it automatically loaded/started via <load-on-startup> (see servlet spec). the other alternative you pointed out also works and is probably the better way to go (also thought about this, needing to have something like an application core running which could be accessible as a Component). I think for this to work you have to make your 'instance' an avalon component (i.e. implements Component interface) with a defined role (you can specify your own roles in a separate file which you can reference from the cocoon.xconf, /cocoon/@user-roles IIRC). > 2.) the initialisation-class reads a customisationfile and > adds a set of global variables to the rootsitemap. it might be possible to get hold of the above mentioned input module via a ComponentManager (within your Component) and add those variables programmatically. > 3.) After cocoon came up the global sitemap parameters are > available within any sitemap.xmap .... > as I said, I think the variables should be visible in sub-sitemaps also, but I might be wrong. But from the fact that the modules declared in the root sitemap are available in sub-sitemaps I assume that the global variable module's scope is not limited to the root sitemap. > Does anyone know, if this could be achieved and if yes, could you > point me to an example or a document about this ? > Just had a quick look and I think the DefaultsMetaModule is what I had in mind. > thanks you > Hussayn > HTH > -- > Dr. Hussayn Dabbous > SAXESS Software Design GmbH > Neuenhöfer Allee 125 > 50935 Köln > Telefon: +49-221-56011-0 > Fax: +49-221-56011-20 > E-Mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>