cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam" <sam_na...@rediffmail.com>
Subject Availability of user-request-parameter by the end of pipeline ??
Date Wed, 12 May 2004 19:27:41 GMT
<P>
Hi List,<BR>
<BR>
I want to make a user-request-parameter available till the end of the pipeline, so that I
could<BR>
use it in the last transformer for displaying what the user requested for. The pipeline in
my case <BR>
looks something like this:<BR>
<BR>
&lt;map:match pattern=&quot;adh/user/search&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:generate src=&quot;adh/resources/search.xml&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:transform src=&quot;adh/styles/buildsearch.xsl&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:parameter
name=&quot;use-request-parameters&quot; value=&quot;true&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;/map:transform&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:transform type=&quot;sql&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:parameter
name=&quot;use-connection&quot; value=&quot;portal&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;/map:transform&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:transform src=&quot;adh/styles/builddocument.xsl&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:parameter
name=&quot;user-request-parameters&quot; value=&quot;true&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;/map:transform&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:transform type=&quot;cinclude&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:select type=&quot;browser&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:when
test=&quot;explorer&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;map:transform src=&quot;adh/styles/search_html.xsl&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/map:when&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:when
test=&quot;mozilla5&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;map:transform src=&quot;adh/styles/search_ns_html.xsl&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/map:when&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;map:otherwise&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;map:transform src=&quot;adh/styles/search_html.xsl&quot;/&gt;<BR>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/map:otherwise&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;/map:select&gt;<BR>
&nbsp; &nbsp; &nbsp;&lt;map:serialize type=&quot;html&quot;/&gt;<BR>
&lt;/map:match&gt;<BR>
====================================================================================<BR>
I have this parameter available till the build-search.xsl, in my pipeline as seen below:<BR>
<BR>
&lt;?xml version=&quot;1.0&quot;?&gt;<BR>
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;<BR>
<BR>
&lt;!-- Make the request parameter available --&gt;<BR>
&lt;xsl:param name=&quot;keyword&quot;/&gt;<BR>
<BR>
&lt;xsl:template match=&quot;search&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;results&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;execute-query xmlns=&quot;http://apache.org/cocoon/SQL/2.0&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &lt;query&gt;<BR>
&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>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &lt;/query&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/execute-query&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/results&gt;<BR>
<BR>
&lt;/xsl:template&gt;<BR>
<BR>
&lt;/xsl:stylesheet&gt;<BR>
<BR>
======================================================================================<BR>
<BR>
Next in the pipeline is builddocument.xsl &amp; then search_html.xsl/search_ns_html.xsl.<BR>
<BR>
So my question is how do I make the parameter &quot;keyword&quot; (which holds the
user-request-parameter)<BR>
available to the search_html.xsl transformer so that I could display it on the browser, specifying
that<BR>
heres what the user looked for and heres the search results.<BR>
<BR>
I hope I cleared my doubt, if not let me know ??<BR>
<BR>
Regards<BR>
Sam<BR>
<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