From 6b09ab0ad694fc65e9f34cd79c5773a37d66ffd9 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 7 Nov 2003 21:22:26 +0000 Subject: [PATCH] Cleanup and make it compile again git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196984 13f79535-47bb-0310-9956-ffa450edef68 --- .../mathml/src/org/apache/fop/mathml/MathMLElement.java | 4 ++-- .../src/org/apache/fop/mathml/MathMLElementMapping.java | 7 +++++-- examples/mathml/src/org/apache/fop/mathml/MathMLObj.java | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java b/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java index 0df6088cb..9fc913e0d 100644 --- a/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java +++ b/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java @@ -123,7 +123,7 @@ public class MathMLElement extends MathMLObj { doc = svgDoc; } } catch (Throwable t) { - userAgent.getLogger().error("Could not convert MathML to SVG", t); + getLogger().error("Could not convert MathML to SVG", t); width = 0; height = 0; } @@ -181,7 +181,7 @@ public class MathMLElement extends MathMLObj { */ public String getDocumentNamespace() { if (svgDoc == null) { - return MathMLElementMapping.URI; + return MathMLElementMapping.NAMESPACE; } return "http://www.w3.org/2000/svg"; } diff --git a/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java b/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java index 9c48520eb..6dbf2b5d2 100644 --- a/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java +++ b/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java @@ -66,8 +66,11 @@ import net.sourceforge.jeuclid.DOMMathBuilder; */ public class MathMLElementMapping extends ElementMapping { + /** MathML Namespace */ + public static final String NAMESPACE = "http://www.w3.org/1998/Math/MathML"; + public MathMLElementMapping() { - URI = "http://www.w3.org/1998/Math/MathML"; + this.namespaceURI = NAMESPACE; } protected void initialize() { @@ -76,7 +79,7 @@ public class MathMLElementMapping extends ElementMapping { foObjs.put("math", new ME()); foObjs.put(DEFAULT, new MathMLMaker()); - XMLReader.setConverter(URI, new MathMLConverter()); + XMLReader.setConverter(this.namespaceURI, new MathMLConverter()); } } diff --git a/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java b/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java index 747fc62ca..f8aa1bc39 100644 --- a/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java +++ b/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java @@ -55,7 +55,7 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.XMLObj; /** - * Catch all MathML object as default element. + * Catch all MathML objects as default element. */ public class MathMLObj extends XMLObj { @@ -70,7 +70,7 @@ public class MathMLObj extends XMLObj { * @see org.apache.fop.fo.XMLObj#getNameSpace() */ public String getNameSpace() { - return MathMLElementMapping.URI; + return MathMLElementMapping.NAMESPACE; } } -- 2.39.5