There is no need to create an input stream when the source tree is already parsed. You are most likely running into a bug that attempts to de-reference a null system ID when there's an error. Try setting the system ID on the input source to see if that prevents the crash.
At any rate, this is not the way to use XalanTransformer. You should simply ask it to parse your source tree for you, or use one of the wrappers. See this usage pattern, if you really need to parse the document yourself: http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource Dave AnneMarie_O'Brie [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: David N Bertoni/Cambridge/IBM) 05/20/2002 07:37 Subject: XSLTInputSource incomplete? AM Please respond to xalan-dev Hi, I am trying to use Xalan C++ v1.3, with Xerces 1.6.0 delivered with it. I am trying to feed a Node to a XalanTransformer transformation and the program crashes. I am using either the XercesParserLiaison or the XalanSourceTreeParserLiaison to parse an xml document into a XalanDocument, and then I instantiate a XSLTInputSource with the XalanDocument, using the constructor that takes a XalanNode. The instantiation works fine, but when I pass this XSLTInputSource to the transformer together with the transformation the funciton crashes. I believe I found the reason why - the makeStream() function of the XSLTInputSource class does not provide a BinInputStream when the class is instantiated with a XalanNode - it passes a null pointer and the parser that gets called deep within the XalanTransformer is unable to read the source. In other words the XSLTInputSource is capable of only working with URIs and streams. I am trying to find out whether I am right, and if yes whether there is a work-around. Is there a more recent version of the XSLTInputSource class that has that fixed? This functionality is supposed to be available according to the usage patterns in the documentation for Xalan - "Working with DOM input and output". any feedback on that would be greatly appreciated, Sincerely, Iavor Trifonov
