You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by tk...@apache.org on 2001/01/29 16:34:45 UTC
cvs commit: xml-batik/sources/org/apache/batik/transcoder XMLAbstractTranscoder.java
tkormann 01/01/29 07:34:45
Modified: sources/org/apache/batik/dom/svg SAXSVGDocumentFactory.java
sources/org/apache/batik/transcoder
XMLAbstractTranscoder.java
Log:
bug fix that let users create a a DOM tree from a StringReader for example (without any URI).
Revision Changes Path
1.5 +10 -4 xml-batik/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java
Index: SAXSVGDocumentFactory.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SAXSVGDocumentFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SAXSVGDocumentFactory.java 2001/01/16 10:45:47 1.4
+++ SAXSVGDocumentFactory.java 2001/01/29 15:34:39 1.5
@@ -32,7 +32,7 @@
* from an URI using SAX2.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SAXSVGDocumentFactory.java,v 1.4 2001/01/16 10:45:47 tkormann Exp $
+ * @version $Id: SAXSVGDocumentFactory.java,v 1.5 2001/01/29 15:34:39 tkormann Exp $
*/
public class SAXSVGDocumentFactory
extends SAXDocumentFactory
@@ -69,7 +69,9 @@
try {
doc = (SVGOMDocument)super.createDocument
(SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is);
- doc.setURLObject(new URL(uri));
+ if (uri != null) {
+ doc.setURLObject(new URL(uri));
+ }
} catch (MalformedURLException e) {
throw new IOException(e.getMessage());
}
@@ -90,7 +92,9 @@
try {
doc = (SVGOMDocument)super.createDocument
(SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is);
- doc.setURLObject(new URL(uri));
+ if (uri != null) {
+ doc.setURLObject(new URL(uri));
+ }
} catch (MalformedURLException e) {
throw new IOException(e.getMessage());
}
@@ -111,7 +115,9 @@
try {
doc = (SVGOMDocument)super.createDocument
(SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", uri, is);
- doc.setURLObject(new URL(uri));
+ if (uri != null) {
+ doc.setURLObject(new URL(uri));
+ }
} catch (MalformedURLException e) {
throw new IOException(e.getMessage());
}
1.4 +2 -1 xml-batik/sources/org/apache/batik/transcoder/XMLAbstractTranscoder.java
Index: XMLAbstractTranscoder.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/transcoder/XMLAbstractTranscoder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLAbstractTranscoder.java 2001/01/17 13:35:21 1.3
+++ XMLAbstractTranscoder.java 2001/01/29 15:34:43 1.4
@@ -37,7 +37,7 @@
* </ul>
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: XMLAbstractTranscoder.java,v 1.3 2001/01/17 13:35:21 tkormann Exp $
+ * @version $Id: XMLAbstractTranscoder.java,v 1.4 2001/01/29 15:34:43 tkormann Exp $
*/
public abstract class XMLAbstractTranscoder extends AbstractTranscoder {
@@ -113,6 +113,7 @@
} catch (DOMException ex) {
handler.fatalError(new TranscoderException(ex));
} catch (IOException ex) {
+ ex.printStackTrace();
handler.fatalError(new TranscoderException(ex));
}
}