ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <>
Subject RE: Saxon Liason for Style task
Date Thu, 07 Mar 2002 14:11:14 GMT
> -----Original Message-----
> From: Jose Alberto Fernandez []
> Well, the escence of my proposal is to be able to
> specify which TraX we want. The mechanics of how to
> obtain it, we probably need to think some more about
> it. I really do not know JAXP that well, so I just
> tried with something simple. 

> For the JAXP experts, can I just do new of the class
> directly and just use that instead of what JAXP would
> have returned? If that works, we do not need to change
> the, we just bypass all that.

Essentialy what it means is doing what JAXP (TRaX) does at this time except
that you want to shortcut the pluggability layer. AFAIK there is no way to
do that cleanly because the specifications limit the implementation look up
1) system property (1 jvm = 1 setting, of course)
2) lib/ in jre directory (yeah sure, 1 jre install = 1
3) services api via meta-inf/services (sure, classpath helps when you have
several xslt implementation)

So yes IMHO you have no choice than to instantiate directly the factory
(which means you must know it so you break the pluggability thing since you
are not supposed to know it).

Alternatively you could create your own jaxp factory that will act as a
facade/registry for others factory implementation. (ie mapping). This was
mainly what was done in Weblogic for example. At the server startup they
were setting the jaxp factories to the weblogic ones via the system
properties (thus overwriting your own one if declared) so all jaxp factories
call were passed to the weblogic factory that was then referring to the
mapping you had done.
I don't like it though.

What alternative do you have in your own code rather than instantiating
explicitely the factory of the desired package. You cannot rely on jaxp and
you cannot change the system property on the fly (what about MT (ie parallel
tasks in Ant)) or ClassLoader trick to be in another namespace ?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message