cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java esql.xsl
Date Tue, 07 May 2002 08:09:13 GMT
haul        02/05/07 01:09:13

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: cocoon_2_0_3_branch esql.xsl
  Log:
  Patch from michael.enke@wincor-nixdorf.com (Michael Enke)
  resolves patch #8557
     I added a null attribute to <esql:get-columns/> and <esql:get-string/>
     Now it is possible to write e.g.
     <esql:get-columns null="value is null"/>
     or
     <esql:get-string null=""/>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.4  +8 -5      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
  retrieving revision 1.13.2.3
  retrieving revision 1.13.2.4
  diff -u -r1.13.2.3 -r1.13.2.4
  --- esql.xsl	19 Apr 2002 18:19:59 -0000	1.13.2.3
  +++ esql.xsl	7 May 2002 08:09:13 -0000	1.13.2.4
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<!-- $Id: esql.xsl,v 1.13.2.3 2002/04/19 18:19:59 froehlich Exp $-->
  +<!-- $Id: esql.xsl,v 1.13.2.4 2002/05/07 08:09:13 haul Exp $-->
   <!--
   
    ============================================================================
  @@ -56,7 +56,7 @@
    * ESQL Logicsheet
    *
    * @author ?
  - * @version CVS $Revision: 1.13.2.3 $ $Date: 2002/04/19 18:19:59 $
  + * @version CVS $Revision: 1.13.2.4 $ $Date: 2002/05/07 08:09:13 $
   -->
   
   <xsl:stylesheet version="1.0"
  @@ -726,6 +726,7 @@
                       <xsp:content>
                       <xsp:expr>
                         <xsl:call-template name="get-string-encoded">
  +                        <xsl:with-param name="null"><xsl:value-of select="@null"/></xsl:with-param>
                           <xsl:with-param name="column-spec">_esql_i</xsl:with-param>
                           <xsl:with-param name="resultset">_esql_query.getResultSet()</xsl:with-param>
                         </xsl:call-template>
  @@ -742,6 +743,7 @@
   <xsl:template match="esql:row-results//esql:get-string|esql:call-results//esql:get-string"
name="get-string">
     <xsp:expr>
       <xsl:call-template name="get-string-encoded">
  +      <xsl:with-param name="null"><xsl:value-of select="@null"/></xsl:with-param>
         <xsl:with-param name="column-spec"><xsl:call-template name="get-column"/></xsl:with-param>
         <xsl:with-param name="resultset"><xsl:call-template name="get-resultset"/></xsl:with-param>
       </xsl:call-template>
  @@ -1049,6 +1051,7 @@
   <xsl:template name="get-string-encoded">
     <xsl:param name="column-spec"/>
     <xsl:param name="resultset"/>
  +  <xsl:param name="null"/>
     <xsl:variable name="encoding">
       <xsl:choose>
         <xsl:when test="@encoding">"<xsl:value-of select="@encoding"/>"</xsl:when>
  @@ -1060,15 +1063,15 @@
         <xsl:otherwise>default</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
  +  <xsl:value-of select="$resultset"/>.getBytes(<xsl:value-of select="$column-spec"/>)
  +      == null ? "<xsl:value-of select="$null"/>" :
     <xsl:choose>
       <xsl:when test="$encoding = 'default'">
         <xsl:value-of select="$resultset"/>.getString(<xsl:value-of select="$column-spec"/>)
       </xsl:when>
       <xsl:otherwise>
  -      <xsl:value-of select="$resultset"/>.getBytes(<xsl:value-of select="$column-spec"/>)
  -      != null ? EsqlHelper.getStringFromByteArray(<xsl:value-of select="$resultset"/>.getBytes
  +      EsqlHelper.getStringFromByteArray(<xsl:value-of select="$resultset"/>.getBytes
           (<xsl:value-of select="$column-spec"/>), <xsl:value-of select="$encoding"/>)
  -      : ""
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
  
  
  

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