You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Franco Andrao <fr...@gruppo4.com> on 2005/07/01 10:31:29 UTC
xsp:logic error in esql:row-results
Hi,
I'm developing a web application with esql in a xsp page following
the wiki page HowToCreateHiearchicalXmlUsingESQL. Therefore assigning
a value to a variable inside the esql:row-results I have this error:
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error
compiling page_xsp: ERROR 1 (org/apache/cocoon/www/presentation/xml/
page_xsp.java): ... do { this.characters("\n\t\t\t\t\t"); // start
error (lines 461-461) "aa cannot be resolved" aa= // end error
( EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") ) ...
ERROR 2 (org/apache/cocoon/www/presentation/xml/page_xsp.java): ...
this.characters("\n\t\t\t\t\t"); aa= ( // start error (lines 464-464)
"Invalid cast type expression" EsqlHelper.getAscii
(_esql_query.getResultSet(),"id_rst","") // end error )
this.characters("\n\t\t\t\t\t"); ... Line 461, column 0: aa cannot be
resolved Line 464, column 0: Invalid cast type expression
the simple xsp test page I'm using is below and without the xsp:logic
work perfectly:
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<page>
<esql:connection>
<esql:pool>myDB</esql:pool>
<esql:execute-query>
<esql:query>
SELECT * FROM mytab
WHERE id_rst=4
</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>aa=<esql:get-int column="id_rst"/>;</
xsp:logic>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</page>
</xsp:page>
Thanks
Best regards
:-)Franco Andrao
franco.andrao@gruppo4.com
Re: xsp:logic error in esql:row-results
Posted by Lionel Barth <lb...@hachette-livre.fr>.
Hi
You should have a datatype :
<xsp:logic>int aa=<esql:get-int column="id_rst"/>;</xsp:logic>
<xsp:expr>aa</xsp:expr>
Lionel
Franco Andrao a ecrit le 1/07/05 10:31:
> Hi,
> I'm developing a web application with esql in a xsp page following the
> wiki page HowToCreateHiearchicalXmlUsingESQL. Therefore assigning a
> value to a variable inside the esql:row-results I have this error:
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> compiling page_xsp: ERROR 1
> (org/apache/cocoon/www/presentation/xml/page_xsp.java): ... do {
> this.characters("\n\t\t\t\t\t"); // start error (lines 461-461) "aa
> cannot be resolved" aa= // end error (
> EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") ) ...
> ERROR 2 (org/apache/cocoon/www/presentation/xml/page_xsp.java): ...
> this.characters("\n\t\t\t\t\t"); aa= ( // start error (lines 464-464)
> "Invalid cast type expression"
> EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") // end
> error ) this.characters("\n\t\t\t\t\t"); ... Line 461, column 0: aa
> cannot be resolved Line 464, column 0: Invalid cast type expression
>
>
> the simple xsp test page I'm using is below and without the xsp:logic
> work perfectly:
>
> <?xml version="1.0"?>
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
>
> <page>
> <esql:connection>
> <esql:pool>myDB</esql:pool>
> <esql:execute-query>
> <esql:query>
> SELECT * FROM mytab
> WHERE id_rst=4
> </esql:query>
> <esql:results>
> <esql:row-results>
> <xsp:logic>aa=<esql:get-int
> column="id_rst"/>;</xsp:logic>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
> </page>
> </xsp:page>
>
> Thanks
> Best regards
>
> *:-)Franco Andrao*
>
> _franco.andrao@gruppo4.com <ma...@gruppo4.com>_
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: SV: logic error in esql:row-results
Posted by Franco Andrao <fr...@gruppo4.com>.
You are right thank you
:-)Franco Andrao
franco.andrao@gruppo4.com
On 01/lug/05, at 10:47, Ralph Skulbörstad wrote:
> Hi.
>
> I belive you have to declare your variables before using them.
>
> /Ralph
> -----Ursprungligt meddelande-----
> Från: Franco Andrao [mailto:franco.andrao@gruppo4.com]
> Skickat: den 1 juli 2005 10:31
> Till: users@cocoon.apache.org
> Ämne: xsp:logic error in esql:row-results
>
> Hi,
> I'm developing a web application with esql in a xsp page following
> the wiki page HowToCreateHiearchicalXmlUsingESQL. Therefore
> assigning a value to a variable inside the esql:row-results I have
> this error:
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> compiling page_xsp: ERROR 1 (org/apache/cocoon/www/presentation/xml/
> page_xsp.java): ... do { this.characters("\n\t\t\t\t\t"); // start
> error (lines 461-461) "aa cannot be resolved" aa= // end error
> ( EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") ) ...
> ERROR 2 (org/apache/cocoon/www/presentation/xml/page_xsp.java): ...
> this.characters("\n\t\t\t\t\t"); aa= ( // start error (lines
> 464-464) "Invalid cast type expression" EsqlHelper.getAscii
> (_esql_query.getResultSet(),"id_rst","") // end error )
> this.characters("\n\t\t\t\t\t"); ... Line 461, column 0: aa cannot
> be resolved Line 464, column 0: Invalid cast type expression
>
>
> the simple xsp test page I'm using is below and without the
> xsp:logic work perfectly:
>
> <?xml version="1.0"?>
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
>
> <page>
> <esql:connection>
> <esql:pool>myDB</esql:pool>
> <esql:execute-query>
> <esql:query>
> SELECT * FROM mytab
> WHERE id_rst=4
> </esql:query>
> <esql:results>
> <esql:row-results>
> <xsp:logic>aa=<esql:get-int column="id_rst"/>;</
> xsp:logic>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
> </page>
> </xsp:page>
>
> Thanks
> Best regards
>
> :-)Franco Andrao
> franco.andrao@gruppo4.com
>
SV: logic error in esql:row-results
Posted by Ralph Skulbörstad <ra...@jak.se>.
Hi.
I belive you have to declare your variables before using them.
/Ralph
-----Ursprungligt meddelande-----
Från: Franco Andrao [mailto:franco.andrao@gruppo4.com]
Skickat: den 1 juli 2005 10:31
Till: users@cocoon.apache.org
Ämne: xsp:logic error in esql:row-results
Hi,
I'm developing a web application with esql in a xsp page following the
wiki page HowToCreateHiearchicalXmlUsingESQL. Therefore assigning a value to
a variable inside the esql:row-results I have this error:
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
page_xsp: ERROR 1 (org/apache/cocoon/www/presentation/xml/page_xsp.java):
... do { this.characters("\n\t\t\t\t\t"); // start error (lines 461-461) "aa
cannot be resolved" aa= // end error
EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") ) ... ERROR 2
(org/apache/cocoon/www/presentation/xml/page_xsp.java): ...
this.characters("\n\t\t\t\t\t"); aa= ( // start error (lines 464-464)
"Invalid cast type expression"
EsqlHelper.getAscii(_esql_query.getResultSet(),"id_rst","") // end error )
this.characters("\n\t\t\t\t\t"); ... Line 461, column 0: aa cannot be
resolved Line 464, column 0: Invalid cast type expression
the simple xsp test page I'm using is below and without the xsp:logic work
perfectly:
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<page>
<esql:connection>
<esql:pool>myDB</esql:pool>
<esql:execute-query>
<esql:query>
SELECT * FROM mytab
WHERE id_rst=4
</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>aa=<esql:get-int
column="id_rst"/>;</xsp:logic>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</page>
</xsp:page>
Thanks
Best regards
:-)Franco Andrao
franco.andrao@gruppo4.com