aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/org/apache/fop/fo/FONode.java7
-rw-r--r--src/org/apache/fop/fo/flow/Marker.java5
2 files changed, 8 insertions, 4 deletions
diff --git a/src/org/apache/fop/fo/FONode.java b/src/org/apache/fop/fo/FONode.java
index a620eb235..af4791a40 100644
--- a/src/org/apache/fop/fo/FONode.java
+++ b/src/org/apache/fop/fo/FONode.java
@@ -234,11 +234,14 @@ abstract public class FONode {
public void addMarker(Marker marker) throws FOPException {
String mcname = marker.getMarkerClassName();
- if (!markers.containsKey(mcname) && children.isEmpty())
+ if (!markers.containsKey(mcname) && children.isEmpty()) {
markers.put(mcname, marker);
- else
+ } else {
+ log.error("fo:marker must be an initial child,"
+ + "and 'marker-class-name' must be unique for same parent");
throw new FOPException("fo:marker must be an initial child,"
+ "and 'marker-class-name' must be unique for same parent");
+ }
}
public boolean hasMarkers() {
diff --git a/src/org/apache/fop/fo/flow/Marker.java b/src/org/apache/fop/fo/flow/Marker.java
index 762ed8327..0eb0baaa5 100644
--- a/src/org/apache/fop/fo/flow/Marker.java
+++ b/src/org/apache/fop/fo/flow/Marker.java
@@ -45,8 +45,9 @@ public class Marker extends FObjMixed {
try {
parent.addMarker(this);
} catch (FOPException fopex) {
- log.error("marker cannot be added to '" + parent
- + "'");
+ // log is null in constructor
+ //log.error("marker cannot be added to '" + parent
+ // + "'");
}
}