> -----Original Message----- > From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED] [...] > 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 System.property, 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 to: 1) system property (1 jvm = 1 setting, of course) 2) lib/jaxp.properties in jre directory (yeah sure, 1 jre install = 1 setting) 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 ? Stephane -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
