You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Bhakti Mehta <Bh...@eng.sun.com> on 2000/11/15 23:24:01 UTC
Problem with setInputSource of SAXSource
Hi Scott,
I am a member of the SQE team at Sun and I wish to bring this to your attention.
I am trying to use a no argument constructor of SAXSource and then use the
setInputSource method of SAXSource and then use transform method of the
Transformer.
It throws the following exception
javax.xml.transform.TransformerException: Can't transform a Source of type
javax.xml.transform.sax.SAXSource! at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java,
Compiled Code)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java,
Compiled Code)
at SaxSource01.checkInputSource(SaxSource01.java, Compiled Code)
at SaxSource01.main(SaxSource01.java, Compiled Code)
However if use the SAXSource(InputSource inputSource) constructor the program
works.
I am attaching the Java program and the xml and xsl files for your reference.
Regards,
Bhakti