cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java esql.xsl
Date Tue, 17 Jul 2001 18:45:44 GMT
dims        01/07/17 11:45:44

  Modified:    src/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: cocoon_20_branch esql.xsl
  Log:
  - Sync esql.xsl across C2.0, C2.1 and C1.X
  - Check in Torsten's patches (which were over-written by mistake)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.4   +25 -20    xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
  retrieving revision 1.4.2.3
  retrieving revision 1.4.2.4
  diff -u -r1.4.2.3 -r1.4.2.4
  --- esql.xsl	2001/07/07 19:07:54	1.4.2.3
  +++ esql.xsl	2001/07/17 18:45:41	1.4.2.4
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!-- $Id: esql.xsl,v 1.4.2.3 2001/07/07 19:07:54 giacomo Exp $-->
  +<!-- $Id: esql.xsl,v 1.4.2.4 2001/07/17 18:45:41 dims Exp $-->
   <!--
   
    ============================================================================
  @@ -502,20 +502,28 @@
           </xsl:otherwise>
         </xsl:choose>
         if (_esql_query.results) {
  -        _esql_query.resultset = _esql_query.statement.getResultSet();
  -        _esql_query.resultset_metadata = _esql_query.resultset.getMetaData();
  -        _esql_query.position = 0;
  -        if (_esql_connection.use_limit_clause == 0 &amp;&amp; _esql_query.skip_rows
&gt; 0) {
  -          while (_esql_query.resultset.next()) {
  -            _esql_query.position++;
  -            if (_esql_query.position == _esql_query.skip_rows) {
  -              break;
  +        do {
  +          _esql_query.resultset = _esql_query.statement.getResultSet();
  +          _esql_query.resultset_metadata = _esql_query.resultset.getMetaData();
  +          _esql_query.position = 0;
  +          if (_esql_connection.use_limit_clause == 0 &amp;&amp; _esql_query.skip_rows
&gt; 0) {
  +            while (_esql_query.resultset.next()) {
  +              _esql_query.position++;
  +              if (_esql_query.position == _esql_query.skip_rows) {
  +                break;
  +              }
               }
             }
  -        }
  -        <xsl:apply-templates select="esql:results"/>
  -        <xsl:apply-templates select="esql:no-results"/>
  -        _esql_query.resultset.close();
  +
  +          if (_esql_query.resultset.next()) {
  +            <xsl:apply-templates select="esql:results"/>
  +          }
  +          else {
  +            <xsl:apply-templates select="esql:no-results"/>
  +          }
  +
  +          _esql_query.resultset.close();
  +        } while(_esql_query.statement.getMoreResults());
         } else {
           _esql_query.position = _esql_query.statement.getUpdateCount();
           if (_esql_query.position &gt;= 0) {
  @@ -562,11 +570,7 @@
   </xsl:template>
   
   <xsl:template match="esql:execute-query//esql:no-results">
  -  <xsp:logic>
  -    if (_esql_query.position == _esql_query.skip_rows) {
  -      <xsl:apply-templates/>
  -    }
  -  </xsp:logic>
  +  <xsl:apply-templates/>
   </xsl:template>
   
   <xsl:template match="esql:update-results//esql:get-update-count">
  @@ -575,14 +579,15 @@
   
   <xsl:template match="esql:results//esql:row-results">
     <xsp:logic>
  -    while (_esql_query.resultset.next()) {
  +    do {
         <xsl:apply-templates/>
         if (_esql_connection.use_limit_clause == 0 &amp;&amp; _esql_query.max_rows
!= -1 &amp;&amp; _esql_query.position - _esql_query.skip_rows == _esql_query.max_rows-1)
{
           _esql_query.position++;
           break;
         }
         _esql_query.position++;
  -    }
  +    } while (_esql_query.resultset.next());
  +
       if (_esql_query.resultset.next()) {
         <xsl:apply-templates select="following-sibling::esql:more-results" mode="more"/>
         _esql_query.position++;
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message