]> source.dussan.org Git - poi.git/commitdiff
tweaked validation of xml to keep Gump quiet
authorYegor Kozlov <yegor@apache.org>
Sat, 26 Feb 2011 20:52:50 +0000 (20:52 +0000)
committerYegor Kozlov <yegor@apache.org>
Sat, 26 Feb 2011 20:52:50 +0000 (20:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1074920 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java

index fb0370caf40df676c5ce9fa677abeaad1a3473f8..b5b4a6ba6eb022e688bbfb0e4e3ca75493162d18 100644 (file)
@@ -134,7 +134,7 @@ public class XSSFExportToXml implements Comparator<String>{
         if (isNamespaceDeclared()) {
             root=doc.createElementNS(getNamespace(),rootElement);
         } else {
-            root=doc.createElement(rootElement);
+            root = doc.createElementNS("", rootElement);
         }
         doc.appendChild(root);
 
@@ -339,7 +339,7 @@ public class XSSFExportToXml implements Comparator<String>{
         NamedNodeMap attributesMap = currentNode.getAttributes();
         Node attribute = attributesMap.getNamedItem(attributeName);
         if (attribute==null) {
-            attribute = doc.createAttribute(attributeName);
+            attribute = doc.createAttributeNS("", attributeName);
             attributesMap.setNamedItem(attribute);
         }
         return attribute;
@@ -350,7 +350,7 @@ public class XSSFExportToXml implements Comparator<String>{
         if (isNamespaceDeclared()) {
             selectedNode =doc.createElementNS(getNamespace(),axisName);
         } else {
-            selectedNode =doc.createElement(axisName);
+            selectedNode = doc.createElementNS("", axisName);
         }
         currentNode.appendChild(selectedNode);
         return selectedNode;