cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Static Params?
Date Tue, 15 Jan 2002 16:00:02 GMT
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> 
> Vadim Gritsenko wrote:
> >
> > <map:pipeline>
> >   <map:match uri="paper-*/*.html">
> >     <map:variables>
> >         <map:parameter name="host-uri"
value="http://www.d-haven.org"/>
> >
> >         <map:generate src="docs/papers/{../1}/{../2}.html">
> >           <map:parameter name="static-uri" value="{host-uri}/paper-
> >  {1}/{2}.html"/>
> >         </map:generate>
> >         <map:serialize/>
> >     </map: variables>
> >   </map:match>
> > </map:pipeline>
> >
> > (I moved declaration of variables inside matcher to show that it's
> > possible to define map variables at any level)
> >
> > Unfortunately, this thread was ended with decision to add
> > <map:parameter>s to <map:call>. So, there are two options now:
resurrect
> > this thread or to choose one of the matchers/actions to do this for
you.
> >
> 
> One simple solution is to write your own action which provides all
> parameters
> it gets to the inner elements:
> 
> <map:act type="parameter_provider">
>   <map:parameter name="host-uri" value="http://www.d-haven.org"/>
> 
>   <map:match uri="paper-*/*.html">
>       <map:generate src="docs/papers/{1}/{2}.html">
>           <map:parameter name="static-uri"
> value="{host-uri}/paper-{1}/{2}.html"/>
>       </map:generate>
>       <map:serialize/>
>   </map:match>
> </map:act>
> 
> You might call this nonsense, but the good news is: it is currently
possible
> and you only need to write a simple java class with 4 lines of code.

...and I even will add this to set of existing actions - if time
permits...

Vadim


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


Mime
View raw message