On Tue, Dec 13, 2005 at 12:49:34PM +0100, Geert Josten wrote:
> Here is a simple alternative:
>
> Use input modules to insert the application specific base urls. Something
> like:
>
> <map:generate src="{my-config:base-url}/my-query.xml" />
>
> You have several default input modules at your disposal, for reading
> properties files, xml, etc. You can define them locally in your sitemap by
> the way..
>
> Regards,
> Geert
Thank you, Geert. It works. I created an entry in WEB-INF/cocoon.xconf:
<component-instance
class="org.apache.cocoon.components.modules.input.XMLFileModule"
logger="core.modules.input"
name="pprotoconf">
<file src="context://pproto/conf.xml"/>
</component-instance>
and a file called 'conf.xml' in the tomcat5/webapps/cocoon/pproto directory
(URLs and names of services changed for this example):
<?xml version="1.0"?>
<conf>
<service1>http://host.domain.org:port/path/service1</service1>
<service2>http://anotherhost.anotherdomain.org/path/service2</service2>
</conf>
In the sitemap I could then use references like:
<map:parameter name="srv1" value="{pprotoconf:/conf/service1}"/>
where 'pprotoconf' in '{pprotoconf:/conf/service1}' references the the name
attribute of the component-instance and '/conf/service1' is an XPath
expression.
Regards,
Fred Vos
>
> Fred Vos wrote:
>
> >Hello,
> >
> >At work we are working on a Cocoon application that uses http requests in
> >generators. The base URLs in these requests differ for each instance of our
> >application. We don't want people to edit the sitemap to change URLs of
> >these
> >external services, everytime the sitemap changes. During development we
> >also
> >want to keep our local configuration.
[...]
--
|E R
| D F
|
|fred at fredvos dot org
|5235 DG 52 NL +31 73 6411833
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]