From 97581a9081ec184b9755bdc07ce049df9419ca06 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 11 Nov 2005 13:27:34 +0000 Subject: Made the FO tree a little more consistent by renaming getName() to getLocalName() and adding additional methods like: getNamespaceURI() and getNormalNamespacePrefix(). getName() now returns the fully qualified name combined from getLocalName() and getNormalNamespacePrefix(). For special cases you can call getName(String) to return a different namespace prefix. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332545 13f79535-47bb-0310-9956-ffa450edef68 --- examples/mathml/src/org/apache/fop/mathml/MathMLObj.java | 13 ++++++++----- examples/plan/src/org/apache/fop/plan/PlanElement.java | 6 ++---- examples/plan/src/org/apache/fop/plan/PlanObj.java | 15 +++++++++------ 3 files changed, 19 insertions(+), 15 deletions(-) (limited to 'examples') diff --git a/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java b/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java index 83b0862c7..e4546149f 100644 --- a/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java +++ b/examples/mathml/src/org/apache/fop/mathml/MathMLObj.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,11 +34,14 @@ public class MathMLObj extends XMLObj { super(parent); } - /** - * @see org.apache.fop.fo.XMLObj#getNameSpace() - */ - public String getNameSpace() { + /** @see org.apache.fop.fo.FONode#getNamespaceURI() */ + public String getNamespaceURI() { return MathMLElementMapping.NAMESPACE; } + + /** @see org.apache.fop.fo.FONode#getNormalNamespacePrefix() */ + public String getNormalNamespacePrefix() { + return "mathml"; + } } diff --git a/examples/plan/src/org/apache/fop/plan/PlanElement.java b/examples/plan/src/org/apache/fop/plan/PlanElement.java index 92e30cf78..a4dfac439 100644 --- a/examples/plan/src/org/apache/fop/plan/PlanElement.java +++ b/examples/plan/src/org/apache/fop/plan/PlanElement.java @@ -86,10 +86,8 @@ public class PlanElement extends PlanObj { return doc; } - /** - * @see org.apache.fop.fo.XMLObj#getDocumentNamespace() - */ - public String getDocumentNamespace() { + /** @see org.apache.fop.fo.FONode#getNamespaceURI() */ + public String getNamespaceURI() { if (svgDoc == null) { return PlanElementMapping.NAMESPACE; } diff --git a/examples/plan/src/org/apache/fop/plan/PlanObj.java b/examples/plan/src/org/apache/fop/plan/PlanObj.java index 075c639fb..08da53819 100644 --- a/examples/plan/src/org/apache/fop/plan/PlanObj.java +++ b/examples/plan/src/org/apache/fop/plan/PlanObj.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,11 +37,14 @@ public class PlanObj extends XMLObj { super(parent); } - /** - * @see org.apache.fop.fo.XMLObj#getNameSpace() - */ - public String getNameSpace() { - return "http://xml.apache.org/fop/plan"; + /** @see org.apache.fop.fo.FONode#getNamespaceURI() */ + public String getNamespaceURI() { + return PlanElementMapping.NAMESPACE; + } + + /** @see org.apache.fop.fo.FONode#getNormalNamespacePrefix() */ + public String getNormalNamespacePrefix() { + return "plan"; } } -- cgit v1.2.3