cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/markup/sitemap/java sitemap.xsl
Date Mon, 10 Dec 2001 09:05:54 GMT
haul        01/12/10 01:05:54

  Modified:    src/org/apache/cocoon/components/language/markup/sitemap/java
                        sitemap.xsl
  Log:
  map:call now _always_ creates a new map
  
  Revision  Changes    Path
  1.53      +27 -17    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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- sitemap.xsl	2001/12/07 16:30:56	1.52
  +++ sitemap.xsl	2001/12/10 09:05:54	1.53
  @@ -126,7 +126,7 @@
        *
        * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
        * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  -     * @version CVS $Id: sitemap.xsl,v 1.52 2001/12/07 16:30:56 haul Exp $
  +     * @version CVS $Id: sitemap.xsl,v 1.53 2001/12/10 09:05:54 haul 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"/>";
  @@ -1392,24 +1392,34 @@
   
     <!-- generate the code to redirect a request to an internal resource definition -->
     <xsl:template match="map:call">
  -    <xsl:if test="map:parameter">
  -      map = new HashMap(<xsl:value-of select="count(map:parameter)"/>);
  -      <xsl:for-each select="map:parameter">
  -        <xsl:variable name="name">
  -          <xsl:call-template name="get-parameter">
  -            <xsl:with-param name="parname">name</xsl:with-param>
  -          </xsl:call-template>
  -        </xsl:variable>
  -        <xsl:variable name="value">
  -          <xsl:call-template name="get-parameter">
  -            <xsl:with-param name="parname">value</xsl:with-param>
  -          </xsl:call-template>
  -        </xsl:variable>
  -        map.put("<xsl:value-of select="$name"/>", substitute(listOfMaps, "<xsl:value-of
select="$value"/>"));
  -      </xsl:for-each>
  +    <xsl:choose>
  +
  +      <xsl:when test="map:parameter">
  +        map = new HashMap(<xsl:value-of select="count(map:parameter)"/>);
  +
  +        <xsl:for-each select="map:parameter">
  +          <xsl:variable name="name">
  +            <xsl:call-template name="get-parameter">
  +              <xsl:with-param name="parname">name</xsl:with-param>
  +            </xsl:call-template>
  +          </xsl:variable>
  +          <xsl:variable name="value">
  +            <xsl:call-template name="get-parameter">
  +              <xsl:with-param name="parname">value</xsl:with-param>
  +            </xsl:call-template>
  +          </xsl:variable>
  +          map.put("<xsl:value-of select="$name"/>", substitute(listOfMaps, "<xsl:value-of
select="$value"/>"));
  +        </xsl:for-each>
  +
  +      </xsl:when>
  +
  +      <xsl:otherwise>
  +        map = new HashMap(1);
  +      </xsl:otherwise>
  +
  +    </xsl:choose>
         listOfMaps.add(map);
         this.dumpParameters(listOfMaps);
  -    </xsl:if>
         Class[] argTypes = new Class[] {StreamPipeline.class, EventPipeline.class, List.class,
Environment.class, String.class, Boolean.TYPE};
         Object[] argValues = new Object[] {pipeline, eventPipeline, listOfMaps, environment,
cocoon_view, new Boolean(internalRequest)};
         String methodName = "resource_" + substitute(listOfMaps, "<xsl:value-of select="translate(@resource,
'- ', '__')"/>");
  
  
  

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