You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/10/11 23:04:11 UTC
Passing Sitemap Params
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
AW: Passing Sitemap Params
Posted by Carsten Ziegeler <cz...@sundn.de>.
> 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