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]>

05/21/2002 02:42 PM
Please respond to xalan-dev

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Re: 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



















Reply via email to