[jdom-interest] 2.0.0 usage

Michael Kay mike at saxonica.com
Fri Apr 13 08:04:54 PDT 2012

On 13/04/2012 11:52, Rolf Lear wrote:
> Hi Michael
> I understand the concerns you had with the API stability.
> Out of interest though, when I was working with Jaxen, it became 
> apparent that the 'model' of putting JDOM support directly in to Jaxen 
> is 'broken', it should be (and now is) the other way around. JDOM 2.x 
> now 'owns' the interface to Jaxen, it 'Owns' the implementation of the 
> Jaxen 'Navigator'.
> This solves a number of problems, not the least of which is that the 
> compile-time dependencies are circular otherwise...
> Is there not some way you can help build the 'glue' logic in to JDOM 
> rather than in to Saxon? I started trying to do that a few months ago, 
> but got my head all messed up in the API, and NodeInfo classes, etc.
Basically there needs to be an adapter module that bridges the Saxon 
NodeInfo interface to the JDOM Node implementation. There are a number 
of such modules issued with Saxon, but they use a plug-in architecture - 
Saxon has no intrinsic knowledge of these modules, and anyone can write 
a new one. The module itself needs to know about both Saxon and JDOM 
interfaces, but neither Saxon nor JDOM needs to have static knowledge of 
the module. So there are no circular dependencies. Which product the 
module is then distributed with becomes a purely tactical matter, with 
obvious implications in terms of who gets the bug reports, and so on. 
One factor here is that historically the NodeInfo interface has not been 
100% stable; we will sometimes add a method, or add an argument to an 
existing method, which means that existing implementations of the 
interface need to be tweaked.

Michael Kay

More information about the jdom-interest mailing list