Hi Dave, Thinking about this before going to sleep last night, the problem is that in order to uncouple the loading/parsing of the XML file from the XPath queries, certain objects have to be declared as member data. But those objects (XalanSourceTreeInit and XalanSourceTreeParserLiaiaon) do things in their default constructors that, I'm assuming here, require the Platform::initialize() methods to have already been called.
What I'm considering is using a static member function Profile::getInstance() to call the ::initialize() methods, new an instance of the Profile, and return a reference/pointer to the caller. What do you think? Thanks in advance, -will -----Original Message----- From: Will Sappington Sent: Wednesday, February 14, 2007 1:27 AM To: 'xalan-c-users@xml.apache.org' Subject: RE: Problem evaluating XPath expressions Hi Dave, I think I may have hit a dead end with this. When I define XalanSourceTreeParserLiaison _parserLiaison; as member data, the program crashes with an assertion during construction of the Profile class. The first line of the constructor doesn't even execute so the assertion is occurring in the construction of the member classes. I stepped into it and found that it occurs during construction of the parserLiaison when it calls XalanMemMgrs::getDefaultXercesMemMgr() which is what XALAN_DEFAULT_MEMMGR is #defined as. After that call there is an assert (ptr != 0) and that is where the crash occurs. I'm assuming this is because neither of the ::initialize() methods have been called. Of course there's no opportunity to do so prior to member data construction so it would appear I'm screwed. Is there a way to instantiate a memory manager such that the getDefaultXercesMemMgr() call would be able to find it? -will -----Original Message----- From: David Bertoni [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 3:01 PM To: xalan-c-users@xml.apache.org Subject: Re: Problem evaluating XPath expressions Member variables are defined in the class definition, but not initialized there. Initialization occurs in the constructor, in the member initialization list. The reason the constructor that accepts the DOMSupport instance is deprecated is because the XalanSourceTreeParserLiaison instance no longer needs the DOMSupport instance. You can simply use the constructor that takes a MemoryManager instance, and use the default. Dave