Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 70105 invoked from network); 31 Aug 2009 13:29:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Aug 2009 13:29:11 -0000 Received: (qmail 7778 invoked by uid 500); 31 Aug 2009 13:29:11 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 7706 invoked by uid 500); 31 Aug 2009 13:29:11 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 7697 invoked by uid 99); 31 Aug 2009 13:29:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2009 13:29:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2009 13:29:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A2B40238889B; Mon, 31 Aug 2009 13:28:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r809578 - /forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java Date: Mon, 31 Aug 2009 13:28:49 -0000 To: svn@forrest.apache.org From: thorsten@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090831132849.A2B40238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);