cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r731299 - /cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/ReadNode.java
Date Sun, 04 Jan 2009 17:27:57 GMT
Author: reinhard
Date: Sun Jan  4 09:27:55 2009
New Revision: 731299

URL: http://svn.apache.org/viewvc?rev=731299&view=rev
Log:
the 'src' attribute of read nodes is optional

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

Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/ReadNode.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/ReadNode.java?rev=731299&r1=731298&r2=731299&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/ReadNode.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/ReadNode.java
Sun Jan  4 09:27:55 2009
@@ -42,10 +42,16 @@
      */
     @Override
     public InvocationResult invoke(Invocation invocation) {
-        // install the component
         Map<String, Object> parameters = new HashMap<String, Object>(this.getParameters());
-        String resolvedSrc = invocation.resolveParameter(this.src);
-        parameters.put("source", invocation.resolve(resolvedSrc));
+        if (this.src != null) {
+            String resolvedSource = invocation.resolveParameter(this.src);
+            parameters.put("source", invocation.resolve(resolvedSource));
+        }
+
+        // set the baseUrl
+        parameters.put("baseUrl", invocation.resolve(""));
+
+        // install the component
         invocation.installComponent(READER_CATEGORY + this.type, parameters);
 
         // signal that we did some processing



Mime
View raw message