[FOray-commit] SF.net SVN: foray:[11780] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2021-01-13 15:00:26
|
Revision: 11780
http://sourceforge.net/p/foray/code/11780
Author: victormote
Date: 2021-01-13 15:00:18 +0000 (Wed, 13 Jan 2021)
Log Message:
-----------
Document the pro-form changes needed to upgrade JEuclid to 3.1.9, and the reasons why we cannot currently do so.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/master/build.gradle
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2021-01-13 12:26:32 UTC (rev 11779)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/GraphicServer4a.java 2021-01-13 15:00:18 UTC (rev 11780)
@@ -432,6 +432,44 @@
+ "MathML document, but was: " + rootElementName);
}
+ /*
+ * The pro-forma changes for upgrading to JEuclid 3.1.9 are as follows:
+ * 1. Change the ext.jeuclidVersion variable in the master build.gradle to '3.1.9'.
+ * 2. Uncomment the following section of code.
+ * 3. Remove the remainder of the code in this method.
+ * 4. Remove the method below this one, having the signature: SVGGraphics2D createSVGGenerator(MathBase).
+ *
+ * This looks like it /ought/ to work, and in fact compiles cleanly. However, at runtime, when testing MathML
+ * documents, it results in the following:
+ *
+ * Exception in thread "main" java.lang.AbstractMethodError:
+ * net.sourceforge.jeuclid.elements.presentation.token.Mo.getTextContent()Ljava/lang/String;
+ * at net.sourceforge.jeuclid.elements.support.text.TextContent.getText(TextContent.java:44)
+ * at net.sourceforge.jeuclid.elements.AbstractJEuclidElement.getText(AbstractJEuclidElement.java:413)
+ * ...
+ * at net.sourceforge.jeuclid.converter.BatikConverter.convert(BatikConverter.java:93)
+ * at net.sourceforge.jeuclid.converter.Converter.convert(Converter.java:214)
+ * at org.foray.graphic.GraphicServer4a.domToSvgDom(GraphicServer4a.java:436)
+ * ...
+ *
+ * This is an unusual exception, basically meaning that something unexpected happened between compile time and
+ * runtime. It may also be possible that there is some incompatibility between Java versions of code included
+ * in the JEuclid distribution, and/or the FOray dependencies.
+ *
+ * In any case, this appears to be unsolvable without building JEuclid ourselves, which does not currently
+ * (January 13, 2021) appear to be worth the effort.
+ */
+
+
+ /* Pro-forma JEuclid 3.1.9 code. See above. */
+ /*
+ final Converter converter = Converter.getInstance();
+ final LayoutContext layoutContext = LayoutContextImpl.getDefaultLayoutContext();
+ final DocumentWithDimension dwd = converter.convert(dom, Converter.TYPE_SVG, layoutContext);
+ return (SVGDocument) dwd.getDocument();
+ */
+
+
final MathBase mathBase = new MathBase(MathBase.getDefaultParameters());
new DOMBuilder(dom, mathBase);
final SVGGraphics2D svgGenerator = this.createSVGGenerator(mathBase);
Modified: trunk/foray/master/build.gradle
===================================================================
--- trunk/foray/master/build.gradle 2021-01-13 12:26:32 UTC (rev 11779)
+++ trunk/foray/master/build.gradle 2021-01-13 15:00:18 UTC (rev 11780)
@@ -81,12 +81,19 @@
* our manual tests. Batik 1.6.1 requires a library that does not exist in the Maven repository.
*
* 8. JEuclid 3.1.9 will require handling some API changes.
+ * Making those API changes results in runtime problems, which are documented, along with the pro-forma necessary
+ * code changes, here:
+ * project: foray-graphic
+ * class: org.foray.graphic.GraphicServer4a
+ * method: org.w3c.dom.svg.SVGDocument domToSvgDom(org.w3c.dom.Document)
+ * JEuclid does not appear to be supported any longer, and I don't see any other MathML solutions with the right
+ * licensing. Therefore we will leave this dependency at 3.0.3 for now.
*
* 9. JUnit is compiled with Java 8 (major version 52) starting with release 5.0.0.
* We have therefore stayed with the highest version supporting Java 7, which is 4.13.1.
*
* 10. Mockito is compiled with Java 8 (major version 52) starting with release 3.0.0.
- * We have therefore stayed with the highest version supporting Java 7, which 2.28.2.
+ * We have therefore stayed with the highest version supporting Java 7, which 2.28.2.
*
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|