You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Mario J. Gaspar da Silva" <mj...@di.fc.ul.pt> on 2000/10/03 13:55:39 UTC

evaluation of xsp:expr elements within esql

A problem I detected with esql is that it doesn't enable me to build sql 
queries in a java logic section and then pass them to an embedded esql element.

<xsp:logic>

String foo = New String ("Select " + etc etc )

<esql:execute-query>

...<esql:query> <xsp:expr> foo </xsp:expr> </esql-query>

</esql:execute-query>
</xsp:logic>


this won't work because "esql:execute-query" triggers in esql.xsl the 
generation of a method call invocation, which will cause xsp:expr foo to 
generate java code to be evaluated out of scope. As a result, queries like 
this won't compile.

--m

(with the sql taglib, however, I don't experience this problem).
 

  






Re: evaluation of xsp:expr elements within esql

Posted by OD <od...@feersumendjinns.com>.
Try:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?xml-logicsheet
href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>

<xsp:page
  language="java"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
>

<xsp:logic>
String foo = new String("select" + blah);
</xsp:logic>

<page>

<esql:execute-query>
<snip/>
<esql:query><xsp:expr>foo</xsp:expr></esql:query>

etc...

Corey O'Donovan

----- Original Message -----
From: Mario J. Gaspar da Silva <mj...@di.fc.ul.pt>
To: <co...@xml.apache.org>
Sent: Tuesday, October 03, 2000 12:55 PM
Subject: evaluation of xsp:expr elements within esql


>
> A problem I detected with esql is that it doesn't enable me to build sql
> queries in a java logic section and then pass them to an embedded esql
element.
>
> <xsp:logic>
>
> String foo = New String ("Select " + etc etc )
>
> <esql:execute-query>
>
> ...<esql:query> <xsp:expr> foo </xsp:expr> </esql-query>
>
> </esql:execute-query>
> </xsp:logic>
>
>
> this won't work because "esql:execute-query" triggers in esql.xsl the
> generation of a method call invocation, which will cause xsp:expr foo to
> generate java code to be evaluated out of scope. As a result, queries like
> this won't compile.
>
> --m
>
> (with the sql taglib, however, I don't experience this problem).
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org