Author: thorsten
Date: Mon Aug 31 13:28:49 2009
New Revision: 809578

URL: http://svn.apache.org/viewvc?rev=809578&view=rev
Log:
Allowing the output of multiple roots within the result tag. this can be then 
used to strip the root tag and creating html (not xhtml) conform outputs. You 
can just pass the map:parameter name='multipleRoot' value='true' via the 
sitemap.

Modified:
    
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java

Modified: 
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
URL: 
http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=809578&r1=809577&r2=809578&view=diff
==============================================================================
--- 
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
 (original)
+++ 
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
 Mon Aug 31 13:28:49 2009
@@ -247,6 +247,8 @@
 
   private EntityResolver entityResolver;
 
+  private boolean multipleRoot;
+
   /*
    * @see
    * 
org.apache.cocoon.transformation.AbstractSAXTransformer#configure(org.apache
@@ -384,6 +386,7 @@
       getLogger().error(error);
       throw new ProcessingException(error);
     }
+    multipleRoot = parameters.getParameterAsBoolean("multipleRoot", false);
     // add the format to the cache key
     this.cacheKey += requestedFormat;
     if (null == m_resolver) {
@@ -673,7 +676,8 @@
       // get the result of the structurer as stream
       ByteArrayOutputStream out = new ByteArrayOutputStream();
       OMElement firstElement = root.getFirstElement();
-      if (null != firstElement) {
+
+      if (null != firstElement & !multipleRoot) {
         firstElement.serialize(out);
       } else {
         root.serialize(out);