xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal <mikael.stal...@home.se>
Subject Re: Transcoding API and SAX
Date Tue, 02 Oct 2001 18:58:53 GMT
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


Mime
View raw message