diff options
author | Glen Mazza <gmazza@apache.org> | 2004-06-17 07:02:13 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-06-17 07:02:13 +0000 |
commit | ea13be29f9ebac2fa09fa8770bee8a93ab0d4a52 (patch) | |
tree | 240b591429681a07c6a92920643964570f18b525 /src/java/org/apache/fop/fo/pagination | |
parent | 2aa878b44760079c9321ae5a7d4a0e2f6938cfd8 (diff) | |
download | xmlgraphics-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')
-rw-r--r-- | src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java | 33 |
2 files changed, 32 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java index 16e549489..3101df6e6 100644 --- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java +++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java @@ -24,6 +24,7 @@ import java.util.Map; // XML import org.xml.sax.Attributes; +import org.xml.sax.Locator; // FOP import org.apache.fop.fo.FONode; @@ -31,7 +32,6 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOElementMapping; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.apps.FOPException; -import org.xml.sax.Locator; /** * The layout-master-set formatting object. 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 */ |