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/09/07 23:16:51 UTC

Transcoding API and SAX

How are you supposed to feed a SAX2 event stream into the Batik Transcoding 
API?


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Transcoding API and SAX

Posted by Mikael St�ldal <mi...@home.se>.
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


Re: Transcoding API and SAX

Posted by Thierry Kormann <tk...@ilog.fr>.
On Friday 07 September 2001 23:16, Mikael Ståldal wrote:
> How are you supposed to feed a SAX2 event stream into the Batik Transcoding
> API?


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?

Thierry.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org