cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r805799 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java
Date Wed, 19 Aug 2009 13:36:43 GMT
Author: jasha
Date: Wed Aug 19 13:36:42 2009
New Revision: 805799

URL: http://svn.apache.org/viewvc?rev=805799&view=rev
Log:
COCOON-2228 fixed removing namespaces when using multiple attributes. No initial copy of attributes.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java?rev=805799&r1=805798&r2=805799&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java
Wed Aug 19 13:36:42 2009
@@ -67,17 +67,16 @@
 	public void startElement(String uri, String localName, String qName,
 			Attributes attr) throws SAXException {
 	    
-	    AttributesImpl l_attr = new AttributesImpl(attr);
+	    AttributesImpl l_attr = new AttributesImpl();
 
         String attrName;
         String attrValue;
         String attrType;
         for (int i = 0; i < attr.getLength(); i++) {
-            attrName = l_attr.getLocalName(i);
-            attrValue = l_attr.getValue(i);
-            attrType = l_attr.getType(i);
+            attrName = attr.getLocalName(i);
+            attrValue = attr.getValue(i);
+            attrType = attr.getType(i);
             if (attrValue != null) {
-                l_attr.removeAttribute(i);
                 l_attr.addAttribute(EMPTY_NS, attrName, attrName, attrType, attrValue);
             }
         }



Mime
View raw message