cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam" <sam_na...@rediffmail.com>
Subject Re: Re: Availability of user-request-parameter by the end of pipeline ??
Date Thu, 13 May 2004 00:26:09 GMT
<P>
Hello Joerg,<BR>
<BR>
Nice to see a reply from you again. Everytime I happen to learn something new. :) :) Thanks
to you.<BR>
<BR>
By the way I had realized the typo and the missing use-reuest-parameters in the last three
stylesheets&gt; I made proper changes but still it doesnt wanna work. Correct me if I
am wrong the way I am trying to get the value back from the &quot;keyword&quot;. In
my search_html.xsl, I declare the param so that I could use it in the sytlesheet like this:<BR>
<BR>
&lt;xsl:param name=&quot;keyword&quot;/&gt;<BR>
<BR>
and then try to display the value contained in &quot;keyword&quot; simply like this:<BR>
<BR>
<BR>
You search for $keyword resulted in the following documents.<BR>
<BR>
<BR>
But it doesnt wanna display the value what keyword is holding instead it display $keyword
as it is !!!<BR>
<BR>
Do you know whats wrong here ???<BR>
Also the way you suggested to pass the value of the paramater,<BR>
&lt;map:parameter name=&quot;keyword&quot; value=&quot;{request-param:keyword}&quot;/&gt;<BR>
<BR>
could you let me know how to invoke the value from this parameter in a stylesheet ???<BR>
<BR>
I appreciate your replies. <BR>
<BR>
Thanks for everything. <BR>
<BR>
Regards<BR>
Sam<BR>
<BR>
On Thu, 13 May 2004 Joerg Heinicke wrote :<BR>
&gt;On 12.05.2004 21:27, Sam wrote:<BR>
&gt;<BR>
&gt;&gt;Hi List,<BR>
&gt;&gt;<BR>
&gt;&gt;I want to make a user-request-parameter available till the end of the pipeline,
so that I could<BR>
&gt;&gt;use it in the last transformer for displaying what the user requested for.<BR>
&gt;<BR>
&gt;&lt;snip what=&quot;pipeline&quot;/&gt;<BR>
&gt;<BR>
&gt;&gt;I have this parameter available till the build-search.xsl, in my pipeline
as seen below:<BR>
&gt;&gt;<BR>
&gt;&gt;&lt;!-- Make the request parameter available --&gt;<BR>
&gt;&gt;&lt;xsl:param name=&quot;keyword&quot;/&gt;<BR>
&gt;<BR>
&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;  SELECT uri from keyword_search_table where keyword = '&lt;xsl:value-of select=&quot;$keyword&quot;/&gt;'<BR>
&gt;<BR>
&gt;*Security warning!!*: SQL injection. Use prepared statements instead.<BR>
&gt;<BR>
&gt;&gt;Next in the pipeline is builddocument.xsl &amp; then search_html.xsl/search_ns_html.xsl.<BR>
&gt;&gt;<BR>
&gt;&gt;So my question is how do I make the parameter &quot;keyword&quot;
(which holds the user-request-parameter)<BR>
&gt;&gt;available to the search_html.xsl transformer so that I could display it on
the browser, specifying that<BR>
&gt;&gt;heres what the user looked for and heres the search results.<BR>
&gt;<BR>
&gt;You say what works for build-search.xsl (xsl:param name=&quot;keyword&quot;/&gt;)
does not work for the other stylesheets? That would be very strange.<BR>
&gt;<BR>
&gt;But looking at your pipeline<BR>
&gt;&lt;map:transform src=&quot;adh/styles/builddocument.xsl&quot;&gt;<BR>
&gt;&nbsp; &nbsp;  &lt;map:parameter name=&quot;user-request-parameters&quot;
value=&quot;true&quot;/&gt;<BR>
&gt;&lt;/map:transform&gt;<BR>
&gt;you have a typo above, the parameter must be named &quot;use-request-parameters&quot;
not &quot;user-request-parameters&quot;.<BR>
&gt;<BR>
&gt;And the other 3 stylesheets miss this param completely:<BR>
&gt;&lt;map:when test=&quot;explorer&quot;&gt;<BR>
&gt;&nbsp; &nbsp;  &lt;map:transform src=&quot;adh/styles/search_html.xsl&quot;/&gt;<BR>
&gt;&lt;/map:when&gt;<BR>
&gt;&lt;map:when test=&quot;mozilla5&quot;&gt;<BR>
&gt;&nbsp; &nbsp;  &lt;map:transform src=&quot;adh/styles/search_ns_html.xsl&quot;/&gt;<BR>
&gt;&lt;/map:when&gt;<BR>
&gt;&lt;map:otherwise&gt;<BR>
&gt;&nbsp; &nbsp;  &lt;map:transform src=&quot;adh/styles/search_html.xsl&quot;/&gt;<BR>
&gt;&lt;/map:otherwise&gt;<BR>
&gt;<BR>
&gt;Furthermore you should think about not using this feature as it has implications on
caching as the caching would be dependent on all request params where it must be dependent
on only one. You should pass the keyword request param explicitely to the stylesheet by using
&lt;map:parameter name=&quot;keyword&quot; value=&quot;{request-param:keyword}&quot;/&gt;.<BR>
&gt;<BR>
&gt;Joerg<BR>
&gt;<BR>
&gt;---------------------------------------------------------------------<BR>
&gt;To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org<BR>
&gt;For additional commands, e-mail: users-help@cocoon.apache.org<BR>
&gt;<BR>

</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG
SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"
BORDER=0 VSPACE=0 HSPACE=0></a>

Mime
View raw message