===============================================================================
Rebuilt jeuclid-core as follows. 
===============================================================================

* In lib/, updated batik-all.jar, commons-logging.jar, xml-apis.jar, 
  xmlgraphics-commons.jar. Copied newest versions from fop-2.11/fop/lib/.

* When converting MathML to SVG (for example, for use by RenderX XEP which
  does not natively support MathML), the "JEuclid image toolkit plug-in"
  add-on generated SVG files missing an xmlns="http://www.w3.org/2000/svg"
  namespace declaration

jeuclid-core/src/main/java/net/sourceforge/jeuclid/converter/
===============================================================
--- BatikConverter.java.ORI     2015-10-21 10:55:23.732980191 +0200
+++ BatikConverter.java 2022-04-08 11:38:13.092952138 +0200
@@ -63,8 +63,8 @@
         final DocumentWithDimension svgDocDim = this.convert(doc, context);
         if (svgDocDim != null) {
             try {
-                final Transformer transformer = TransformerFactory
-                        .newInstance().newTransformer();
+                final Transformer transformer =
+                    newTransformerFactory().newTransformer();
                 final DOMSource source = new DOMSource(svgDocDim
                         .getDocument());
                 final StreamResult result = new StreamResult(outStream);
@@ -77,6 +77,42 @@
         return null;
     }
 
+    /* 
+     * The fallback implementation class name, XSLTC. 
+     */
+    private static final String XSLTC_FACTORY =
+        "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
+    
+    private static TransformerFactory newTransformerFactory() 
+        throws TransformerException {
+        // Do not use Saxon 6.5 identity transform. It does not handle
+        // namespaces correctly.
+    
+        TransformerFactory factory = null;
+        try {
+            // This method exists only as of Java 1.9.
+            java.lang.reflect.Method method =
+                TransformerFactory.class.getMethod("newDefaultInstance");
+            factory = (TransformerFactory) method.invoke(null);
+        } catch (Throwable ignored) {}
+
+        if (factory == null) {
+            try {
+                factory = TransformerFactory.newInstance(XSLTC_FACTORY,
+                                                         /*classLoader*/ null);
+            } catch (Throwable ignored) {}
+        }
+        
+        if (factory == null) {
+            // May be an old factory like
+            // "com.icl.saxon.TransformerFactoryImpl" which does not support
+            // the factory attributes below.
+            factory = TransformerFactory.newInstance();
+        }
+
+        return factory;
+    }
+
     /** {@inheritDoc} */
     public DocumentWithDimension convert(final Node doc,
             final LayoutContext context) {
===============================================================

===============================================================
--- ConverterRegistry.java.ORI	2015-10-21 10:41:49.546358512 +0200
+++ ConverterRegistry.java	2015-10-21 10:44:21.375498529 +0200
@@ -52,10 +52,9 @@
      */
     @SuppressWarnings("unchecked")
     protected ConverterRegistry() {
-        final Iterator<ConverterDetector> it = Service
-                .providers(ConverterDetector.class);
+        final Iterator<Object> it = Service.providers(ConverterDetector.class);
         while (it.hasNext()) {
-            final ConverterDetector det = it.next();
+            final ConverterDetector det = (ConverterDetector) it.next();
             det.detectConversionPlugins(this);
         }
     }
===============================================================

* In order to make the code run on Java 9 without NoClassDefFoundError, 
replaced all references to org.w3c.dom.events.CustomEvent (interface) by 
org.apache.batik.dom.events.DOMCustomEvent (implementation).

Java 9 does not support having the org.w3c.dom.events package split between 
two modules: "unamed" module, batik-all.jar (or batik-ext.jar) 
found in $CLASSPATH and Java 9's "java.xml" module.

jeuclid-core/src/main/java/net/sourceforge/jeuclid/elements/presentation/token/
===============================================================
--- Mo.java.ORI 2010-02-12 15:10:32.000000000 +0100
+++ Mo.java     2017-11-13 09:08:40.523541364 +0100
@@ -47,7 +47,6 @@
 import org.apache.batik.dom.events.DOMCustomEvent;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Node;
-import org.w3c.dom.events.CustomEvent;
 import org.w3c.dom.events.Event;
 import org.w3c.dom.events.EventListener;
 import org.w3c.dom.events.EventTarget;
@@ -313,7 +312,7 @@
                 this.setDefaultMathAttribute(Mo.ATTR_STRETCHY,
                         Mo.VALUE_STRETCHY_VERTICAL);
             }
-            final CustomEvent evt = new DOMCustomEvent();
+            final DOMCustomEvent evt = new DOMCustomEvent();
             evt.initCustomEventNS(null, Mo.MOEVENT, true, false, null);
             this.dispatchEvent(evt);
             this.inChangeHook = false;
===============================================================

Also 

- added a .HIDE suffix to FreeHep*.java 
- removed line:

net.sourceforge.jeuclid.converter.FreeHepDetector

from jeuclid-core/src/main/resources/META-INF/services/
net.sourceforge.jeuclid.converter.ConverterDetector

* Ran in jeuclid-core/:
---
find target -name '*.class' -exec rm -v {} \;
rm -v target/jeuclid-core.jar
ant
---

===============================================================================
Rebuilt jeuclid-fop as follows:
===============================================================================

* In lib/, updated fop.jar, batik-all.jar, xml-apis.jar, 
  xmlgraphics-commons.jar, commons-logging.jar.
  Copied newest versions from fop-2.11/fop/target/,lib/.
  Also updated jeuclid-core.jar from ../../jeuclid-core/target/
  and fop-hyph.jar from offo-hyphenation-compiled/.
   
* jeuclid-fop/src/main/java/net/sourceforge/jeuclid/xmlgraphics/ImageLoaderFactoryMathML.java
===============================================================
--- ImageLoaderFactoryMathML.java.ORI   2010-02-12 15:10:32.000000000 +0100
+++ ImageLoaderFactoryMathML.java       2019-12-02 11:36:54.445283069 +0100
@@ -56,9 +56,11 @@
     }
 
     /** {@inheritDoc} */
+/*DEPRECATED AND NOT USEFUL
     public int getUsagePenalty(final String mime, final ImageFlavor flavor) {
         return 0;
     }
+*/
 
     /** {@inheritDoc} */
     public boolean isAvailable() {
===============================================================

* jeuclid-fop/src/main/java/net/sourceforge/jeuclid/xmlgraphics/PreloaderMathML.java
  ImageUtil.needInputStream replaced by XmlSourceUtil.needInputStream
===============================================================
-- PreloaderMathML.java.ORI    2010-02-12 15:10:32.000000000 +0100
+++ PreloaderMathML.java        2019-12-02 11:39:22.960488156 +0100
@@ -44,7 +44,7 @@
 import org.apache.xmlgraphics.image.loader.ImageSize;
 import org.apache.xmlgraphics.image.loader.impl.AbstractImagePreloader;
 import org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM;
-import org.apache.xmlgraphics.image.loader.util.ImageUtil;
+import org.apache.xmlgraphics.io.XmlSourceUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
@@ -119,7 +119,7 @@
                 final DOMSource domSrc = (DOMSource) src;
                 n = (Document) domSrc.getNode();
             } else {
-                in = new UnclosableInputStream(ImageUtil.needInputStream(src));
+                in = new UnclosableInputStream(XmlSourceUtil.needInputStream(src));
                 final int length = in.available();
                 in.mark(length + 1);
                 n = Parser.getInstance().parseStreamSource(
===============================================================

* Ran in jeuclid-fop/:
---
find target -name '*.class' -exec rm -v {} \;
rm -v target/jeuclid-fop.jar
ant
---
