cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barbara Post" <bab...@ifrance.com>
Subject Re: Request paramteres in a xsl
Date Thu, 12 Sep 2002 11:46:20 GMT
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" <johannes.wechsler.external@mchp.siemens.de>
To: <cocoon-users@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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message