You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gautam Ganguly <gg...@transunion.com> on 2003/05/02 17:50:42 UTC
Map:redirect-to and request parameters???
hi everyone,
I have attached here a snapshot of my xsl page that reads a user
entered values
from a xml page and then using the data collected calls out a oracle
procedure,
which i am passing through SQL Transformer and i get a out parameter
from it,
which works fine.
------------------------
GetDeptRules.xsl-----------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query isstoredprocedure="true" name="rulecodesearch">
begin Process_Pack.Get_Rule('Z102389',
'D3456',
'LO5234',
?);
end;
</query>
<out-parameter sql:nr="1" sql:name="rulecode"
sql:type="java.sql.Types.INTEGER"/>
</execute-query>
</xsl:stylesheet>
----------------------------------------------------------------------------
The snapshot of the sitemap looks something like this:
<map:match pattern="do-rules-process">
<map:generate src="pages/BeginProcessing.xml"/>
<map:transform src="stylesheets/GetDeptRules.xsl"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="devora"/>
</map:transform>
<map:redirect-to uri="user-rule-details.html"/>
</map:match>
How do i pass these out parameter value(rulecode),thats returned from
the stored
procedure as a request parameter to the <map:redirect-to> command in
the sitemap? Is it possible to do that?Is there any better way?
I am using cocoon2.0.4.
Any suggestions??
thanks in advance,
Gautam
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Map:redirect-to and request parameters???
Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Gautam,
it's not possible to redirect after setting up parts of a pipe as you
did. On the other hand the pipe for "user-rule-details.html" must also
be complete, so you can't feed it with XML as you try it. What you need
is possibly only a
<map:resource name="myResource">
<map:transform src="nextstep.xsl"/>
<map:serialize type="html"/>
</map:resource>
instead of the pipe for "user-rule-details.html" and a
<map:call resource="myResource"/>
instead of
<map:redirect-to uri="user-rule-details.html"/>.
But I can't it tell you more exactly, because I can't see, what you
really want to do.
Joerg
Gautam Ganguly wrote:
> hi everyone,
> I have attached here a snapshot of my xsl page that reads a user
> entered values
> from a xml page and then using the data collected calls out a oracle
> procedure,
> which i am passing through SQL Transformer and i get a out parameter
> from it,
> which works fine.
>
> ------------------------
> GetDeptRules.xsl-----------------------------------------
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query isstoredprocedure="true" name="rulecodesearch">
> begin Process_Pack.Get_Rule('Z102389',
> 'D3456',
> 'LO5234',
> ?);
> end;
> </query>
> <out-parameter sql:nr="1" sql:name="rulecode"
> sql:type="java.sql.Types.INTEGER"/>
>
> </execute-query>
> </xsl:stylesheet>
> ----------------------------------------------------------------------------
> The snapshot of the sitemap looks something like this:
> <map:match pattern="do-rules-process">
> <map:generate src="pages/BeginProcessing.xml"/>
> <map:transform src="stylesheets/GetDeptRules.xsl"/>
> <map:transform type="sql">
> <map:parameter name="use-connection" value="devora"/>
> </map:transform>
> <map:redirect-to uri="user-rule-details.html"/>
> </map:match>
>
> How do i pass these out parameter value(rulecode),thats returned from
> the stored
> procedure as a request parameter to the <map:redirect-to> command in
> the sitemap? Is it possible to do that?Is there any better way?
>
> I am using cocoon2.0.4.
> Any suggestions??
>
> thanks in advance,
> Gautam
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org