Should have been "we had to", of course. Gah. Sorry.

--
   /_  Joe Kesselman (he/him/his)
-/ _) My Alexa skill for New Music/New Sounds fans:
   /   https://www.amazon.com/dp/B09WJ3H657/

Caveat: Opinionated old geezer with overcompensated writer's block. May be 
redundant, verbose, prolix, sesquipedalian, didactic, officious, or redundant.

________________________________
From: Joseph Kessselman <kesh...@alum.mit.edu>
Sent: Tuesday, December 5, 2023 10:11:30 PM
To: dev@xalan.apache.org <dev@xalan.apache.org>
Subject: Eliminating bootclasspath/endorsed

At one point he had to start shoving Xalan onto the front of the class
path, ahead of the libraries, because Sun adopted our code without
changing the package names. The only way to run ours was to make sure
the classpaths found it first.

With the introduction of JAXP/TrAX, which uses TransformerFactory and
ParserFactory configured by properties (default, per-user, or
per-invocation) to point to the appropriate ...Impl classes, Sun/Oracle
moved our code into com.sun.org.apache.local.*, and configured their
default properties file to point to that implementation. That permits
using the local or runtime parameter settings to override that default,
letting us access org.apache.xalan and org.apache.xml.parser in a
less violent manner.

I'm in the process of changing xalan-test to reflect that -- it takes
xalan and xerces off the bootclasspath or endorsedlib lists, puts them
on the normal classpath, and (currently) uses java -D parameters to set
the properties needed to make the factories assume that they should use
the "real" Apache versions (unless the application overrides that).
Setting up a local my_properties file which binds these during testing
should be another option. See Javadoc for the javax implementations of
TransformerFactory et al.

.....

Unfortunately, SerializerFactory wasn't covered by the JAXP/TrAX/javax
accord. The Serializer shipped with java is too back-level to run with
modern Xalan, so we really do need to switch to ours... but its factory
(in particular, the javax implementation of the factory) doesn't have
the same hierarchy of properties files that TransformerFactory does, so
reliably telling the JRE's factory to use our SerializerImpl class gets
a bit more complicated.

Working out what we can do about this to avoid path juggling, for now
and for the future. It may be ... interesting.

--
` /_ Joe Kesselman (he/him/his)
-/ _) My Alexa skill for New Music/New Sounds fans:
/ https://www.amazon.com/dp/B09WJ3H657/
Caveat: Opinionated old geezer with overcompensated writer's block. May
be redundant, verbose, prolix, sesquipedalian, didactic, officious, or
redundant. Feel free to call him on it.

Reply via email to