You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Judi Thomson <ju...@gte.net> on 2001/04/27 06:52:19 UTC
help with xalan and msvc++
I'll try to keep this organized and readable. I apologize because it is
a little bit long.
I have a C++ application for windows (written with visual studio) that
uses DOM objects. I've been using xerces to manage these objects and
its been working well.
One task I need to be able to do is to apply an XPath statment to the
DOM object and get back the result set. These aren't complex
statements, just paths to specific child-nodes most of the time. Since I
was already using xerces, xalan seemed the natural choice. I've used
Saxon before for similar xpath processing and didn't expect this would
be much different.
I used the XPathWrapper example as my guide because it seemed to do
pretty much what I needed- I already had the DOM object, but the rest
was more or less the same and I've cut/pasted most of my xalan code from
that example.
And, the code is doing exactly what I want- I can print out interim
results and look at variables in the debugger and everything is right.
The problem is that I can't return from any method that uses any Xalan
code. I get access violation exceptions at the end of those methods.
I can track it down to the declarations of the various components needed
to make XPath go. For instance if I make a method with nothing but the
following statments, I'll get the exception. I don't even have to
execute anything. (in fact I get it even if I leave out the liaison
stuff.)
XalanSourceTreeDOMSupport theDOMSupport;
XalanSourceTreeParserLiaison theLiaison(theDOMSupport);
theDOMSupport.setParserLiaison(&theLiaison);
XPathEnvSupportDefault theEnvSupport;
XObjectFactoryDefault theXObjectFactory;
XPathExecutionContextDefault theExecutionContext(theEnvSupport,
theDOMSupport, theXObjectFactory);
XPathFactoryDefault theXPathFactory;
XPathProcessorImpl theXPathProcessor;
I'm using visual studio 6 on two different machines. One is win2K with
service pack 5 on visual studio... one machine is win98 with no service
packs... behaviour is the same on both.
help? suggestions?
Thanks!
Judi Thomson
(please reply to me, I'm not subscribed to the list)
jrt