cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java context.xsl request.xsl response.xsl session.xsl util.xsl
Date Thu, 06 Jan 2000 17:56:46 GMT
stefano     00/01/06 09:56:46

  Modified:    src/org/apache/cocoon/processor/xsp/library/java context.xsl
                        request.xsl response.xsl session.xsl util.xsl
  Log:
  missed getServerName() + tab/spaces cleanup
  
  Revision  Changes    Path
  1.2       +11 -11    xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/context.xsl
  
  Index: context.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/context.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- context.xsl	2000/01/05 19:38:31	1.1
  +++ context.xsl	2000/01/06 17:56:43	1.2
  @@ -5,34 +5,34 @@
    ============================================================================
                      The Apache Software License, Version 1.1
    ============================================================================
  - 
  +
       Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  +
    Redistribution and use in source and binary forms, with or without modifica-
    tion, are permitted provided that the following conditions are met:
  - 
  +
    1. Redistributions of  source code must  retain the above copyright  notice,
       this list of conditions and the following disclaimer.
  - 
  +
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
  - 
  +
    3. The end-user documentation included with the redistribution, if any, must
       include  the following  acknowledgment:  "This product includes  software
       developed  by the  Apache Software Foundation  (http://www.apache.org/)."
       Alternately, this  acknowledgment may  appear in the software itself,  if
       and wherever such third-party acknowledgments normally appear.
  - 
  +
    4. The names "Cocoon" and  "Apache Software Foundation"  must not be used to
       endorse  or promote  products derived  from this  software without  prior
       written permission. For written permission, please contact
       apache@apache.org.
  - 
  +
    5. Products  derived from this software may not  be called "Apache", nor may
       "Apache" appear  in their name,  without prior written permission  of the
       Apache Software Foundation.
  - 
  +
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  @@ -43,12 +43,12 @@
    ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
    (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  +
    This software  consists of voluntary contributions made  by many individuals
    on  behalf of the Apache Software  Foundation and was  originally created by
  - Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache 
  + Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache
    Software Foundation, please see <http://www.apache.org/>.
  - 
  +
   -->
   
   <!-- written by Ricardo Rocha "ricardo@apache.org" -->
  
  
  
  1.2       +30 -10    xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/request.xsl
  
  Index: request.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/request.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- request.xsl	2000/01/05 19:38:50	1.1
  +++ request.xsl	2000/01/06 17:56:45	1.2
  @@ -76,7 +76,7 @@
           </xsl:when>
           <xsl:when test="$as = 'string'">
             XSPRequestLibrary.getAttribute(
  -	    request,
  +            request,
               String.valueOf(<xsl:copy-of select="$name"/>)
             )
           </xsl:when>
  @@ -292,8 +292,8 @@
           </xsl:when>
           <xsl:when test="$as = 'array'">
             request.getParameterValues(
  -	    String.valueOf(<xsl:copy-of select="$name"/>)
  -	  )
  +            String.valueOf(<xsl:copy-of select="$name"/>)
  +          )
           </xsl:when>
         </xsl:choose>
       </xsp:expr>
  @@ -383,7 +383,27 @@
       </xsp:expr>
     </xsl:template>
   
  +  <!-- request.getServerName -->
  +  <xsl:template match="request:get-server-name">
  +    <!-- Ensure attribute "as" has a value -->
  +    <xsl:variable name="as">
  +      <xsl:call-template name="value-for-as">
  +        <xsl:with-param name="default" select="'string'"/>
  +      </xsl:call-template>
  +    </xsl:variable>
   
  +    <xsp:expr>
  +      <xsl:choose>
  +        <xsl:when test="$as = 'node'">
  +          XSPRequestLibrary.getServerName(request, document)
  +        </xsl:when>
  +        <xsl:when test="$as = 'string'">
  +          request.getServerName()
  +        </xsl:when>
  +      </xsl:choose>
  +    </xsp:expr>
  +  </xsl:template>
  +
     <!-- request.getServerPort -->
     <xsl:template match="request:get-server-port">
       <!-- Ensure attribute "as" has a value -->
  @@ -753,7 +773,7 @@
               <xsl:with-param name="content" select="format"/>
             </xsl:call-template>
           </xsl:when>
  -	<xsl:otherwise>null</xsl:otherwise>
  +        <xsl:otherwise>null</xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
   
  @@ -772,8 +792,8 @@
               new Date(
                 request.getDateHeader(
                   String.valueOf(
  -		  String.valueOf(<xsl:copy-of select="$name"/>)
  -		)
  +                  String.valueOf(<xsl:copy-of select="$name"/>)
  +                )
                 )
               ),
               <xsl:copy-of select="$format"/>
  @@ -917,7 +937,7 @@
         </xsl:choose>
       </xsp:expr>
     </xsl:template>
  - 
  +
     <!-- request.isRequestedSessionIdFromCookie -->
     <xsl:template match="request:is-requested-session-id-from-cookie">
       <!-- Ensure attribute "as" has a value -->
  @@ -941,7 +961,7 @@
         </xsl:choose>
       </xsp:expr>
     </xsl:template>
  - 
  +
     <!-- request.isRequestedSessionIdFromURL -->
     <xsl:template match="request:is-requested-session-id-from-url">
       <!-- Ensure attribute "as" has a value -->
  @@ -966,7 +986,7 @@
       </xsp:expr>
     </xsl:template>
   
  - 
  +
     <!-- request.isRequestedSessionIdValid -->
     <xsl:template match="request:is-requested-session-id-valid">
       <!-- Ensure attribute "as" has a value -->
  @@ -990,7 +1010,7 @@
         </xsl:choose>
       </xsp:expr>
     </xsl:template>
  - 
  +
     <!-- request.isUserInRole -->
     <xsl:template match="request:is-user-in-role">
       <!-- Get "role" parameter as either attribute or nested element -->
  
  
  
  1.2       +7 -7      xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/response.xsl
  
  Index: response.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/response.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- response.xsl	2000/01/05 19:38:55	1.1
  +++ response.xsl	2000/01/06 17:56:45	1.2
  @@ -118,7 +118,7 @@
         response.setContentType(
           String.valueOf(
             <xsl:copy-of select="$type"/>
  -	)
  +        )
         );
       </xsp:logic>
     </xsl:template>
  @@ -192,12 +192,12 @@
             XSPResponseLibrary.addDateHeader(
               response,
               String.valueOf(<xsl:copy-of select="$name"/>),
  -	    String.valueOf(
  +            String.valueOf(
                 <xsl:call-template name="get-nested-content">
                   <xsl:with-param name="content" select="$date"/>
                 </xsl:call-template>
  -	    ),
  -	    String.valueOf(<xsl:copy-of select="$format"/>)
  +            ),
  +            String.valueOf(<xsl:copy-of select="$format"/>)
             );
           </xsl:when>
           <xsl:otherwise>
  @@ -466,12 +466,12 @@
             XSPResponseLibrary.setDateHeader(
               response,
               String.valueOf(<xsl:copy-of select="$name"/>),
  -	    String.valueOf(
  +            String.valueOf(
                 <xsl:call-template name="get-nested-content">
                   <xsl:with-param name="content" select="$date"/>
                 </xsl:call-template>
  -	    ),
  -	    String.valueOf(<xsl:copy-of select="$format"/>)
  +            ),
  +            String.valueOf(<xsl:copy-of select="$format"/>)
             );
           </xsl:when>
           <xsl:otherwise>
  
  
  
  1.2       +4 -4      xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/session.xsl
  
  Index: session.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/session.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- session.xsl	2000/01/05 19:38:58	1.1
  +++ session.xsl	2000/01/06 17:56:45	1.2
  @@ -302,10 +302,10 @@
       <xsp:logic>
         session.setInactiveInterval(
           Integer.parseInt(
  -	  String.valueOf(
  -	    <xsl:copy-of select="$interval"/>
  -	  )
  -	)
  +          String.valueOf(
  +            <xsl:copy-of select="$interval"/>
  +          )
  +        )
         );
       </xsp:logic>
     </xsl:template>
  
  
  
  1.2       +7 -7      xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/util.xsl
  
  Index: util.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/java/util.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- util.xsl	2000/01/05 19:39:02	1.1
  +++ util.xsl	2000/01/06 17:56:45	1.2
  @@ -77,13 +77,13 @@
           );
         } catch (Exception e) {
           xspCurrentNode.appendChild(
  -	  document.createTextNode(
  -	    "{" +
  -	      "Unable to embed: " +
  -	      embedURI +
  -	    "}"
  -	  )
  -	);
  +          document.createTextNode(
  +            "{" +
  +              "Unable to embed: " +
  +              embedURI +
  +            "}"
  +          )
  +        );
         }
       } </xsp:logic>
     </xsl:template>
  
  
  

Mime
View raw message