cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: rev 46207 - in cocoon/trunk: . src/blocks/taglib/java/org/apache/cocoon/taglib src/blocks/taglib/java/org/apache/cocoon/transformation
Date Thu, 16 Sep 2004 20:08:06 GMT
Author: vgritsenko
Date: Thu Sep 16 13:08:06 2004
New Revision: 46207

Added:
   cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/BodyContent.java
      - copied unchanged from rev 46206, cocoon/branches/BRANCH_2_1_X/src/blocks/taglib/java/org/apache/cocoon/taglib/BodyContent.java
   cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/BodyTag.java
      - copied unchanged from rev 46206, cocoon/branches/BRANCH_2_1_X/src/blocks/taglib/java/org/apache/cocoon/taglib/BodyTag.java
Modified:
   cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/Tag.java
   cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java
   cocoon/trunk/status.xml
Log:
Taglib block: Initial implementation of BodyTag.



Modified: cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/Tag.java
==============================================================================
--- cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/Tag.java	(original)
+++ cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/taglib/Tag.java	Thu Sep 16 13:08:06
2004
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@
  * @see org.apache.cocoon.transformation.TagTransformer
  * 
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * @version CVS $Id: Tag.java,v 1.3 2004/03/05 13:02:24 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public interface Tag extends Component {
     
@@ -53,7 +53,7 @@
 
     /**
      * Continue evaluating the page.
-     * Valid return value for doEndTag().
+     * Valid return value for doEndTag.
      */
     int EVAL_PAGE = 2;
 

Modified: cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java
==============================================================================
--- cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java
(original)
+++ cocoon/trunk/src/blocks/taglib/java/org/apache/cocoon/transformation/TagTransformer.java
Thu Sep 16 13:08:06 2004
@@ -32,9 +32,12 @@
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.taglib.IterationTag;
 import org.apache.cocoon.taglib.Tag;
+import org.apache.cocoon.taglib.BodyTag;
+import org.apache.cocoon.taglib.BodyContent;
 import org.apache.cocoon.xml.AbstractXMLProducer;
 import org.apache.cocoon.xml.XMLConsumer;
 import org.apache.cocoon.xml.XMLProducer;
+import org.apache.cocoon.xml.SaxBuffer;
 
 import org.apache.commons.collections.ArrayStack;
 import org.apache.commons.collections.map.StaticBucketMap;
@@ -389,9 +392,25 @@
                     try {
                         xmlDeserializer = (XMLDeserializer) manager.lookup(XMLDeserializer.ROLE);
                         xmlDeserializer.setConsumer(this);
+
+                        // BodyTag Support
+                        XMLConsumer backup = this.currentConsumer;
+                        if (tag instanceof BodyTag) {
+                            SaxBuffer content = new SaxBuffer();
+                            this.currentConsumer = content;
+                            ((BodyTag)tag).setBodyContent(new BodyContent(content, backup));
+                            ((BodyTag)tag).doInitBody();
+                        }
+
                         do {
                             xmlDeserializer.deserialize(saxFragment);
                         } while (iterTag.doAfterBody() != Tag.SKIP_BODY);
+
+                        // BodyTag Support
+                        if (tag instanceof BodyTag) {
+                            this.currentConsumer = backup;
+                        }
+
                     } catch (ServiceException e) {
                         throw new SAXException("Can't obtain XMLDeserializer", e);
                     } finally {

Modified: cocoon/trunk/status.xml
==============================================================================
--- cocoon/trunk/status.xml	(original)
+++ cocoon/trunk/status.xml	Thu Sep 16 13:08:06 2004
@@ -323,6 +323,13 @@
    </action>
  </release>
  <release version="2.1.6" date="TBD">
+   <action dev="VG" type="add">
+     Taglib block: Initial implementation of BodyTag.
+   </action>
+   <action dev="VG" type="update">
+     Portal block: Changed pathInfo and servletPath logic. pathInfo always starts
+     with '/', while servletPath always has no '/' at the end.
+   </action>
    <action dev="VG" type="fix">
      Cron block: Fixed memory leak, QuartzJobExecutor was not releasing pipelines.
    </action>

Mime
View raw message