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: [Proposal] Sitemap parameters
Date Wed, 29 May 2002 14:04:01 GMT
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> 
> 
> Stuart Roebuck wrote:
> >
> > On Wednesday, May 29, 2002, at 10:17 AM, Konstantin Piroumian wrote:
> >
> > > I've seen that discussion, but had problems with mail server and
> > > couldn't
> > > join to it.
> > >
> > > My proposal is a little different. While input modules provide a
way to
> > > _get_ variable values from different sources (sitemap, request,
etc.),
> > > my
> > > need is to _set_ global parameters for the sitemap to avoid things
like
> > > @skin@ in matcher patterns, etc. Of course these params can be
used as
> > > "sitemap:param-name" everywhere when needed. The above example
would
> > > look
> > > like:
> > >
> > > <map:transform src="skins/{sitemap:skin}/xslt/html/{type}.xsl">.
> > >
> > > Behavior can be the same as for the XSLT params: if a value is
specified
> > > externally (from command line or request params) then it's used,
> > > otherwise
> > > the default value is used that is specified in declaration of the
> > > parameter:
> > >
> > > <map:parameter name="skin" value="forrest-skin" />
> >
> > Just to say that this kind of functionality would be *really*
useful.
> >
> And now the good news: it's already implemented in the latest CVS :)
> 
> You can configure the global parameters in the map:pipelines section:
> <map:pipelines>
>   <map:global-parameters>

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?

Then it will be simply:

<map:pipelines>
  <map:parameter name="skin" value="forrest-skin"/>

(Which can be thought of as: "parameters for the *all* pipelines)

  <map:pipeline>
    <map:match pattern="test">
       ...
       <map:transform src="{../skin}.xsl"/>
    </map:match>
    ...

</map:pipelines>


Vadim

>      <map:parameter name="skin" value="forrest-skin"/>
>   </map:global-parameters>
> 
> and use it:
> 
>   <map:pipeline>
>     <map:match pattern="test">
>        ...
>        <map:transform src="{../skin}.xsl"/>
>     </map:match>
> ...
> 
> Carsten
> 
> Carsten Ziegeler     Chief Architect     Open Source Group, S&N AG
> ------------------------------------------------------------------
>              Cocoon Consulting, Training and Projects
> ------------------------------------------------------------------
> mailto:cziegeler@s-und-n.de                  http://www.s-und-n.de
>                     http://ziegeler.bei.t-online.de


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


Mime
View raw message