DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22880>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22880

Pipe does not work with DOMSource anymore => RuntimeException

           Summary: Pipe does not work with DOMSource anymore =>
                    RuntimeException
           Product: XalanJ2
           Version: 2.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: org.apache.xalan.transformer
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I transform a XML document processing several stylesheets in sequence similar 
to the Pipe example shipped with Xalan.

The only difference is that my input document is a DOMSource already. So I 
used a copy-transformer to feed the first ContentHandler instead of a 
XMLReader:

        Transformer firstTransformer = tFactory.newTransformer();
        firstTransformer.transform(domSource, new SAXResult(tHandler1));

But unfortunately this leads to the following 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.xalan.transformer.TransformerIdentityImpl.endDocument
(TransformerIdentityImpl.java:932)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform
(TransformerIdentityImpl.java:349)
        at MyPipe.main(MyPipe.java:131)

In earlier versions of Xalan (2.4.D1) this code worked!

Can somebody fix this bug or are there other methods to use a pipe with a 
DOMSource as input?

I will attach my modified pipe class (MyPipe.java).

Thanks for any help!

Regards,
Urban

Reply via email to