You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Stanley Santiago <st...@netscape.com> on 2000/06/17 00:57:44 UTC
DOM Document input to XSLTInputSource
Hi,
Can Xalan handle DOM Document input created by parsers other that Xerces
??
I am trying to interface my app to another program than builds a
Document instance which implements
org.w3c.dom.Document. I am not sure which xml parser this program uses
but the docs say that DOM document
is DOM Level 1(Core) conformant.
Here is a snippet of my code:
......
XSLTProcessor processor =
XSLTProcessorFactory.getProcessor(new
org.apache.xalan.xpath.xdom.XercesLiaison());
Document adoc =
OtherProgram.getDocument("/acme/foo.bar");
XSLTInputSource xmlsrc = new XSLTInputSource(adoc);
StringWriter transformed = new StringWriter();
XSLTResultTarget xtgt = new XSLTResultTarget(transformed);
XSLTInputSource xslsrc = new XSLTInputSource("abc.xsl");
processor.process(xmlsrc, xslsrc, xtgt);
......
This results in this Exception being thrown :
org.apache.xalan.xslt.XSLProcessorException: XercesLiaison can not
handle nodes of type class com.iplanet.dom.Document
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1594)
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:655)
Am I missing something here ?
Thanks,
Stan