forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhatia Praveen, HCLT-Japan" <prav...@hcltech.co.jp>
Subject RE: How to pass parameter to .xsl file of <map:> construct?
Date Thu, 25 Nov 2004 05:21:30 GMT
Dave,
   What I would like to do is to have a parameter in the
parameterizedfile.xsl like
    <xsl:param name="level">

    When i pass through the <map: > construct I want to be able to do the
following:

    apply parameterizedfile.xsl with param level=4

    and on another occation with param level=3 and so on.

    The parameter "level" can be control the behavior of the
parameterizedfile.xsl to produce parameterized pages.

Praveen

-----Original Message-----
From: Dave Brondsema [mailto:dave@brondsema.net]
Sent: Thursday, November 25, 2004 2:10 PM
To: user@forrest.apache.org
Subject: Re: How to pass parameter to .xsl file of <map:> construct?


Bhatia Praveen, HCLT-Japan wrote:
> Hi,
>    I would like to know how to pass a parameter though <map:  ...>
> conscturct of sitemap.xmap
> 
>    For example in the example below (from forrest site) how do I pass a
> paramter to paramterizedfile.xsl?
> 
> 
> <?xml version="1.0"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>  <map:pipelines>
>   <map:pipeline>
>    <map:match pattern="**download.xml">
>     <map:generate src="{project:content.xdocs}{1}download.xml" />
>     <map:transform
> src="{project:resources.stylesheets}/parameterizedfile.xsl" />
>     <map:serialize type="xml"/>
>    </map:match>
>   </map:pipeline>
>  </map:pipelines>
> </map:sitemap>
> 
> 
> Praveen

Look through forrest's own files to see if you can find an example. 
Also it will be useful to investigate the Cocoon documentation 
(http://cocoon.apache.org/) because Forrest uses Cocoon for this stuff.

What sort of parameter do you want to pass?  Something similar to 
{project:content.xdocs}?  Those are set in cocoon.xconf in the 
<component-instance> sections for ForrestConfModule.  As you see there, 
it is mostly @foo@ variables which are replaced with normal ant properties.

-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Mime
View raw message