abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r640068 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Date Sat, 22 Mar 2008 20:00:49 GMT
Author: jmsnell
Date: Sat Mar 22 13:00:49 2008
New Revision: 640068

URL: http://svn.apache.org/viewvc?rev=640068&view=rev
Log:
Significant bug causing the default namespace to not be declared properly.  Need to fix this
in 0.4.0 before it goes out the door also

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=640068&r1=640067&r2=640068&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
Sat Mar 22 13:00:49 2008
@@ -157,21 +157,22 @@
     try {
       if (autoindent && textwritten == 0) indent();
       push();
-      if (prefix != null) {
+      if (prefix != null && !prefix.equals("")) {
         writer.writeStartElement(
           prefix,
           name,
           namespace);
+        writeNamespace(prefix,namespace,false);
       } else if (namespace != null) {
         writer.writeStartElement(
           "",
           name, 
           namespace);
+        writer.writeDefaultNamespace(namespace);
       } else {
         writer.writeStartElement("",name,"");
         writer.writeDefaultNamespace("");
       }
-      writeNamespace(prefix,namespace,false);
       if (autoflush) writer.flush();
     } catch(XMLStreamException e) {
       throw new RuntimeException(e);



Mime
View raw message