You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 02...@brookes.ac.uk on 2003/07/17 12:12:58 UTC

Re: {requestQuery} from RequestParamAction not working in command

Hi,

This is an example of syntax I use which works although I haven't
tried running anything from a command line. I must apologise for
the reference to {$requestURI} in the previous message, that was
a mistake.:

in sitemap.xmap:

<map:transform src="xslt/error2html.xslt">
  <map:parameter name="contextPath" value="{request:contextPath}" />
  <map:parameter name="requestURI" value="{request:requestURI}" />
  <map:parameter name="sitemapURI" value="{request:sitemapURI}" />
</map:transform>

in xslt/error2html.xslt:

<xsl:param name="contextPath" select="string('/cocoon')" />
<xsl:param name="requestURI" />
<xsl:param name="sitemapURI" />
<xsl:param name="error" select="//error:notify/error:title" />
:
<p><xsl:value-of select="$sitemapURI" /></p>
<p><xsl:value-of select="$contextPath" /></p>
:
Perhaps the command line environment doesn't simulate an HTTP
request correctly for the sitemap to pick up (I use ethereal
listening on local loopback to determine the messages being sent).

I'm using: RedHat 7.3 / Cocoon 2.1m2 (I don't know if
"request:..." syntax in the sitemap.xmap is available in earlier
versions)

Hope you manage to sort it out.

gef
> On Wed, 16 Jul 2003 11:39:13 GB
> 02068452@brookes.ac.uk wrote:
> 
> Hi,
> 
> > Perhaps you need to pass the parameters to the stylesheet
> > individually rather than attempting to concatonate beforehand.
> > <map:parameter name="fileURI" value="{requestURI}" />
> > <map:parameter name="fileQuery" value="{requestQuery}" /> 
> 
> Yes, unfortunately, I have tried that also, but with doesn't work.
> 
> 
> > p.s. I use "{$requestURI}" syntax, don't know if that makes a
> > difference
> 
> Do you use this "{$requestURI}" sintax in the sitemap or
> in the stylesheet? I have tried that syntax in the sitemap and
it also doesn't work.
> 
> In the stylesheets, I use (following your example) something
like <xsl:value-of
select="$fileQuery" /> to acess
> the value, with <xsl:param name="fileQuery">empty</xsl:param>
on top of the stylesheet.
The most 
> interesting thing is that Cocoon does indeed replaces the value
of the fileQuery param in
the stylesheet, but with an empty
> string. Maybe this is a bug in the commmand line environment?
> 
> Best regards,
> 
> Artur Matos.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 



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


Re: {requestQuery} from RequestParamAction not working in command line mode

Posted by Artur Matos <am...@create.human.nagoya-u.ac.jp>.
Hi,

> Hi,
> 
> This is an example of syntax I use which works although I haven't
> tried running anything from a command line.
> in sitemap.xmap:
> 
> <map:transform src="xslt/error2html.xslt">
>   <map:parameter name="contextPath" value="{request:contextPath}" />
>   <map:parameter name="requestURI" value="{request:requestURI}" />
>   <map:parameter name="sitemapURI" value="{request:sitemapURI}" />
> </map:transform>

Thank you for your reply. I tried this syntax in the sitemap,
but it is giving me an "invalid pattern" error. I guess it only works with the 2.1 branch.

> :
> Perhaps the command line environment doesn't simulate an HTTP
> request correctly for the sitemap to pick up 

Yes, probably is something like that. I wonder if 
it is working correctly in 2.1 . Does anyone
in this list working with the 2.1 command line knows if the query string is being
mapped correctly in the latest version? 

> 
> Hope you manage to sort it out.

Thank you. Thank you very much for the help.


Best regards,

Artur Matos.

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