I have to use Xalan with applications and dlls built with STLPort 4.5.3 (stlport.org). Is it possible?
Fast look throu headers gives nothing. I did't find any compilation options ( read - defines ), something like XALAN_USE_STLPORT.
Yes, you can do this and it's easy. I have built previous versions with stlport 4.5.3, and I am currently running xalan 1.7 with stlport 4.6.1. I haven't converted to xalan 1.8 yet, but I don't think you will have any problems.
No source code changes are necessary, nor do you need to define anything. On Windows, just change the all-in-one project settings: On the C++ tab, preprocessor options, add the stlport include directory (stlport_ver#/stlport) to the include paths, and on the Link tab, add the location of the stlport dll to the library path settings. Rebuild everything.
You may want to make your debug builds link to the debug version of stlport (which includes such things as array bounds checking). To do this you add a #define to the project settings for debug builds only. I forget the exact symbol to define (and I'm not where I can check right now), but it's described in the stlport docs.
Oh yes, make sure you build stlport, xalan, xerces, and your application all with the same threading model. I think the default for all of them is multi-threaded dll, so as long as that's what your app is using you should be OK.
On other platforms, you should just be able to change either environment variables or the make files to use the proper include and lib paths.
Xalan performance with stlport is better than with the MS STL implementation. On my test cases, it was about a 10% improvement, though this was back on xalan 1.4, so this may no longer apply. I think this is mostly due to the stlport allocator; anyway, this will not apply if you specify the new/delete or alloc-based allocators (which will be *much* slower).
Don
