? gnu/xml/validation Index: gnu/xml/dom/DomCharacterData.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomCharacterData.java,v retrieving revision 1.4 diff -u -r1.4 DomCharacterData.java --- gnu/xml/dom/DomCharacterData.java 2 Jul 2005 20:32:15 -0000 1.4 +++ gnu/xml/dom/DomCharacterData.java 23 Jan 2006 09:11:39 -0000 @@ -1,5 +1,5 @@ /* DomCharacterData.java -- - Copyright (C) 1999,2000,2001,2004 Free Software Foundation, Inc. + Copyright (C) 1999,2000,2001,2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,6 +39,8 @@ import org.w3c.dom.CharacterData; import org.w3c.dom.DOMException; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; import org.w3c.dom.events.MutationEvent; @@ -55,6 +57,30 @@ implements CharacterData { + /** + * Empty node list representing the children of character data nodes. + */ + static class EmptyNodeList + implements NodeList + { + + public int getLength() + { + return 0; + } + + public Node item(int index) + { + return null; + } + + } + + /** + * Singleton empty node list for character data nodes. + */ + static final NodeList CHILD_NODES = new EmptyNodeList(); + private String text; // package private @@ -280,6 +306,15 @@ } /** + * Returns an empty node list. + * Character data nodes do not have children. + */ + public NodeList getChildNodes() + { + return CHILD_NODES; + } + + /** * The base URI for character data is null. * @since DOM Level 3 Core */ Index: gnu/xml/stream/SAXParser.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/stream/SAXParser.java,v retrieving revision 1.15 diff -u -r1.15 SAXParser.java --- gnu/xml/stream/SAXParser.java 14 Jan 2006 10:00:36 -0000 1.15 +++ gnu/xml/stream/SAXParser.java 23 Jan 2006 09:11:39 -0000 @@ -660,7 +660,10 @@ errorHandler.fatalError(e2); if (contentHandler != null) contentHandler.endDocument(); - throw e2; + if (e instanceof IOException) + throw (IOException) e; + else + throw e2; } finally {