> I have successfully built both:
>
> Xerces-c-src_2_6_0.tar.gz and xml-xalan_20050308053011.tar.gz on
> the AIX platform using the xlc/xlC compilers respectively.
>
> However I have been experiencing strange results when trying to
> use the XalanDOMString component, whenever the constructor is
> called it causes the program to instantly terminate.
It's not necessary to create two bug reports and also post to the list.
One bug report, or one posting is sufficient.
When someone has time, we will investigate your issue.
> XALAN_USING_XERCES(XMLPlatformUtils)
> XALAN_USING_XALAN(XalanTransformer)
>
> // Initialise the various components.
> XMLPlatformUtils::Initialize();
> XalanTransformer::initialize();
>
> // Generate an instance of a XalanDOMString...
> std::string path("/HOME/PTHOMAS/");
> XalanDOMString test = XalanDOMString(path.c_str());
>
> // Terminate the various components.
> XalanTransformer::terminate();
> XMLPlatformUtils::Terminate();
> XalanTransformer::ICUCleanUp();
This the classic case of having a Xerces-C or Xalan-C object in-scope when
you terminate the library. The destructor for the variable "test" is
executed when leaving the try block, but you have already terminated the
library. Try the following:
XALAN_USING_XERCES(XMLPlatformUtils)
XALAN_USING_XALAN(XalanTransformer)
// Initialise the various components.
XMLPlatformUtils::Initialize();
XalanTransformer::initialize();
{
// Generate an instance of a XalanDOMString...
std::string path("/HOME/PTHOMAS/");
XalanDOMString test = XalanDOMString(path.c_str());
}
// Terminate the various components.
XalanTransformer::terminate();
XMLPlatformUtils::Terminate();
XalanTransformer::ICUCleanUp();
If this works, please close the bugs you opened as invalid.
Dave