forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: [Proposal] Sitemap parameters
Date Mon, 27 May 2002 13:24:05 GMT
> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
> From: "Carsten Ziegeler" <cziegeler@s-und-n.de>
> > Konstantin Piroumian wrote:
> > >
> > > Hi alls!
> > >
> > > While inspecting the Forrest's sitemap
> > > (src/documentation/conf/sitemap.xmap)
> > > I've found several lines that are using Ant substitution 
> params like:
> > > <map:transform src="skins/@skin@/xslt/html/{type}.xsl">.
> > >
> > > Won't it be better to have parameters at the top level in 
> sitemap that
> can
> > > be set externally, just as it is done in XSLT? So, those skin
> > > parameters can
> > > be set like this:
> > >
> > > <map:sitemap ...>
> > >     <map:parameter name="skin">forrest-skin</map:parameter>
> > > ...
> > >
> > >     <map:transform src="skins/{../skin}/xslt/html/{type}.xsl">
> > > ...
> > > </map:sitemap>
> > >
> > > This parameters can be defined when Cocoon is called from 
> the command
> line
> > > as command line arguments. Though, I have no idea how 
> these parameters
> can
> > > be set when running Cocoon as servlet, maybe 
> 'cocoon-param' request
> > > parameters can be used.
> > >
> > > Are there any technical difficulties in implementing 
> this? Any comments,
> > > suggestions?
> 
> We need that the parameter is set outside of the sitemap, and 
> the usual way
> is an Action.

My proposal was to use not the _usual_ way, but add a new way of doing it ;)

> 
> Why haven't I done it this way?
> Because it needs to run both commandline and live, and we 
> need anyway to
> have one sitemap per project.

This is not contrary to my proposal. XSLT params work wither from the
command-line or request. 

> 
> I couldn't come up with an Action that makes it easy to be 
> used both in CLI
> and in a server that has multiple Forrest sitemaps mounted.

Hm... Didn't think about subsitemaps. Will think about it...

> 
> I'd be happy to have it, though :-)

Didn't try it, but maybe request.getParameter() returns command line
arguments when run from CLI? Otherwise, how would the LocaleAction work in
CLI.

KP

> 
> --
> Nicola Ken Barozzi                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
> 
> 

Mime
View raw message