c++xmllinuxxalanxerces-c

Multiple versions of xalan and xerces


Background

We have dependencies to several Xalan and Xerces versions in our rather large C++ system. This has accumulated over the years, and is not optimal for several reasons.

Now we're migrating from Solaris to Linux, and we think it makes sense to consolidate third party dependencies to a minimum.

We've determined that we still need Xerces 2.8 and Xerces 3.x. And Xalan 1.x

Target platform is RHEL6.

Problem

From RHEL repo we can get Xerces 3.0 and Xalan 1.10 (build against Xerces 3.0)

We've installed Xerces 2.8, under /usr/local...

We can't figure out how Xalan is supposed to work with Xerces (link wise). That is:

We can't be the only one with this problem, or are we just idiots? (which would be the best scenario... :))


Solution

  • From what I've just read at xerces.apache.org , Xerces 2.X and Xerces 3.x have different API's and therefore you'll need to link with one OR the other.

    And as you can see from xalan.apache.org:

    "The Xalan-C/C++ 1.11 library requires the Xerces-C/C++ XML Parser 3.0 or newer, version 3.1.1 is preferred.", while Xalan 1.10 requires Xerces 2.7.0 (will probably work with 2.8.0).

    So yes, you will need two different versions of Xalan libraries, unless you can resolve your dependencies to Xalan 1.11.0 only, in which case you can have only one installed Xalan and one Xerces.