cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r289425 - /cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
Date Fri, 16 Sep 2005 08:08:51 GMT
Author: cziegeler
Date: Fri Sep 16 01:08:48 2005
New Revision: 289425

URL: http://svn.apache.org/viewcvs?rev=289425&view=rev
Log:
Add helper method to get a mutable attributes object.

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java?rev=289425&r1=289424&r2=289425&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java Fri
Sep 16 01:08:48 2005
@@ -35,6 +35,7 @@
 import org.apache.cocoon.transformation.helpers.TextRecorder;
 import org.apache.cocoon.util.ClassUtils;
 import org.apache.cocoon.util.TraxErrorHandler;
+import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.IncludeXMLConsumer;
 import org.apache.cocoon.xml.SaxBuffer;
 import org.apache.cocoon.xml.XMLConsumer;
@@ -1072,5 +1073,15 @@
         }
 
         return null;
+    }
+
+    /**
+     * Helper method to get a modifiable attribute set.
+     */
+    protected AttributesImpl getMutableAttributes(Attributes a) {
+        if ( a instanceof AttributesImpl ) {
+            return (AttributesImpl)a;
+        }
+        return new AttributesImpl(a);
     }
 }



Mime
View raw message