cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/markup/sitemap/java sitemap.xsl
Date Thu, 10 May 2001 07:24:53 GMT
giacomo     01/05/10 00:24:52

  Modified:    src/org/apache/cocoon/components/language/markup/sitemap/java
                        sitemap.xsl
  Log:
  patch applied
  Submitted by: Leo Sutic
  
  Revision  Changes    Path
  1.2       +31 -4     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xsl	2001/05/09 20:49:51	1.1
  +++ sitemap.xsl	2001/05/10 07:24:45	1.2
  @@ -99,7 +99,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.1 2001/05/09 20:49:51 giacomo Exp $
  +     * @version CVS $Id: sitemap.xsl,v 1.2 2001/05/10 07:24:45 giacomo 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"/>";
  @@ -171,7 +171,7 @@
             <xsl:variable name="type" select="translate(@name, '- ', '__')"/>
             <xsl:variable name="default" select="@name = ../@default"/>
             <xsl:variable name="config" select="descendant-or-self::*"/>
  -          private boolean <xsl:value-of select="$name"/>Select (<xsl:value-of
select="java:getParameterSource($factory-loader, string($src),$config)"/> pattern, Map
objectModel) {
  +          private boolean <xsl:value-of select="$name"/>Select (<xsl:value-of
select="java:getParameterSource($factory-loader, string($src),$config)"/> pattern, Map
objectModel, Parameters param) {
               <xsl:value-of select="java:getMethodSource($factory-loader, string($src),$config)"/>
             }
             <xsl:for-each select="/map:sitemap/map:pipelines/map:pipeline/descendant::map:select[@type=$name
or (not(@type) and $default)]/map:when">
  @@ -595,6 +595,33 @@
   
       <!-- modification end -->
   
  +	<!-- Modified 20010510 L.Sutic Changed to pass sitemap parameters. -->
  +   	
  +	<!-- test if we have to define parameters for this action -->
  +    <xsl:if test="count(parameter)>0">
  +      param = new Parameters ();
  +    </xsl:if>
  +
  +    <!-- generate the value used for the parameter argument in the invocation of the
act method of this action -->
  +    <xsl:variable name="component-param">
  +      <xsl:choose>
  +        <xsl:when test="count(parameter)>0">
  +          param
  +        </xsl:when>
  +        <xsl:otherwise>
  +          emptyParam
  +        </xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +
  +    <!-- collect the parameters -->
  +    <xsl:apply-templates select="parameter">
  +        <xsl:with-param name="param">param</xsl:with-param>
  +    </xsl:apply-templates>
  +
  +	<!-- modification end -->
  +		
  +		
       <!-- loop through all the when cases -->
       <xsl:for-each select="./map:when">
   
  @@ -636,10 +663,10 @@
           <!-- check if we have a selector definition in this sitemap otherwise get it
from the parent -->
           <xsl:choose>
             <xsl:when test="string($is-factory)='true'">
  -            <xsl:value-of select="translate($selector-type, '- ', '__')"/>Select(<xsl:value-of
select="$selector-name2"/>_expr, objectModel)
  +            <xsl:value-of select="translate($selector-type, '- ', '__')"/>Select(<xsl:value-of
select="$selector-name2"/>_expr, objectModel, <xsl:value-of select="$component-param"/>)
             </xsl:when>
             <xsl:otherwise>
  -            ((Selector)this.selectors.select("<xsl:value-of select="$selector-type"/>")).select(substitute(listOfMaps,"<xsl:value-of
select="$test-value"/>"), objectModel)
  +            ((Selector)this.selectors.select("<xsl:value-of select="$selector-type"/>")).select(substitute(listOfMaps,"<xsl:value-of
select="$test-value"/>"), objectModel, <xsl:value-of select="$component-param"/>)
             </xsl:otherwise>
           </xsl:choose>
         </xsl:variable>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message