Index: gnu/xml/dom/DomDocumentBuilder.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomDocumentBuilder.java,v retrieving revision 1.5 diff -u -r1.5 DomDocumentBuilder.java --- gnu/xml/dom/DomDocumentBuilder.java 22 Jan 2006 15:20:03 -0000 1.5 +++ gnu/xml/dom/DomDocumentBuilder.java 26 Jan 2007 19:51:10 -0000 @@ -1,5 +1,5 @@ /* DomDocumentBuilder.java -- - Copyright (C) 2004,2006 Free Software Foundation, Inc. + Copyright (C) 2004,2006,2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,7 @@ import org.w3c.dom.DOMConfiguration; import org.w3c.dom.DOMImplementation; import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSException; import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSParser; import org.xml.sax.EntityResolver; @@ -122,7 +123,18 @@ { LSInput input = ls.createLSInput(); input.setByteStream(in); - return parser.parse(input); + try + { + return parser.parse(input); + } + catch (LSException e) + { + Throwable e2 = e.getCause(); + if (e2 instanceof IOException) + throw (IOException) e2; + else + throw e; + } } public Document parse(InputStream in, String systemId) @@ -131,13 +143,35 @@ LSInput input = ls.createLSInput(); input.setByteStream(in); input.setSystemId(systemId); - return parser.parse(input); + try + { + return parser.parse(input); + } + catch (LSException e) + { + Throwable e2 = e.getCause(); + if (e2 instanceof IOException) + throw (IOException) e2; + else + throw e; + } } public Document parse(String systemId) throws SAXException, IOException { - return parser.parseURI(systemId); + try + { + return parser.parseURI(systemId); + } + catch (LSException e) + { + Throwable e2 = e.getCause(); + if (e2 instanceof IOException) + throw (IOException) e2; + else + throw e; + } } public Document parse(InputSource is) @@ -176,7 +210,18 @@ input.setPublicId(is.getPublicId()); input.setSystemId(systemId); input.setEncoding(is.getEncoding()); - return parser.parse(input); + try + { + return parser.parse(input); + } + catch (LSException e) + { + Throwable e2 = e.getCause(); + if (e2 instanceof IOException) + throw (IOException) e2; + else + throw e; + } } } Index: gnu/xml/dom/ls/DomLSParser.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/ls/DomLSParser.java,v retrieving revision 1.4 diff -u -r1.4 DomLSParser.java --- gnu/xml/dom/ls/DomLSParser.java 24 Dec 2005 14:14:48 -0000 1.4 +++ gnu/xml/dom/ls/DomLSParser.java 26 Jan 2007 19:51:10 -0000 @@ -1,5 +1,5 @@ /* DomLSParser.java -- - Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1999,2000,2001,2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -277,6 +277,15 @@ validating); try { + reader.setFeature("http://gnu.org/sax/features/coalescing", + coalescing); + } + catch (SAXNotRecognizedException e) + { + // ignore + } + try + { reader.setFeature("http://xml.org/sax/features/use-attributes2", true); } Index: gnu/xml/stream/SAXParser.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/stream/SAXParser.java,v retrieving revision 1.23 diff -u -r1.23 SAXParser.java --- gnu/xml/stream/SAXParser.java 6 Dec 2006 12:02:10 -0000 1.23 +++ gnu/xml/stream/SAXParser.java 26 Jan 2007 19:51:10 -0000 @@ -1,5 +1,5 @@ /* SAXParser.java -- - Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -187,6 +187,8 @@ lexicalHandler = (LexicalHandler) value; else if ((GNU_FEATURES + "xml-base").equals(name)) baseAware = Boolean.TRUE.equals(value); + else if ((GNU_FEATURES + "coalescing").equals(name)) + coalescing = Boolean.TRUE.equals(value); else throw new SAXNotSupportedException(name); }