[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-c-users
Subject:    Re: Using Xerces2_1_0 vs. Xerces 1_7_xxx
From:       David N Bertoni/Cambridge/IBM <david_n_bertoni () us ! ibm ! com>
Date:       2002-12-16 23:04:15
[Download RAW message or body]





You don't need to parse the source again, as it's already been parsed.

Take a look at the usage patterns:

   http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource

If you have the latest source code, this should work with the new Xerces
DOM.

Dave



                                                                       
                      Markus Strauß                                  
                      <markus.strauss@         To:      <xalan-c-users@xml.apache.org>
                      klt-ag.de>               cc:      (bcc: David N Bertoni/Cambridge/IBM)
                                               Subject: Using Xerces2_1_0 vs. Xerces 1_7_xxx
                      12/16/2002 05:15                                 
                      AM                                               
                                                                       




Hi,

i want to do the following:

I get an DOM-Object, created by an external routine.(in fact, i used the
CreateDOMDocument routine from xerces)

then pass it to my routine:

int magic(DOMDocument* doc)
{
    XalanTransformer::initialize();

    XercesDOMSupport theDOMSupport;
    XercesParserLiaison theParserLiaison(theDOMSupport);
    XalanDocument* theDoc = theParserLiaison.createDocument(doc);

    XSLTInputSource  inputSource(theDoc);
    XalanTransformer theXalanTransformer;
    XalanParsedSource* parsedXML = 0;
    theXalanTransformer.parseSource(inputSource, parsedXML);
    assert(parsedXML!=0);
    ...... //cleanups..

}
when trying to use the XalanTransformer ::ParseSource routine, Xalan
would eventually crash telling me it was unable to open the primary
document (ID=null)
Where did I get wrong? I rebuilt Xalan to work with DOMDocument.
Everything seems okay, yet...
Unfortunaltely it is not possible to switch to Xerces 1.7 as our company
uses already Xerxes 2.1 in all other places.
Has anybody any ideas?



Mit freundlichen Grüßen / With best regards

Markus Strauß

Softwareentwickler
KRUSCHE LAGERTECHNIK AG
Am Kleinfeld 11
85456 Wartenberg
Tel.: 08762/7259 22
Fax.: 08762/7259 99
markus.strauss@klt-ag.de
www.klt-ag.de



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic