cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: [Proposal] Sitemap parameters
Date Wed, 29 May 2002 14:25:49 GMT
On 29.May.2002 -- 04:12 PM, Carsten Ziegeler wrote:
> Konstantin Piroumian wrote:
> > >
> > > Do we need to introduce new special element - <map:global-parameters/>
-
> > > here? Won't it be better to just declare parameters right inside
> > > <map:pipelines/> element?
> >
> > You are reading my thoughts! ;)))
> >

If one would extent the StringConstantModule to hold more than one
constant, or even look at the request object first whether the
parameter should be overridden, one could

(in cocoon.xconf or wherever components can be declared)

   <input-modules logger="core.modules.input">
      <component-instance name="global-defaults" class="org.apache.cocoon.components.modules.input.DefaultsModule">
	    <skin>myskin</skin>
        <base-url>http://localhost:8080</base-url>
        <!-- more default values ad lib -->
      </component-instance>
   </input-modules>

(in sitemap.xmap)

   <map:transform src="apply-skin.xsl">
      <map:parameter name="skin" value="{/module:global-defaults:skin}"/>
      <map:parameter name="base" value="{/module:global-defaults:base-url}"/>
   </map:transform>

Plus, by chosing different names for multiple instances of such module
one could have different contexts. 

Would that make sense?

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message