Hi Sami,

> Hello,
> Am I correct in thinking that in the XPathCAPI.cpp file the code snippet:
> XMLPlatformUtils::Initialize(); initializes XercesC++?

Yes

> if one uses the XPathCAPI.cpp and Xerces won't they have problem
> because of the initializing taking place twice?

If you call XalanCAPI XalanXPathAPIInitialize right after you call
PlatformUtils::Initialize(), you will not experience any problems.

> I initialize Xerces using XMLPlatformUtils::Initialize(). But now if I
want
> to use the XalanXPathAPIInitialize( ) then I am in theory initializing
> XMLPlatformUtils twice whereas it is only allowed to be initialize once.

You can call PlatformUtils::Initialize() more than once, you just cannot
call it more than once from multiple threads of execution.

Xalan's XPath C API is incomplete, and is intended for use in C programs.
Since you're already using Xerces-C, which implies your program is written
in C++, it's not clear to me why you're using a C API.  At any rate, since
there is no C API for initializing Xerces-C, XalanXPathAPIInitialize( )
must do it.

By the way, please don't cross-post to both lists.  The C users list is the
appropriate list for these questions.

Dave

Reply via email to