cmlenz      2003/06/28 13:12:52

  Modified:    documentation/docs/skins/jakarta.apache.org/stylesheets
                        common.xsl
  Log:
  A <xsl:choose> with only one nested <xsl:when> is equivalent to <xsl:if>
  
  Revision  Changes    Path
  1.15      +13 -16    
jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/common.xsl
  
  Index: common.xsl
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/common.xsl,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- common.xsl        4 May 2003 14:21:29 -0000       1.14
  +++ common.xsl        28 Jun 2003 20:12:52 -0000      1.15
  @@ -95,19 +95,16 @@
   
     <xsl:template name="get-directory">
       <xsl:param name="file"/>
  -    <xsl:choose>
  -      <xsl:when test="contains( $file, '/' )">
  -        <xsl:variable name="dir" select="substring-before($file, '/')" />
  -        <xsl:variable name="remainder" select="substring-after($file, '/')" />
  -        <xsl:variable name="path">
  -          <xsl:call-template name="get-directory">
  -            <xsl:with-param name="file" select="$remainder"/>
  -          </xsl:call-template>
  -        </xsl:variable>
  -        <xsl:value-of select="concat($dir,'/',$path)"/>
  -      </xsl:when>
  -      <xsl:otherwise/>
  -    </xsl:choose>
  +    <xsl:if test="contains($file,'/')">
  +      <xsl:variable name="dir" select="substring-before($file,'/')" />
  +      <xsl:variable name="remainder" select="substring-after($file,'/')" />
  +      <xsl:variable name="path">
  +        <xsl:call-template name="get-directory">
  +          <xsl:with-param name="file" select="$remainder"/>
  +        </xsl:call-template>
  +      </xsl:variable>
  +      <xsl:value-of select="concat($dir,'/',$path)"/>
  +    </xsl:if>
     </xsl:template>
   
     <!-- ==================================================================== -->
  @@ -125,8 +122,8 @@
     <xsl:template name="get-base-directory-internal">
       <xsl:param name="file"/>
       <xsl:choose>
  -      <xsl:when test="contains( $file, '/' )">
  -        <xsl:variable name="remainder" select="substring-after($file, '/')" />
  +      <xsl:when test="contains($file,'/')">
  +        <xsl:variable name="remainder" select="substring-after($file,'/')" />
           <xsl:variable name="path">
             <xsl:call-template name="get-base-directory-internal">
               <xsl:with-param name="file" select="$remainder"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to