Will Sappington wrote:
Hi Dave, (sorry for the top-posting but OutHouse doesn't maintain the
threading on emails very well so bottom-posting doesn't work very well.)

I just got back to this and I'm having trouble implementing it.  I moved
the XalanSourceTreeInit and XalanSourceTreeParserLiaison instances to
the private member data of the class and put the appropriate includes
and "XALAN_USING_XALAN" statements at the top.  These are the 4
instances of Xalan member data:

XalanDocument* _pXmlDoc;        ///< ptr to the Xalan DOM document
XalanSourceTreeDOMSupport   _DomSupport;

// Initialize the XalanSourceTree subsystem...
XalanSourceTreeInit     theSourceTreeInit;
XalanSourceTreeParserLiaison    theLiaison(_DomSupport);

  The compiler gives an error on the XalanSourceTreeParserLiaison
declaration, specifically on the symbol _DomSupport.  I'm not sure why
this construction works inside as local function data and not as member
data, but regardless, I looked up the XalanSourceTreeParserLiaison API
for a different constructor and saw that this form has been deprecated.
It now suggests the form that takes only a memory manager reference
(defaulted to XALAN_DEFAULT_MEMMGR).  I looked for a corresponding
setter to set the DOMSupport instance but couldn't find one.  What am I
missing here?  Thanks in advance for any help.

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

Reply via email to