cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Ng" <stephen...@verizon.net>
Subject RE: Dynamic sql in xsp
Date Thu, 09 May 2002 19:19:57 GMT
Vadim,

> 
> Here I mean do not use include to include your XSLT generated 
> SQL, but access cocoon programmatically and get this SQL into 
> String. Then, you will have static XSP source.

Sounds good to me but I have absolutely no idea how to do this :-(.  Can
you give me a pointer?

> Have you considered SQL transformer? It works best here.

Hmmm, no, will check this out.

> > Could I take the dynamic xslt-generated sql string and 
> shove it into a 
> > cocoon parameter, and then read the parameter inside my xslt?
> 
> Do you mean "inside my XSP"? Yes, you can do something like this.
> 

Sorry, you are right; that's what I meant.  I am having some trouble
though which is probably related to your first suggestion.

I found this code in the archives:

     String myParam = "";

     try{
       myParam = parameters.getParameter("GeneratedSQL");
       System.out.println("param is: " + myParam);
     }
     catch (Exception e)
     {}

And so I plug in:

    <map:generate type="serverpages"
src="FileWithCIncludedXspRightNow.xsp">        
      <map:parameter name="GeneratedSQL"
value="cocoon:/generatedSQL.sql"/>
    </map:generate>

But all I get on the console is:

	param is: cocoon:/generatedSQL.sql

Thanks for your help,

Steve


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