Fred Vos wrote:
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.

Furthermore we generate links to external services and these links also differ
for each instance of the application.

A simple approach is to generate a sitemap.xmap file using a template file for
the sitemap and an XML document containing a list of external services. A
simple XSLT script can transform the template sitemap file into a sitemap
file.

This requires regenerating the sitemap file after changing either the sitemap
template or the file with base-URLs.

For generating links, the XML document with base URLs can be used in the XSL
script that generates HTML.

Maybe there are better ways to solve this problem. If anyone has a good
solution and scripts available, please let me know.

Over in the Forrest project we have an InputModule called a locationmap [1].

This will be ideal for your problem. You can either create a locationmap for each individidual deployment of your application, or you can dynamically create it at runtime.

Although this is a part of Forrest, you can easily lift the required source files for your project if you don't want to use the whole of Forrest. It would be great to se this code moved into a Cocoon block to facilitate its reuse in projects such as yours. We'd be happy to help you identify the bits you need via the Forrest mailing lists [2]. (I can't guarentee to see you mails here, I don't read as this list as closely as the Forrest ones)

Ross

[1] http://forrest.apache.org/docs_0_80/locationmap.html
[2] http://forrest.apache.org/mail-lists.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]