Derek Hohls wrote:
In case anyone needs a reference:
http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html#GlobalInputModule



[EMAIL PROTECTED] 2005/05/20 10:11:36 AM >>>

Martin Rusnak wrote:

Dear all,

I have some global variables set for a pipeline in subsitemap:

<map:pipelines>
 <map:component-configurations>
   <global-variables>
   ...
   <global-variables>
 <map:component-configurations>
<map:pipelines>

How can I separate them to allow quick site specific configuration?

use some input module for that (xml file input module for example) instead of global sitemap variable.

...or use an XML entity, like:

1) Insert this at the beginnging of the sitemap:
<!DOCTYPE sitemap SYSTEM "./resources/dtds/sitemap.dtd" [<!ENTITY configuration SYSTEM "configuration/parameters.xml">]>


2) Configuration/parameters.xml should follow this format:
<?xml version="1.0" encoding="iso-8859-1"?>
<map:component-configurations xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<global-variables>
<app-name>MapClientBase</app-name>
<!-- ... etc ... -->
</global-variables>
</map:component-configurations>


3) Place &configuration; inside the "<map:pipelines>" element (it will be substituted by the parameters.xml document).

One caveat: when you modify parameters.xml, you should "touch" sitemap.xmap as well, in order for Cocoon to re-load the changed parameters.xml file.

Regards,

--------------------
   Luca Morandini
www.lucamorandini.it
--------------------


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



Reply via email to