cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fleischer Roman <roman.fleisc...@siemens.com>
Subject RE: URL encoding for request
Date Thu, 23 Oct 2003 07:11:07 GMT
Hello Joerg,

thank you for the quick answer. I will tell my case, resp. show my problem.
I use a search form with the input field searchString. The form action is
OCIprod (a matcher in the cocoon sitemap).
When i look to the log-files the request is URL encoded
(http://127.0.0.1/cocoon/OCIprod?searchString=Gie%C3%9Fharz&searchMLFB=&sear
c....)
 
The OCI prod matcher looks like this:
<map:match pattern="OCIprod">
<map:generate type="request"/>
<map:transform type="xslt" src="product.xsl"/>
<map:transform type="cinclude"/>
<map:transform type="encodeURL"/>
<map:serialize type="html"/>
</map:match>

In the stylesheet product.xsl i use a cinclude to show the search result
<xsl:param name="searchString"
select="request:requestParameters/request:parameter[@name='searchString']/re
quest:value/text()"/>
...
<xsl:if test="$search='result'">
<cinclude:include
src="cocoon:/searchPageResult?lang={$lang}&amp;searchString={$searchString}"
/>				
</xsl:if> 

Now the param $searchString has the value "Gießharz" instead of
"Gie%C3%9Fharz" and can not be found in the database. I get an error on the
searchPage result page like "Your search for "GieEUR?harz" has no hits. If I
call the searchPageResult direct in the browser with URL encoded
searchString everything works.

What is my error?
Thanks


-----Original Message-----
From: Joerg Heinicke [mailto:jheinicke@virbus.de]
Sent: Donnerstag, 23. Oktober 2003 01:19
To: users@cocoon.apache.org
Subject: Re: URL encoding for request


Hello Roman,

for the request generator the decoding is okay. It gives the request 
params in their string representation in an XML structure. It knows 
nothing about an URL encoded string. (%C3%9F is URl encoded, not UTF 
encoded!!)

Maybe it's better to tell us your use case. If you transform the output 
of the request generator back into a HTML page with links, the @href 
will be URL encoded again - at least that should be done by the XML 
serializer.

Joerg

On 21.10.2003 14:10, Fleischer Roman wrote:

> Hello,
> 
> i have some problems with URL encoding. 
> I call a matcher in this form:
>
http://127.0.0.1/cocoon/OCIprod?searchString=Gie%C3%9Fharz&searchMLFB=&searc
> h=result...
> (%C3%9F is the german "ss")
> 
> In the matcher i call a request generator and a xml-serializer.
> The result is:
> ...
> <h:requestParameters>
> 	<h:parameter name="searchString">
>   		<h:value>Gießharz</h:value> 
>   	</h:parameter>
> 	<h:parameter name="search">
>   		<h:value>result</h:value>
> ...
> 
> Why is the parameter searchString transformed? How can i aviod the
> transforming? I need this param UTF-8 encoded (like in the  calling URL)
> 
> Any idea?
> Thanks...


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


Mime
View raw message