cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robbypelss...@apache.org
Subject svn commit: r1408783 - /cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java
Date Tue, 13 Nov 2012 15:32:49 GMT
Author: robbypelssers
Date: Tue Nov 13 15:32:48 2012
New Revision: 1408783

URL: http://svn.apache.org/viewvc?rev=1408783&view=rev
Log:
bugfix. AbstractSitemapNode overwrote baseUrl if set by invocation. 

Now below use case works correct. 

      <map:match equals="aggregation/xinclude-transformer">
        <map:generate src="aggregation/xinclude.xml" />
        <map:transform type="xinclude">
            <map:parameter name="cacheKey" value="{map:0}"/>
            <map:parameter name="baseUrl" value="file:///c:/tmp/"/>
            <map:parameter name="test" value="hello world"/>
        </map:transform>
        <map:serialize type="xml" />
      </map:match>

Modified:
    cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java

Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java?rev=1408783&r1=1408782&r2=1408783&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/AbstractSitemapNode.java
Tue Nov 13 15:32:48 2012
@@ -230,7 +230,11 @@ public abstract class AbstractSitemapNod
         }
 
         // set the baseUrl
-        invocationParams.put("baseUrl", invocation.resolve(""));
+        if (!invocationParams.containsKey("baseUrl")) {
+            invocationParams.put("baseUrl", invocation.resolve(""));
+        }  else {
+            invocationParams.put("baseUrl", invocation.resolve(invocationParams.get("baseUrl").toString()));
+        }
 
         // install the component
         invocation.installComponent(type, invocationParams);



Mime
View raw message