You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Post <ba...@ifrance.com> on 2002/09/12 13:46:20 UTC

Re: Request paramteres in a xsl

The "best" way (easier) is to use :

<xsl:param name="my_req_param" /> at the beginning of your xsl, then use it
like a variable.

And in the sitemap, add to the xslt <map:transform ...> :

<map:transform ...>
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>

Babs
----- Original Message -----
From: "Johannes Wechsler" <jo...@mchp.siemens.de>
To: <co...@xml.apache.org>
Sent: Thursday, September 12, 2002 1:47 PM
Subject: Request paramteres in a xsl


> Hi,
>
> I want to access a request parameter in a xsl.
>
> Therefore I use the code:
> <xsl:value-of
select="//RequestParameters/Parameter[@name='pName']/@value"/>
>
> My request string is:
>
http://localhost:8080/cocoon/dev/ownActionItems.htm?pName=Projekt2&xpath=//p
> rojects/project[2]/actionItem
>
> Is this fundamentally the right way to access a request parameter?
> Do I have to add anything into the sitemap to get access to these
> parameters?
>
> My sitemap entry is the following:
>
> <map:match pattern="dev/ownActionItems.htm">
>    <map:match pattern="xpath" type="request-parameter">
>       <map:generate
src="xmldb:xindice://localhost:4080/db/johannes3/#{1}"/>
>       <map:transform src="dev/ownActionItems/ownActionItems.xsl"/>
>       <map:serialize type="html"/>
>    </map:match>
>    <map:generate src="xmldb:xindice://localhost:4080/db/johannes3/"/>
>    <map:transform src="dev/ownActionItems/ownActionItems.xsl"/>
>    <map:serialize type="html"/>
> </map:match>
>
> Regards,
> Johannes
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>