You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hubert Holtz <Tu...@gmx.net> on 2003/05/15 10:29:46 UTC

requestURI contains no value

Hy all,

I need the whole request URL in my XSL and tried the following,using
this post from Joerg in the mail archive:

>This action already exists:
>http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/acting/RequestParamAction.html. You only have to use it ;-)
>
><map:match pattern="test">
>  <map:generate src="anysrc"/>
>  <map:act type="reqparamaction">
>    <map:transform src="test.xsl">
>      <map:parameter name="reqUri" value="{requestURI}"/>
>    </map:transform>
>  </map:act>
>  <map:serialize/>
></map:match>
>
>
>This action must be declared in the <map:actions/> section of the
><map:components/> section at the top of the sitemap:
>
><map:action name="reqparamaction"
>src="org.apache.cocoon.acting.RequestParamAction"/>
>
>Regards,
>
>Joerg

I've created a variable (   <xsl:variable name="currentURL"><xsl:value-of select="$request_uri"/></xsl:variable>  )
which should contain the value of the parameter in y XSL file (<xsl:param name="request_uri"/>)

<xsl:value-of select="$currentURL"/>

outputs no value, but why?

I'm using Cocoon 2.0.3 on Tomcat 4.1.

Any ideas?

Thanks,
Steve


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


Re: requestURI contains no value

Posted by Hubert Holtz <Tu...@gmx.net>.
hy,

I know that the name of the parameter inside the sitemap has to match the created xsl parameter,
that's not the problem, I just missed to update this in my last post.

But it doesnt work, now I will try to install cocoon2.1 on my tomcat server, but if
anyone knows how to handle the request uri in cocoon 2.0.3, I'm still interested :-)


Steve



*********** REPLY SEPARATOR  ***********

On 15.05.2003 at 10:42 Andreas Hartmann wrote:

>Andreas Hartmann wrote:
>
>> Hubert Holtz wrote:
>[...]
>
>> 
>>>> <map:match pattern="test">
>>>> <map:generate src="anysrc"/>
>>>> <map:act type="reqparamaction">
>>>>   <map:transform src="test.xsl">
>>>>     <map:parameter name="reqUri" value="{requestURI}"/>
>>>>   </map:transform>
>>>> </map:act>
>>>> <map:serialize/>
>>>> </map:match>
>>>>
>
>[...]
>
>>> I've created a variable (   <xsl:variable 
>>> name="currentURL"><xsl:value-of select="$request_uri"/></xsl:variable> 
>)
>>> which should contain the value of the parameter in y XSL file 
>>> (<xsl:param name="request_uri"/>)
>> 
>> 
>> That should be <xsl:param name="requestURI"/>
>
>Sorry, for the above example it's <xsl:param name="reqUri"/>.
>
>Andreas
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org




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


Re: requestURI contains no value

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:

> Hubert Holtz wrote:
[...]

> 
>>> <map:match pattern="test">
>>> <map:generate src="anysrc"/>
>>> <map:act type="reqparamaction">
>>>   <map:transform src="test.xsl">
>>>     <map:parameter name="reqUri" value="{requestURI}"/>
>>>   </map:transform>
>>> </map:act>
>>> <map:serialize/>
>>> </map:match>
>>>

[...]

>> I've created a variable (   <xsl:variable 
>> name="currentURL"><xsl:value-of select="$request_uri"/></xsl:variable>  )
>> which should contain the value of the parameter in y XSL file 
>> (<xsl:param name="request_uri"/>)
> 
> 
> That should be <xsl:param name="requestURI"/>

Sorry, for the above example it's <xsl:param name="reqUri"/>.

Andreas



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


Re: requestURI contains no value

Posted by Andreas Hartmann <an...@apache.org>.
Hubert Holtz wrote:

> Hy all,
> 
> I need the whole request URL in my XSL and tried the following,using
> this post from Joerg in the mail archive:
> 
> 
>>This action already exists:
>>http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/acting/RequestParamAction.html. You only have to use it ;-)

At least in Cocoon 2.1 you don't need the RequestParamAction
and can just use {request:requestURI} in your sitemap.
(does this already work in Cocoon 2.0.3?)


>>
>><map:match pattern="test">
>> <map:generate src="anysrc"/>
>> <map:act type="reqparamaction">
>>   <map:transform src="test.xsl">
>>     <map:parameter name="reqUri" value="{requestURI}"/>
>>   </map:transform>
>> </map:act>
>> <map:serialize/>
>></map:match>
>>
>>
>>This action must be declared in the <map:actions/> section of the
>><map:components/> section at the top of the sitemap:
>>
>><map:action name="reqparamaction"
>>src="org.apache.cocoon.acting.RequestParamAction"/>
>>
>>Regards,
>>
>>Joerg
> 
> 
> I've created a variable (   <xsl:variable name="currentURL"><xsl:value-of select="$request_uri"/></xsl:variable>  )
> which should contain the value of the parameter in y XSL file (<xsl:param name="request_uri"/>)

That should be <xsl:param name="requestURI"/>

HTH, Andreas

> 
> <xsl:value-of select="$currentURL"/>
> 
> outputs no value, but why?
> 
> I'm using Cocoon 2.0.3 on Tomcat 4.1.
> 
> Any ideas?
> 
> Thanks,
> Steve



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