You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Mikael St�ldal <mi...@home.se> on 2001/10/02 20:58:53 UTC
Re: Transcoding API and SAX
At 18:28 2001-09-17 +0200, Thierry Kormann wrote:
>The TranscoderInput can take a XMLReader in parameter. I am not sure I have
>implemented that in the ImageTranscoder. Could you let me know if it works?
It doesn't work, and this fragment from
org.apache.batik.transcoder.XMLAbstractTranscoder#transcode() shows why:
// parse the XML document
DocumentFactory f = createDocumentFactory(domImpl,
parserClassname);
try {
if (input.getInputStream() != null) {
document = f.createDocument(namespaceURI,
documentElement,
input.getURI(),
input.getInputStream());
} else if (input.getReader() != null) {
document = f.createDocument(namespaceURI,
documentElement,
input.getURI(),
input.getReader());
} else if (uri != null) {
document = f.createDocument(namespaceURI,
documentElement,
uri);
}
/* ### Here we miss one caluse for xmlReader ### */
} catch (DOMException ex) {
handler.fatalError(new TranscoderException(ex));
} catch (IOException ex) {
ex.printStackTrace();
handler.fatalError(new TranscoderException(ex));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org