bloritsch    01/12/28 11:16:19

  Modified:    src/org/apache/cocoon/components/language/markup/sitemap/java
                        sitemap.xsl
  Log:
  increase a little readability in sitemap.xsl
  
  Revision  Changes    Path
  1.57      +13 -16    
xml-cocoon2/src/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- sitemap.xsl       2001/12/19 14:17:12     1.56
  +++ sitemap.xsl       2001/12/28 19:16:19     1.57
  @@ -126,7 +126,7 @@
        *
        * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
        * @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
  -     * @version CVS $Id: sitemap.xsl,v 1.56 2001/12/19 14:17:12 haul Exp $
  +     * @version CVS $Id: sitemap.xsl,v 1.57 2001/12/28 19:16:19 bloritsch Exp $
        */
       public class <xsl:value-of select="@file-name"/> extends AbstractSitemap {
         static final String LOCATION = "<xsl:value-of select="translate(@file-path, 
'/', '.')"/>.<xsl:value-of select="@file-name"/>";
  @@ -1186,21 +1186,18 @@
       <!-- generate the invocation of the act method of the action component -->
       Action <xsl:value-of select="$action-name"/> = 
(Action)this.actions.select("<xsl:value-of select="$action-type"/>");
       try {
  -    <xsl:choose>
  -      <xsl:when test="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0' 
and local-name() != 'parameter']">
  -        if ((map = <xsl:value-of select="$action-name"/>.act(redirector, 
environment, objectModel, substitute(listOfMaps,<xsl:value-of 
select="$action-source"/>), <xsl:value-of select="$component-param"/>)) != null) {
  -          if (getLogger().isDebugEnabled()) getLogger().debug("Action <xsl:value-of 
select="$action-type"/>");
  -          listOfMaps.add (map);
  -          this.dumpParameters(listOfMaps);
  -          <xsl:apply-templates 
select="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0' and local-name() != 
'parameter']" mode="set"/>
  -          listOfMaps.remove(listOfMaps.size()-1);
  -          this.dumpParameters(listOfMaps);
  -        }
  -      </xsl:when>
  -      <xsl:otherwise>
           map = <xsl:value-of select="$action-name"/>.act(redirector, environment, 
objectModel, substitute(listOfMaps,<xsl:value-of select="$action-source"/>), 
<xsl:value-of select="$component-param"/>);
  -      </xsl:otherwise>
  -    </xsl:choose>
  +        <xsl:if test="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0' 
and local-name() != 'parameter']">
  +
  +          if (map != null) {
  +              if (getLogger().isDebugEnabled()) getLogger().debug("Action 
<xsl:value-of select="$action-type"/>");
  +              listOfMaps.add (map);
  +              this.dumpParameters(listOfMaps);
  +              <xsl:apply-templates 
select="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0' and local-name() != 
'parameter']" mode="set"/>
  +              listOfMaps.remove(listOfMaps.size()-1);
  +              this.dumpParameters(listOfMaps);
  +          }
  +      </xsl:if>
       } finally {
           this.actions.release(<xsl:value-of select="$action-name"/>);
       }
  @@ -1441,7 +1438,7 @@
             </xsl:call-template>
           </xsl:variable>
   
  -             <!-- print out deprecation message. -->
  +        <!-- print out deprecation message. -->
           <xsl:call-template name="warn">
             <xsl:with-param name="message">
               The use of &lt;redirect-to resource="<xsl:value-of 
select="@resource"/>"/&gt; is deprecated.
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to