aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-06-20 07:46:13 +0000
committerGlen Mazza <gmazza@apache.org>2004-06-20 07:46:13 +0000
commitb638342ab96a6d344aab5fd9653ca24e29d90424 (patch)
tree4e299c7177c9c08870fabea58d1b9e37f8ad989b /src/java/org
parent8c0097a948c3bf27caec924b3006036d249e8f8d (diff)
downloadxmlgraphics-fop-b638342ab96a6d344aab5fd9653ca24e29d90424.tar.gz
xmlgraphics-fop-b638342ab96a6d344aab5fd9653ca24e29d90424.zip
1. Created own logger for AbstractRenderer, removed logger setter from Renderer interface.
2. Validity checking for fo:repeatable-page-master-alternatives. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197739 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/apps/Driver.java1
-rw-r--r--src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java3
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java22
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java13
-rw-r--r--src/java/org/apache/fop/render/Renderer.java7
-rw-r--r--src/java/org/apache/fop/tools/AreaTreeBuilder.java1
6 files changed, 28 insertions, 19 deletions
diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java
index 7b0cece47..cf4395a94 100644
--- a/src/java/org/apache/fop/apps/Driver.java
+++ b/src/java/org/apache/fop/apps/Driver.java
@@ -409,7 +409,6 @@ public class Driver {
throws IllegalArgumentException {
try {
renderer = (Renderer)Class.forName(rendererClassName).newInstance();
- renderer.setLogger(getLogger());
renderer.setProducer(Version.getVersion());
renderer.setUserAgent(getUserAgent());
} catch (ClassNotFoundException e) {
diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
index 3101df6e6..e2919c3de 100644
--- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
+++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
@@ -69,6 +69,9 @@ public class LayoutMasterSet extends FObj {
}
}
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
protected void end() {
if (children == null) {
missingChildElementError("(simple-page-master|page-sequence-master)+");
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
index 93b688734..701270343 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
@@ -23,8 +23,10 @@ import java.util.ArrayList;
// XML
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
// FOP
+import org.apache.fop.fo.FOElementMapping;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
@@ -58,6 +60,26 @@ public class RepeatablePageMasterAlternatives extends FObj
}
/**
+ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
+ XSL/FOP: (conditional-page-master-reference+)
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName) {
+ if (!(nsURI == FOElementMapping.URI &&
+ localName.equals("conditional-page-master-reference"))) {
+ invalidChildError(loc, nsURI, localName);
+ }
+ }
+
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
+ protected void end() {
+ if (children == null) {
+ missingChildElementError("(conditional-page-master-reference+)");
+ }
+ }
+
+ /**
* @see org.apache.fop.fo.FObj#addProperties
*/
protected void addProperties(Attributes attlist) throws FOPException {
diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java
index c76b8f3b6..53a6f3b0a 100644
--- a/src/java/org/apache/fop/render/AbstractRenderer.java
+++ b/src/java/org/apache/fop/render/AbstractRenderer.java
@@ -64,6 +64,7 @@ import org.apache.fop.fo.Constants;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fo.pagination.Region;
import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
// Avalon
import org.apache.avalon.framework.configuration.Configurable;
@@ -86,8 +87,8 @@ public abstract class AbstractRenderer
/**
* logging instance
*/
- protected Log logger = null;
-
+ protected static Log logger = LogFactory.getLog("Renderer");
+
/**
* producer (usually "FOP")
*/
@@ -142,14 +143,6 @@ public abstract class AbstractRenderer
}
/**
- * Sets the Commons-Logging instance for this class
- * @param logger The Commons-Logging instance
- */
- public void setLogger(Log logger) {
- this.logger = logger;
- }
-
- /**
* Returns the Commons-Logging instance for this class
* @return The Commons-Logging instance
*/
diff --git a/src/java/org/apache/fop/render/Renderer.java b/src/java/org/apache/fop/render/Renderer.java
index d977e6a40..6ca5ad708 100644
--- a/src/java/org/apache/fop/render/Renderer.java
+++ b/src/java/org/apache/fop/render/Renderer.java
@@ -187,13 +187,6 @@ public interface Renderer {
* @param cont The inline container area
*/
void renderContainer(Container cont);
-
- /**
- * Tells the renderer to render an inline container.
- *
- * @param cont The inline container area
- */
- void setLogger(Log logger);
}
diff --git a/src/java/org/apache/fop/tools/AreaTreeBuilder.java b/src/java/org/apache/fop/tools/AreaTreeBuilder.java
index d2d0baff9..37b923d79 100644
--- a/src/java/org/apache/fop/tools/AreaTreeBuilder.java
+++ b/src/java/org/apache/fop/tools/AreaTreeBuilder.java
@@ -159,7 +159,6 @@ public class AreaTreeBuilder {
rend = new SVGRenderer();
}
- rend.setLogger(logger);
FontInfo fontInfo = new FontInfo();
rend.setupFontInfo(fontInfo);
FOUserAgent ua = new FOUserAgent();