You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan Willem Penterman <jw...@shapers.nl> on 2002/08/20 06:38:09 UTC

Weird characters ESQL + XSP -> URL

In an xsp sheet I merge two strings to what's to become an URL attribute
in a href:

..
<xsp:logic>
	String path=<xsp-request:get-parameter name="path"/>;
	..
</xsp:logic>
..
..							
<esql:row-results>
    	<category>
		<path><xsp:expr>path</xsp:expr>,<esql:get-string
column="id"/></path>
		..
	</category>
</esql:row-results>
..

But instead of getting nice values like "?path=1,6,29" I get
?path=1%0D%0D%0A%09%09,6%0D%0A%09%09,29
I guess the source of trouble is the xsp-request:get-parameter, which
every time adds the weird characters to my "path" String. The not so bad
news about it is that it still works fine! However, I also had this
trouble before where ot resulted in path errors. Anyone knows what I can
do about it?

JW






---------------------------------------------------------------------
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: Weird characters ESQL + XSP -> URL

Posted by Jan Willem Penterman <jw...@shapers.nl>.
Thank you. I already suspected it to be something like this, but I was
looking in the wrong place all the time, or had the problem at more
files in my pipeline. Anyway it's solved now, by clearing out the
linebreaks and tabs for nice markup in my editor. Isn't there a way to
simply say "Ignore any linebreaks and tabs", so I can keep my nice
markup xsp sheets? 

Ugly but works:
<frame name="content" marginwidth="0" marginheight="0" scrolling="yes"
frameborder="no" noresize="true">
<xsp:attribute
name="src">content/content.xsp?<xsp-request:get-query-string/></xsp:attr
ibute>

vs.:

Nice markup but it insterts linebreaks for breakfast:
<frame name="content" marginwidth="0" marginheight="0" scrolling="yes"
frameborder="no" noresize="true">
<xsp:attribute name="src">content/content.xsp?
	<xsp-request:get-query-string/>
</xsp:attribute>

JW

> -----Original Message-----
> From: Antonio Gallardo Rivera 
> [mailto:agallardo@agsoftware.dnsalias.com] 
> Sent: dinsdag 20 augustus 2002 7:01
> To: cocoon-users@xml.apache.org
> Subject: Re: Weird characters ESQL + XSP -> URL
> 
> 
> Jan:
> 
> I had the same problem before, please check how you are 
> sending the parameter 
> in the page where you create the parameter that you send to 
> this page. I 
> guess you are sending the parameter with the "\n" from this page. 
> 
> Antonio Gallardo
> 



---------------------------------------------------------------------
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: Weird characters ESQL + XSP -> URL

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Jan:

I had the same problem before, please check how you are sending the parameter 
in the page where you create the parameter that you send to this page. I 
guess you are sending the parameter with the "\n" from this page. 

Antonio Gallardo


El Lunes, 19 de Agosto de 2002 22:38, Jan Willem Penterman escribió:
> In an xsp sheet I merge two strings to what's to become an URL attribute
> in a href:
>
> ..
> <xsp:logic>
> 	String path=<xsp-request:get-parameter name="path"/>;
> 	..
> </xsp:logic>
> ..
> ..
> <esql:row-results>
>     	<category>
> 		<path><xsp:expr>path</xsp:expr>,<esql:get-string
> column="id"/></path>
> 		..
> 	</category>
> </esql:row-results>
> ..
>
> But instead of getting nice values like "?path=1,6,29" I get
> ?path=1%0D%0D%0A%09%09,6%0D%0A%09%09,29
> I guess the source of trouble is the xsp-request:get-parameter, which
> every time adds the weird characters to my "path" String. The not so bad
> news about it is that it still works fine! However, I also had this
> trouble before where ot resulted in path errors. Anyone knows what I can
> do about it?
>
> JW
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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>