This package should have a proper 'factory' pattern.
The current problem is that it is impossible to have a reliable mechanism for setting the 'backing' XPath factory. If one area of code were to ever need a 'custom' XPath 'engine' then they could set the engine with the XPath.setXPathClass(), but this would impact all areas of the program, not just the part that needed the change.
Further, these other areas would be unable to check what factory they have, and, worse again, if issue #41 is fixed, that other area of code can be set to use the JaxenXPath factory again, but that will 'break' the original area that wanted the custom factory anyway.
A proper factory pattern needs to be used.
Fixed with commit 30f5871 and commit 529665a
See the feature page https://github.com/hunterhacker/jdom/wiki/JDOM2-Feature:-XPath-Upgrade