abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r493164 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Date Fri, 05 Jan 2007 19:55:15 GMT
Author: jmsnell
Date: Fri Jan  5 11:55:14 2007
New Revision: 493164

URL: http://svn.apache.org/viewvc?view=rev&rev=493164
Log:
fix FOMElement clone so that attributes and namespace declarations work

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?view=diff&rev=493164&r1=493163&r2=493164
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Fri Jan  5 11:55:14 2007
@@ -545,11 +545,12 @@
   protected OMElement _copyElement(OMElement src, OMElement dest) {
     for (Iterator i = src.getAllAttributes(); i.hasNext();) {
       OMAttribute attr = (OMAttribute) i.next();
+      dest.addAttribute(attr);
       dest.addAttribute(
-        attr.getLocalName(), 
-        attr.getAttributeValue(), 
-        (attr.getNamespace() != null) ? 
-          dest.declareNamespace(attr.getNamespace()) : null);
+        factory.createOMAttribute(
+          attr.getLocalName(), 
+          attr.getNamespace(), 
+          attr.getAttributeValue()));
     }
     for (Iterator i = src.getChildren(); i.hasNext();) {
       OMNode node = (OMNode) i.next();



Mime
View raw message