aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-06-17 07:02:13 +0000
committerGlen Mazza <gmazza@apache.org>2004-06-17 07:02:13 +0000
commitea13be29f9ebac2fa09fa8770bee8a93ab0d4a52 (patch)
tree240b591429681a07c6a92920643964570f18b525 /src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
parent2aa878b44760079c9321ae5a7d4a0e2f6938cfd8 (diff)
downloadxmlgraphics-fop-ea13be29f9ebac2fa09fa8770bee8a93ab0d4a52.tar.gz
xmlgraphics-fop-ea13be29f9ebac2fa09fa8770bee8a93ab0d4a52.zip
1. Child element validity checking added for fo:page-sequence-master.
2. AreaTree object moved from Document/Driver to FOTreeHandler, as it is specific to this subclass of FOInputHandler only (RTFHandler and MIFHandler don't use area trees). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
index f5b53214f..53617b602 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
@@ -21,13 +21,15 @@ package org.apache.fop.fo.pagination;
// Java
import java.util.List;
-// SAX
+// XML
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
// FOP
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOElementMapping;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.apps.FOPException;
@@ -58,6 +60,33 @@ public class PageSequenceMaster extends FObj {
super(parent);
}
+
+
+ /**
+ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
+ * XSL/FOP: (single-page-master-reference|repeatable-page-master-reference|
+ * repeatable-page-master-alternatives)+
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName) {
+ if (nsURI == FOElementMapping.URI) {
+ if (!localName.equals("single-page-master-reference")
+ && !localName.equals("repeatable-page-master-reference")
+ && !localName.equals("repeatable-page-master-alternatives")) {
+ invalidChildError(loc, nsURI, localName);
+ }
+ } else {
+ invalidChildError(loc, nsURI, localName);
+ }
+ }
+
+ protected void end() {
+ if (children == null) {
+ missingChildElementError("(single-page-master-reference|" +
+ "repeatable-page-master-reference|repeatable-page-master-alternatives)+");
+ }
+ }
+
+
/**
* @see org.apache.fop.fo.FObj#addProperties
*/