cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java session.xsl
Date Mon, 23 Apr 2001 12:10:01 GMT
dims        01/04/23 05:10:01

  Modified:    src/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: xml-cocoon2 session.xsl
  Log:
  Patch from Martin Man <Martin.Man@seznam.cz> for session.xsl
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +17 -2     xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/session.xsl
  
  Index: session.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/session.xsl,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- session.xsl	2001/03/23 19:38:11	1.1.2.4
  +++ session.xsl	2001/04/23 12:10:00	1.1.2.5
  @@ -72,15 +72,23 @@
         </xsl:call-template>
       </xsl:variable>
   
  +    <xsl:variable name="default">
  +      <xsl:call-template name="value-for-default">
  +      </xsl:call-template>
  +    </xsl:variable>
  +    
         <xsl:choose>
           <xsl:when test="$as = 'xml'">
   	  <xsp:element name="session:attribute">
  -	    <xsp:expr>XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(<xsl:copy-of
select="$name"/>))</xsp:expr>
  +	    <xsp:expr>XSPRequestHelper.getSessionAttribute(objectModel,
  +		    String.valueOf(<xsl:copy-of select="$name"/>),
  +		    String.valueOf(<xsl:copy-of select="$default"/>))</xsp:expr>
   	  </xsp:element>
           </xsl:when>
           <xsl:when test="$as = 'object'">
             <xsp:expr>XSPRequestHelper.getSessionAttribute(objectModel,
  -            String.valueOf(<xsl:copy-of select="$name"/>)
  +            String.valueOf(<xsl:copy-of select="$name"/>),
  +            String.valueOf(<xsl:copy-of select="$default"/>)
             )</xsp:expr>
           </xsl:when>
         </xsl:choose>
  @@ -352,6 +360,13 @@
       <xsl:choose>
         <xsl:when test="@as"><xsl:value-of select="@as"/></xsl:when>
         <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
  +    </xsl:choose>
  +  </xsl:template>
  +
  +  <xsl:template name="value-for-default">
  +    <xsl:choose>
  +      <xsl:when test="@default">"<xsl:value-of select="@default"/>"</xsl:when>
  +      <xsl:otherwise>""</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