abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r642293 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Date Fri, 28 Mar 2008 17:01:05 GMT
Author: jmsnell
Date: Fri Mar 28 10:01:00 2008
New Revision: 642293

URL: http://svn.apache.org/viewvc?rev=642293&view=rev
Log:
only declare the attribute namespace if necessary

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java?rev=642293&r1=642292&r2=642293&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Fri Mar 28 10:01:00 2008
@@ -265,11 +265,11 @@
       if (value == null) return this;
       try {
         if (prefix != null) {
-          if (!prefix.equals("xml"))
+          if (!prefix.equals("xml") && needToWriteNamespace(prefix, namespace))
             writeNamespace(prefix,namespace,true);
           writer.writeAttribute(prefix, namespace, name, value);
         } else if (namespace != null) {
-          if (!namespace.equals(Constants.XML_NS));
+          if (!namespace.equals(Constants.XML_NS) && needToWriteNamespace(prefix,
namespace));
             writeNamespace(prefix,namespace,true);
           writer.writeAttribute(namespace, name, value);
         } else { 



Mime
View raw message