You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Lenya L. Khachaturov" <le...@chemsell.yaroslavl.ru> on 2002/12/18 08:14:41 UTC

Passing request parameters - and making use of them in the XSL

Hello,

It seems like everybody knows how to do this, at least the docs mention
this so briefly, that it must be dead simple. Anyway, I didn't get it :-)
Please help me on this:

<map:match pattern="archives/**">
...
<map:transform src="my.xsl" type="xslt">
  <map:parameter name="param" value="{1}">
</map:transform>
...
</map:match>

Now, when I point the browser to http://mysite/archives/december,
the parameter named "param" with the "december" value should be passed to
the stylesheet. In the stylesheet I have: <xsl:param name="param" /> 
As far as I understood, <xsl:value-of select="param"> should print
"december" - right? Well, it doesn't. What am I doing wrong?

-- 
Lenya Khachaturov
mailto:lenya@chemsell.yaroslavl.ru

---------------------------------------------------------------------
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>


Re: Passing request parameters - and making use of them in the XSL

Posted by Anna Afonchenko <an...@ubaccess.com>.
Lenya
I tried your example, it prints the parameter for me.
You may have a typo in expression

<xsl:value-of select="param">

should be
<xsl:value-of select="$param">

At least, this is the only reason I see.

Anna

----- Original Message ----- 
From: "Lenya L. Khachaturov" <le...@chemsell.yaroslavl.ru>
To: <co...@xml.apache.org>
Sent: Wednesday, December 18, 2002 9:14 AM
Subject: Passing request parameters - and making use of them in the XSL


Hello,

It seems like everybody knows how to do this, at least the docs mention
this so briefly, that it must be dead simple. Anyway, I didn't get it :-)
Please help me on this:

<map:match pattern="archives/**">
...
<map:transform src="my.xsl" type="xslt">
  <map:parameter name="param" value="{1}">
</map:transform>
...
</map:match>

Now, when I point the browser to http://mysite/archives/december,
the parameter named "param" with the "december" value should be passed to
the stylesheet. In the stylesheet I have: <xsl:param name="param" /> 
As far as I understood, <xsl:value-of select="param"> should print
"december" - right? Well, it doesn't. What am I doing wrong?

-- 
Lenya Khachaturov
mailto:lenya@chemsell.yaroslavl.ru

---------------------------------------------------------------------
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>


Re: Passing request parameters - and making use of them in the XSL

Posted by "Dr. Robert Spiske" <sp...@chemie.uni-halle.de>.
Hi!
At 10:14 18.12.2002 +0300, you wrote:
>Hello,
>
>As far as I understood, <xsl:value-of select="param"> should print
>"december" - right? Well, it doesn't. What am I doing wrong?

Try: <xsl:value-of select="$param">

Have a nice day
Robert


---------------------------------------------------------------------
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>