aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow/MultiSwitch.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-08-29 13:27:08 +0000
committerGlen Mazza <gmazza@apache.org>2004-08-29 13:27:08 +0000
commit450f1eeb3a2bd8caf2238e642097d16906c04e37 (patch)
tree39d708c46b1b361affee3381261a4603eb01bf05 /src/java/org/apache/fop/fo/flow/MultiSwitch.java
parenta82edcd7590fecc47ed5ba35d41f3666228e238e (diff)
downloadxmlgraphics-fop-450f1eeb3a2bd8caf2238e642097d16906c04e37.tar.gz
xmlgraphics-fop-450f1eeb3a2bd8caf2238e642097d16906c04e37.zip
Three more validateChildNodes() added.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197893 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/MultiSwitch.java')
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiSwitch.java29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
index 9c653172c..bc075ab7f 100644
--- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java
+++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
@@ -18,13 +18,18 @@
package org.apache.fop.fo.flow;
+// XML
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXParseException;
+
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
/**
* Class modelling the fo:multi-switch object.
- * @todo implement validateChildNode()
+ * @todo needs implementation
*/
public class MultiSwitch extends FObj {
@@ -43,6 +48,28 @@ public class MultiSwitch extends FObj {
}
/**
+ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
+ * XSL Content Model: (multi-case+)
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName)
+ throws SAXParseException {
+ if (!(nsURI == FO_URI && localName.equals("multi-case"))) {
+ invalidChildError(loc, nsURI, localName);
+ }
+ }
+
+ /**
+ * Make sure content model satisfied, if so then tell the
+ * FOInputHandler that we are at the end of the flow.
+ * @see org.apache.fop.fo.FONode#end
+ */
+ protected void endOfNode() throws SAXParseException {
+ if (childNodes == null) {
+ missingChildElementError("(multi-case+)");
+ }
+ }
+
+ /**
* @see org.apache.fop.fo.FObj#getName()
*/
public String getName() {