cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <l.mo...@tin.it>
Subject RE: [C2][SQL[How to use an output parameter?
Date Wed, 07 Nov 2001 21:37:21 GMT
Eduardo,

	here's my stored procedure call described in an XML file (using the SQL
Transformer):

<legend-resources xmlns:sql="http://apache.org/cocoon/SQL/2.0">
	<sql:execute-query>
          <sql:query isstoredprocedure="true" name="getresourcelegend">
              begin Noria.GetResourceLegend(?, ?); end;
          </sql:query>
          <sql:out-parameter sql:nr="1" sql:name="curLeg"
sql:type="oracle.jdbc.driver.OracleTypes.CURSOR"/>
          <sql:out-parameter sql:nr="2" sql:name="intStatus"
sql:type="java.sql.Types.INTEGER"/>
	</sql:execute-query>
</legend-resources>

	here's my use of the output parametr called intStatus (of course, the
procedure's return status) in an XSL file.

<xsl:template match="legend-resources/sql:rowset">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="sql:intStatus[.!='0']">
	<!-- stuff ... -->
</xsl:template>


	Hope this helps...

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Eduardo Godoy Vega [mailto:egodoy@tekchile.cl]
> Sent: Wednesday, November 07, 2001 10:26 PM
> To: Cocoon-Users
> Subject: [C2][SQL[How to use an output parameter?
>
>
> Hi ... this is a simple question ... but I need some help ...
>
> How can I use my output parameter?
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query isstoredprocedure="true" name="	GET_JOBANSWER">
> 	begin CRM_PKG.GET_JOBANSWER(	'<xsp-request:get-parameter
> name="jobid"/>,?);
> 	end;
> </query>
> <out-parameter sql:nr="1" sql:name="JOB_ID"
> sql:type="java.sql.Types.VARCHAR"/>
> </execute-query>
>
> I'd like to do something like
>
> if (JOB_ID == "-1"){
> <header>
> 	<refresh url="7;url=show?jobid=">
> 		<xsp-request:get-parameter name="jobid"/>
> 	</refresh>
> </header>
> }
>
>
> Help ...
>
> Eduardo.
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message