You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Frank Taffelt <fr...@interface-business.de> on 2000/07/24 18:18:18 UTC
Problem with output to DOM
Hi,
i try to output my transformation to an Document Object :
<snip>
XSLTProcessor processor = XSLTProcessorFactory.getProcessor(new
XercesLiaison());
XSLTInputSource xmlID = new XSLTInputSource("index.xml");
XSLTInputSource xslID = new XSLTInputSource("fromschema2.xsl");
Document out = new org.apache.xerces.dom.DocumentImpl();
XSLTResultTarget resultTarget = new XSLTResultTarget(out);
// XSLTResultTarget resultTarget = new XSLTResultTarget(System.out);
processor.process(xmlID,xslID,resultTarget);
<snip>
but when i start the processor i get the following error :
org.apache.xalan.xslt.XSLProcessorException: Can't have more than one root
on a DOM!
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1594)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java,
Com
piled Code)
at TestXSL.<init>(TestXSL.java:47)
at TestXSL.main(TestXSL.java:65)
when XSLTResultTarget points to System.out everything is fine
where is the problem ?
thanks
frank