Hi, I would like to submit patch for the initial parsing white space handling. The patch is attached to this email.
This patch is normalize the document on the parsing stage and it is also handle XML space attribute based on return value of XMLSupport.getXMLSpace(Element) Do I need to put this into bugzilla? Regards Tonny Kohar -- Sketsa SVG Graphics Editor http://www.kiyut.com
Index: SAXDocumentFactory.java =================================================================== RCS file: /home/cvspublic/xml-batik/sources/org/apache/batik/dom/util/SAXDocumentFactory.java,v retrieving revision 1.24 diff -r1.24 SAXDocumentFactory.java 31a32 > import org.w3c.dom.Text; 44a46 > import org.apache.batik.util.XMLConstants; 601c603,616 < currentNode.appendChild(document.createTextNode(data)); --- > //currentNode.appendChild(document.createTextNode(data)); > boolean preserve = XMLSupport.getXMLSpace((Element)currentNode).equals(XMLConstants.XML_PRESERVE_VALUE); > if (preserve == true) { > currentNode.appendChild(document.createTextNode(data)); > } else { > if (data.trim().length()!=0) { > Node lastChild = currentNode.getLastChild(); > if (lastChild instanceof Text) { > ((Text)lastChild).appendData(" " + data.trim()); > } else { > currentNode.appendChild(document.createTextNode(data.trim())); > } > } > }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]