cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6507] New: - Compile time error in nested esql statements.
Date Sun, 17 Feb 2002 12:16:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6507>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6507

Compile time error in nested esql statements.

           Summary: Compile time error in nested esql statements.
           Product: Cocoon 2
           Version: 2.0.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: andi@andi.ch


I encoutered (probably) a small bug in the esql logicsheet.
It's not possible any more the execute a query in an no-results element:

Cocoon 2.0:
-----------
} else {
_esql_query.position = _esql_query.statement.getUpdateCount();
if (_esql_query.position &gt;= 0) {
<xsl:apply-templates select="esql:update-results/*"/>
}

Cocoon 2.0.1:
-------------
} else {
int _esql_update_count = _esql_query.getStatement().getUpdateCount();
if (_esql_update_count &gt;= 0) {
<xsl:apply-templates select="esql:update-results/*"/>
}

I tried this nested query:
...
<esql:execute-query>
   <esql:query>
      a simple query...
   </esql:query>
   <esql:results>
      <esql:row-results>
         some results
      </esql:row-results> 
   </esql:results>
   <esql:no-results>
      if no results execute another query
         <esql:execute-query>
             another statement
         </esql:execute-query>
   </esql:no-results>
</esql:execute-query>
...

The problem here is that the compiler won't compile this xsp page, cause
the int _esql_update_count is already defined in the previous query.

Is it possible to change the above code from Cocoon 2.0.1 to:
Cocoon 2.0.1: (fix)
-------------
} else {;
   if (_esql_query.getStatement().getUpdateCount() &gt;= 0) {
     <xsl:apply-templates select="esql:update-results/*"/>
   }

Then it is possible to execute further sql queries in the no-results tag.
(As it was in the previous version of cocoon)



Best Regards,

Andi

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message