cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: Passing Sitemap Params
Date Fri, 12 Oct 2001 06:09:02 GMT
> Berin Loritsch wrote:
> 
> Is it possible to define a Sitemap Parameter in one portion,
> and use it in a called section.  Example:
> 
> 
>    <map:match pattern="**book.xml">
>      <map:generate src="xdocs/{1}book.xml"/>
>      <map:act type="theme-chooser">
>        <map:transform src="stylesheets/{theme}/book2menu.xsl">
>          <map:parameter name="use-request-parameters" value="true"/>
>          <!-- here is where the param needs to be picked up -->
>        </map:transform>
>      </map:act>
>      <map:serialize type="xml"/>
>    </map:match>
> 
> 
>    <map:match pattern="**.html">
>     <map:parameter name="resource" value="{1}.html"/>
>     <map:aggregate element="site">
>      <map:part src="cocoon:/book.xml"/>
>      <map:part src="cocoon:/body-{1}.xml"/>
>     </map:aggregate>
>     <map:act type="theme-chooser">
>     <map:transform src="stylesheets/{theme}/site2xhtml.xsl">
>        <map:parameter name="use-request-parameters" value="true"/>
>        <map:parameter name="header" value="graphics/{1}-header.jpg"/>
>      </map:transform>
>     <map:serialize/>
>     </map:act>
>    </map:match>
> 
> I don't seem to know how to make it work.  If I have to do it through
> an action, I will.  I just think it might be heavy handed.
> 
Yes, indeed. 
For those cases a pass the value by using a "real" request parameter:
<map:part src="cocoon:/book.xml?header=graphics/{1}-header.jpg"/>

Then you can access this parameter as a normal request parameter in
the included pipeline.

Does this work for you?

Carsten

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

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


Mime
View raw message