diff options
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java')
-rw-r--r-- | src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java index 8ad7f982b..16e549489 100644 --- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java +++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java @@ -28,8 +28,10 @@ import org.xml.sax.Attributes; // FOP import org.apache.fop.fo.FONode; 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. @@ -53,6 +55,27 @@ public class LayoutMasterSet extends FObj { } /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + XSL/FOP: (simple-page-master|page-sequence-master)+ + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) { + if (nsURI == FOElementMapping.URI) { + if (!localName.equals("simple-page-master") + && !localName.equals("page-sequence-master")) { + invalidChildError(loc, nsURI, localName); + } + } else { + invalidChildError(loc, nsURI, localName); + } + } + + protected void end() { + if (children == null) { + missingChildElementError("(simple-page-master|page-sequence-master)+"); + } + } + + /** * @see org.apache.fop.fo.FObj#addProperties */ protected void addProperties(Attributes attlist) throws FOPException { |