You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by "Bhatia Praveen, HCLT-Japan" <pr...@hcltech.co.jp> on 2004/11/25 05:56:49 UTC

How to pass parameter to .xsl file of construct?

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

Re: How to pass parameter to .xsl file of construct?

Posted by Dave Brondsema <da...@brondsema.net>.
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