[FOray-commit] SF.net SVN: foray:[11777] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2021-01-13 11:25:49
|
Revision: 11777
http://sourceforge.net/p/foray/code/11777
Author: victormote
Date: 2021-01-13 11:25:46 +0000 (Wed, 13 Jan 2021)
Log Message:
-----------
Add back dependency on Xerces, so that we have a working DOM Document implementation for MathML. Add an example of using an instream-foreign-object.
Modified Paths:
--------------
trunk/foray/foray-graphic/build.gradle
trunk/foray/foray-graphic/src/main/java/org/foray/graphic/math/MathMlDocument4a.java
trunk/foray/master/build.gradle
trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo
Modified: trunk/foray/foray-graphic/build.gradle
===================================================================
--- trunk/foray/foray-graphic/build.gradle 2021-01-13 00:55:27 UTC (rev 11776)
+++ trunk/foray/foray-graphic/build.gradle 2021-01-13 11:25:46 UTC (rev 11777)
@@ -3,6 +3,7 @@
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
api group: 'commons-io', name: 'commons-io', version: commonsIoVersion
+ api group: 'xerces', name: 'xercesImpl', version: xercesVersion
api group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: xmlgraphicsCommonsVersion
api group: 'batik', name: 'batik-bridge', version: batikVersion
api group: 'batik', name: 'batik-gvt', version: batikVersion
Modified: trunk/foray/foray-graphic/src/main/java/org/foray/graphic/math/MathMlDocument4a.java
===================================================================
--- trunk/foray/foray-graphic/src/main/java/org/foray/graphic/math/MathMlDocument4a.java 2021-01-13 00:55:27 UTC (rev 11776)
+++ trunk/foray/foray-graphic/src/main/java/org/foray/graphic/math/MathMlDocument4a.java 2021-01-13 11:25:46 UTC (rev 11777)
@@ -30,25 +30,24 @@
import org.foray.common.MathMlUtil;
+import org.apache.xerces.dom.DocumentImpl;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
+import org.w3c.dom.mathml.MathMLDocument;
-import java.util.HashMap;
-
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import net.sourceforge.jeuclid.MathBase;
-import net.sourceforge.jeuclid.ParameterKey;
-import net.sourceforge.jeuclid.elements.generic.DocumentElement;
-
/**
* An implementation of the DOM MathMLDocument interface.
*/
-public final class MathMlDocument4a extends DocumentElement {
+public final class MathMlDocument4a extends DocumentImpl implements MathMLDocument {
+ /** Constant needed for serialization. */
+ private static final long serialVersionUID = -2103887514402824538L;
+
/** The MathML document type. */
private static DocumentType mathmlDocumentType;
@@ -78,8 +77,8 @@
*/
private MathMlDocument4a(final DocumentType documentType,
final String referrer, final String domain, final String uri) {
-// super(documentType);
- super(new MathBase(new HashMap<ParameterKey, String>()));
+ super(documentType);
+// super(new MathBase(new HashMap<ParameterKey, String>()));
this.referrer = referrer;
this.domain = domain;
this.uri = uri;
Modified: trunk/foray/master/build.gradle
===================================================================
--- trunk/foray/master/build.gradle 2021-01-13 00:55:27 UTC (rev 11776)
+++ trunk/foray/master/build.gradle 2021-01-13 11:25:46 UTC (rev 11777)
@@ -33,24 +33,25 @@
ext.javaSourceCompatibility = JavaVersion.VERSION_1_7
ext.javaTargetCompatibility = JavaVersion.VERSION_1_7
- ext.axslVersion = '0.3-SNAPSHOT' // Latest is 0.3-SNAPSHOT as of 2021-01-12 See Note 2.
- ext.slf4jVersion = '1.7.30' // Latest is 1.7.30 as of 2021-01-12
- ext.commonsIoVersion = '2.6' // Latest is 2.8.0 as of 2021-01-12 See Note 3.
- ext.commonsDiscoveryVersion = '0.5' // Latest is 0.5 as of 2021-01-12
- ext.commonsCliVersion = '1.4' // Latest is 1.4 as of 2021-01-12
- ext.xmlResolverVersion = '1.2' // Latest is 1.2 as of 2021-01-12 See Note 4.
- ext.antVersion = '1.9.15' // Latest is 1.10.9 as of 2021-01-12 See Note 5.
- ext.servletApiVersion = '3.1.0' // Latest is 4.0.1 as of 2021-01-12 See Note 6.
- ext.xmlgraphicsCommonsVersion = '2.4' // Latest is 2.4 as of 2021-01-12
- ext.batikVersion = '1.6' // Latest is 1.13 as of 2021-01-12 See Note 7.
- ext.jeuclidVersion = '3.0.3' // Latest is 3.1.9 as of 2021-01-12 See Note 8.
- ext.icu4jVersion = '68.2' // Latest is 68.2 as of 2021-01-12
+ ext.axslVersion = '0.3-SNAPSHOT' // Latest is 0.3-SNAPSHOT as of 2021-01-12. See Note 2.
+ ext.slf4jVersion = '1.7.30' // Latest is 1.7.30 as of 2021-01-12.
+ ext.commonsIoVersion = '2.6' // Latest is 2.8.0 as of 2021-01-12. See Note 3.
+ ext.commonsDiscoveryVersion = '0.5' // Latest is 0.5 as of 2021-01-12.
+ ext.commonsCliVersion = '1.4' // Latest is 1.4 as of 2021-01-12.
+ ext.xmlResolverVersion = '1.2' // Latest is 1.2 as of 2021-01-12. See Note 4.
+ ext.antVersion = '1.9.15' // Latest is 1.10.9 as of 2021-01-12. See Note 5.
+ ext.servletApiVersion = '3.1.0' // Latest is 4.0.1 as of 2021-01-12. See Note 6.
+ ext.xercesVersion = '2.12.1' // Latest is 2.12.1 as of 2021-01-12.
+ ext.xmlgraphicsCommonsVersion = '2.4' // Latest is 2.4 as of 2021-01-12.
+ ext.batikVersion = '1.6' // Latest is 1.13 as of 2021-01-12. See Note 7.
+ ext.jeuclidVersion = '3.0.3' // Latest is 3.1.9 as of 2021-01-12. See Note 8.
+ ext.icu4jVersion = '68.2' // Latest is 68.2 as of 2021-01-12.
- ext.junitVersion = '4.13.1' // Latest is 5.7.0 as of 2021-01-12 See Note 9.
- ext.mockitoVersion = '2.28.2' // Latest is 3.7.0 as of 2021-01-12 See Note 10.
- ext.logbackClassicVersion = '1.2.3' // Latest is 1.2.3 as of 2021-01-12
+ ext.junitVersion = '4.13.1' // Latest is 5.7.0 as of 2021-01-12. See Note 9.
+ ext.mockitoVersion = '2.28.2' // Latest is 3.7.0 as of 2021-01-12. See Note 10.
+ ext.logbackClassicVersion = '1.2.3' // Latest is 1.2.3 as of 2021-01-12.
- ext.checkstyleVersion = '8.39' // Latest is 8.39 as of 2021-01-12
+ ext.checkstyleVersion = '8.39' // Latest is 8.39 as of 2021-01-12.
/*
Modified: trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo
===================================================================
--- trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo 2021-01-13 00:55:27 UTC (rev 11776)
+++ trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo 2021-01-13 11:25:46 UTC (rev 11777)
@@ -230,14 +230,17 @@
<fo:block
font-size="16pt"
font-weight="bold"
- space-before.minimum="1em"
- space-before.optimum="1.5em"
- space-before.maximum="2em">A MathML Example in an external-graphic</fo:block>
+ space-after.minimum="1em"
+ space-after.optimum="1.5em"
+ space-after.maximum="2em">MathML Examples in an external-graphic</fo:block>
+
+ <fo:block>The following is from an external-graphic:</fo:block>
<fo:block>
<fo:external-graphic src="url('../graphics/mathml-example-1.xml')"/>
</fo:block>
- <fo:block>This formula is MathML code embedded in the FO.
+ <fo:block>This formula in this paragraph is from an fo:instream-foreign-object. In other words, the formula is
+ embedded in this document.
<fo:instream-foreign-object>
<math:math mode="display">
<math:mrow>
@@ -256,7 +259,7 @@
</math:mrow>
</math:math>
</fo:instream-foreign-object>
- The formula should be after the first sentence and before this one.
+ The formula should be placed immediately before this sentence.
</fo:block>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|