You're correct.  The transformer cannot support a pre-built DOM for
transformation.  We're looking at ways to work around that, but it probably
won't happen for the next release.

Dave



                                                                                       
                           
                    Ciprian                                                            
                           
                    Ungureanu            To:     xalan <[EMAIL PROTECTED]>      
                           
                    <cungurea@dyn        cc:     (bcc: David N Bertoni/CAM/Lotus)      
                           
                    asty.com>            Subject:     XalanTransformer problem         
                           
                                                                                       
                           
                    06/28/2001                                                         
                           
                    03:41 AM                                                           
                           
                    Please                                                             
                           
                    respond to                                                         
                           
                    xalan-dev                                                          
                           
                                                                                       
                           
                                                                                       
                           



I have a problem using XalanTransformer. I'm using Xerces1.4 and
Xalan1.1
I want to use the method transform:
int transform( const XSLTInputSource& xmlInput,
           const XSLTInputSource& xslStylesheet,
           const XSLTResultTarget& transformResult);

So I parse the XML file into a DOM tree, than I have followed the
documentation to wrap the DOM_Document in a XalanDocument and then to
create an XSLTInputSource objects. I made the same thing for the XSL
file and it's working only with simple XSL files. Let's say if I'm using
something like this <xsl:for-each select="//person"> in the XSL file the
transformer is crashing.
I don't know what is wrong. I suspect that wrapping the DOM_Document in
a XalanDocument is not Ok for transformer.
The code for this is:

DOMParser theXMLParser;
theXMLParser.parse(theXMLFileName);
const DOM_Document theXMLDom = theXMLParser.getDocument();

XercesDOMSupport theDOMSupport;
XercesParserLiaison theParserLiaison(theDOMSupport);
XalanDocument* theXMLDoc = theParserLiaison.createDocument(theXMLDom);
//The XML input source
XSLTInputSource  theXMLInputSource(theXMLDoc);

Is this correct?

Thanks,
Cip





Reply via email to