I've worked out why this error occurs, but I can't (yet) offer any ideas about why it ever worked or what might have changed that caused it to stop working.
The document's DTD makes a request for the MathML 3.0 DTD. That goes to the standard URI resolver which finds it in the table of built in identifiers, it calls fetch
to get it from our resources on the classpath, adjusts the system identifier to begin "classpath:...", so we know where it came from, and returns it.
Subsequently, the MathML DTD attempts to load a module. That module isn't in the table of built in identifiers so we fall back to trying to load the resource with the URI. At this point, we notice the "classpath:" scheme and attempt to find it in our system resources by calling getResource
.
And therein lies the problem, fetch
calls Configuration.locateResource
which adjusts the filename so that it begins with net/sf/saxon/data
but getResource
just tries to find the "raw" name. When it fails to find the resource, processing falls back to the caller (deep in the guts of Xerces) where the classpath:
URI scheme is, quite reasonably, reported as invalid.
I can think of several ways to fix this, the simplest seems to be to call fetch
instead of getResource
in the second case. Alternatively, the path that's added to classpath:
could be fixed so that the additional prefix has already been applied.
A cursory examination of the history of fetch
, getResource
, and Configuration.locateResource
suggests that this aspect of their behavior hasn't changed in at least a year so I can't say if/when this ever worked.