elena 2004/01/19 08:15:53 Modified: java/src/org/apache/xerces/dom DOMNormalizer.java Log: Committing patch from Kohsuke Kawaguchi. Bug http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25346. Revision Changes Path 1.45 +5 -9 xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java Index: DOMNormalizer.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- DOMNormalizer.java 9 Dec 2003 12:12:21 -0000 1.44 +++ DOMNormalizer.java 19 Jan 2004 16:15:53 -0000 1.45 @@ -518,7 +518,7 @@ Node prevSibling = node.getPreviousSibling(); Node parent = node.getParentNode(); ((EntityReferenceImpl)node).setReadOnly(false, true); - expandEntityRef (node, parent, node); + expandEntityRef (parent, node); parent.removeChild(node); Node next = (prevSibling != null)?prevSibling.getNextSibling():parent.getFirstChild(); // The list of children #text -> &ent; @@ -713,15 +713,11 @@ return null; }//normalizeNode - protected final void expandEntityRef (Node node, Node parent, Node reference){ + protected final void expandEntityRef (Node parent, Node reference){ Node kid, next; - for (kid = node.getFirstChild(); kid != null; kid = next) { + for (kid = reference.getFirstChild(); kid != null; kid = next) { next = kid.getNextSibling(); - if (node.getNodeType() == Node.TEXT_NODE) { - expandEntityRef(kid, parent, reference); - } else { - parent.insertBefore(kid, reference); - } + parent.insertBefore(kid, reference); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]