You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2002/02/08 18:36:21 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java esql.xsl

dims        02/02/08 09:36:21

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/java
                        esql.xsl
  Log:
  Fix problems in ESQL samples in the "build.precompile" mode.
  
  Revision  Changes    Path
  1.8       +8 -2      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- esql.xsl	7 Feb 2002 06:57:33 -0000	1.7
  +++ esql.xsl	8 Feb 2002 17:36:21 -0000	1.8
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!-- $Id: esql.xsl,v 1.7 2002/02/07 06:57:33 cziegeler Exp $-->
  +<!-- $Id: esql.xsl,v 1.8 2002/02/08 17:36:21 dims Exp $-->
   <!--
   
    ============================================================================
  @@ -133,26 +133,32 @@
       </xsl:when>
       <xsl:when test="$environment = 'Cocoon2'">
         <xsl:choose>
  +        <!-- if $content has sub-elements, concatenate them -->
           <xsl:when test="$content/*">
             ""
             <xsl:for-each select="$content/node()">
               <xsl:choose>
                 <xsl:when test="name(.)">
  +                <!-- element -->
                   <xsl:choose>
                     <xsl:when test="namespace-uri(.)='http://apache.org/xsp' and local-name(.)='text'">
  -                    + "<xsl:value-of select="."/>"
  +                    <!-- xsp:text element -->
  +                    + "<xsl:value-of select="translate(.,'&#9;&#10;&#13;','   ')"/>"
                     </xsl:when>
                     <xsl:otherwise>
  +                    <!-- other elements -->
                       + <xsl:apply-templates select="."/>
                     </xsl:otherwise>
                   </xsl:choose>
                 </xsl:when>
                 <xsl:otherwise>
  +                <!-- text node -->
                   + "<xsl:value-of select="translate(.,'&#9;&#10;&#13;','   ')"/>"
                 </xsl:otherwise>
               </xsl:choose>
             </xsl:for-each>
           </xsl:when>
  +        <!-- else return the text value of $content -->
           <xsl:otherwise>"<xsl:value-of select="normalize-space($content)"/>"</xsl:otherwise>
         </xsl:choose>
       </xsl:when>
  
  
  

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