On Fri, 2004-05-07 at 15:48, Lionel Crine wrote: > Hi again, > > I have some trouble in my pipeline and don't really what's going on. > > In a transformer (SAX), i get DOM from an XML base and then I parse it in > the endElement method. > > > I tried two ways : > > 1/ > DOMStreamer s = new DOMStreamer(this.contentHandler, this.lexicalHandler); > s.stream(DOMResult); > > 2/ > String strResult = XMLUtils.serializeNode(DOMResult, > UtilsFunction.getInstance().setProperties(true)); --> UtilsFunction > redefine the property object. > > InputSource inputSource = new InputSource(new > ByteArrayInputStream(strResult.getBytes(UtilsParam.getInstance().UTF8))); > SAXParser parser = (SAXParser) this.manager.lookup(SAXParser.ROLE); > parser.parse(inputSource, new IncludeXMLConsumer(super.xmlConsumer)); > > > 1/ With the first method --> When I tried to put an "xslt" transformer > after this one, I get an error : > > Original Exception: java.lang.RuntimeException: java.lang.RuntimeException > at > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364) > at > org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427) > at > org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91) > at > org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:583) > > > 2/ With the second method --> All is Fine. > > What's the difference between this two methods ?
The serialization in between. The problem is either that the DOM-tree is invalid or a bug in the DOMStreamer. The first option is more likely. To find out what could be wrong, insert a LogTransformer in the pipeline and examine its output. If you can't find anything wrong in it, let us have a look at it. PS: we've got a user mailing list for this sort of questions. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED]