The other user was talking about a crash, not about an error message. I did not say that setting the system ID would result in a successful transformation.
If you've duplicated the code from the use case in your program, and it still does not work, please verify the following: 1. You've patched Microsoft's library as we suggest, or you've rebuilt the binaries yourselves. The patches are explained on the very first page of the documentation. 2. You're using the same service pack as we're using, which is SP 3. Microsoft does not guarantee compatibility between service packs, and my experience has been that there can be problems. 3. You're using the correct run-time libraries in your application (multithreaded DLL, or debug multithreaded DLL) If you continue to have problems, post a bug in Bugzilla, and, if I can reproduce it, I will fix it promptly. You'll need to include the source code to reproduce the problem and a sample set of inputs. Also, please include the stack trace from the debugger for the virtual function call. If you want to wrap a pre-parsed XalanSourceTreeDocument instance for input to XalanTransformer, you'll need to get the latest code from CVS and rebuild the binaries yourself. There is a new class which will do exactly what XercesDOMWrapperParsedSource, only for an instance of XalanSourceTreeDocument. I would suggest you get yourselves set up for CVS access so you can always build the latest code, as that's how you'll get any bug fixes. Dave iavor_trifonov@n mss.com To: [EMAIL PROTECTED] cc: (bcc: David N Bertoni/Cambridge/IBM) 05/22/2002 08:09 Subject: Re: Difference between a XalanDOM and a XalanSourceTree? AM Please respond to xalan-dev Hi Dave, I tried setting the SystemId but that didn't help - I still get the same error message: Fatal Error at (file , line 0, column 0): An exception occured! Type:RuntimeExce ption, Message:The primary document entity could not be opened. Id=library.xml XalanError: An exception occured! Type:RuntimeException, Message:The primary document entity could not be opened. Id=library.xmlPress any key to continue The only difference is the ** Id = library.xml **, which was just ** Id = 0 **, when I was doing the same thing without setting the SystemId. When I apply the ussage pattern that you are pointing to in your email, the program crashes again but it gets to the point where it outputs the transformaiton and after that Visual C announces a debug error stating that a pure virtual function has been called.. You talk about "the latest code" which is capable of feeding a XalanSourceTree into the transformer. Are you refering to Xalan 1.3, or something that is not released yet? Is there a way that I get this code? If not, please confirm that the impossibility to feed a memory representation of an xml file - would it be a wrapped Xerces DOM, or a XalanSourceTree - is a known bug and there is no way for this to be accomplished. We need to prove this to ourselves, so that we can start pursuing other options. It is all about having multiple xml files, which need to be fed to the transformer as a whole - we were trying to accomplish this by parsing each file separately and then using the Xerces/Xalan Node classes' tree manipulation functionallity to merge them all into a single DOM tree, and feed it to the transformer. Yet, we got stuck while trying to feed just a single XSLTInputSource, which is instantiated with a Node. Your help and patience are greatly appreciated, Sincerely, Iavor Trifonov NMS Communications "David N Bertoni/Cambridge/IBM" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: 05/21/2002 02:42 PM Subject: Re: Please respond to xalan-dev Difference between a XalanDOM and a XalanSourceTree? > OK then, what is the difference between a XalanSourceTree and a > XalanDefaultParsedSource? Again, a quick examination of the code should explain this. XalanDefaultParsedSource wraps a XalanSourceTree instance and a few other things needed to do a transformation using an instance of XalanTransformer. > I am looking for a way to feed a DOM (Xerces or Xalan) into the transformer > somehow. The recommended wrapping of the XercesDOM (and the XalanDOM for > that matter) crashes the transformer, always! A parsed source transform > works fine. So what is that difference? Wrapping the Xerces DOM as I described in my previous reply to you, and is described in the use-case crashes? That's indeed a bug, but it certainly worked when we did the release. Please verify you did the following: http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource You can now, with the latest source code, wrap a previous built XalanSourceTree instance for input to a XalanTransformer instance. Did you try setting the system ID on the XSLTInputSource as I suggested? That won't fix the problem that you cannot transform from a XalanNode using an instance of XalanTransformer, but it should cure the crash. > We believe the wrapped DOM's, into XalanDocuments, are failing because the > XalanDocuments really do not honor all the methods of the base XalanNode > class. I'm not sure what you mean by "honor", but this is absolutely not true. The crash is a result of a bug which has been fixed. The failure is because XalanTransformer was not designed to take a raw DOM as input. Dave AnneMarie_O'Brie [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: David N Bertoni/Cambridge/IBM) 05/21/2002 11:07 Subject: Re: Difference between a XalanDOM and a XalanSourceTree? AM Please respond to xalan-dev OK then, what is the difference between a XalanSourceTree and a XalanDefaultParsedSource? I am looking for a way to feed a DOM (Xerces or Xalan) into the transformer somehow. The recommended wrapping of the XercesDOM (and the XalanDOM for that matter) crashes the transformer, always! A parsed source transform works fine. So what is that difference? We believe the wrapped DOM's, into XalanDocuments, are failing because the XalanDocuments really do not honor all the methods of the base XalanNode class. And also, David you've been a great help, thanks for you patience. - amo Anne Marie O'Brien NMS Communications (508) 271-1104 "David N Bertoni/Cambridge To: [EMAIL PROTECTED] /IBM" cc: <david_n_bertoni@ Subject: Re: Difference between a XalanDOM and a XalanSourceTree? us.ibm.com> 05/21/2002 12:33 PM Please respond to xalan-dev This should be fairly obvious from the source code. The XalanDOM classes are the abstract base classes for Xalan's source tree. XalanSourceTree is an implementation of those abstract base classes. Dave AnneMarie_O'Brie [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: David N Bertoni/Cambridge/IBM) 05/21/2002 09:23 Subject: Difference between a XalanDOM and a XalanSourceTree? AM Please respond to xalan-dev What exactly is the difference? Please help! Thanks - amo Anne Marie O'Brien NMS Communications (508) 271-1104