aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-09-06 21:23:23 +0000
committerGlen Mazza <gmazza@apache.org>2004-09-06 21:23:23 +0000
commit377dcebcd8de52b7e4b59059fdd6156e53cd4923 (patch)
treeb7073f7abe43081753e829dbd42502017c2ced75 /src
parent4d9ca181da2db9e221f88f0d8c9a8964b9f428af (diff)
downloadxmlgraphics-fop-377dcebcd8de52b7e4b59059fdd6156e53cd4923.tar.gz
xmlgraphics-fop-377dcebcd8de52b7e4b59059fdd6156e53cd4923.zip
PR:
Obtained from: Submitted by: Reviewed by: validateChildNode() for fo:table-row added. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiSwitch.java3
-rw-r--r--src/java/org/apache/fop/fo/flow/TableRow.java21
2 files changed, 21 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
index fffd00e8b..8fd281519 100644
--- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java
+++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
@@ -59,8 +59,7 @@ public class MultiSwitch extends FObj {
}
/**
- * Make sure content model satisfied, if so then tell the
- * FOEventHandler that we are at the end of the flow.
+ * Make sure content model satisfied.
* @see org.apache.fop.fo.FONode#end
*/
protected void endOfNode() throws SAXParseException {
diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java
index 680cb0b65..ec3057cb2 100644
--- a/src/java/org/apache/fop/fo/flow/TableRow.java
+++ b/src/java/org/apache/fop/fo/flow/TableRow.java
@@ -23,6 +23,7 @@ import java.util.List;
// XML
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
import org.xml.sax.SAXParseException;
// FOP
@@ -37,7 +38,6 @@ import org.apache.fop.fo.properties.Property;
/**
* Class modelling the fo:table-row object.
- * @todo implement validateChildNode()
*/
public class TableRow extends FObj {
@@ -67,8 +67,24 @@ public class TableRow extends FObj {
getFOEventHandler().startRow(this);
}
+ /**
+ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
+ * XSL Content Model: (table-cell+)
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName)
+ throws SAXParseException {
+ if (!(nsURI == FO_URI && localName.equals("table-cell"))) {
+ invalidChildError(loc, nsURI, localName);
+ }
+ }
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
protected void endOfNode() throws SAXParseException {
+ if (childNodes == null) {
+ missingChildElementError("(table-cell+)");
+ }
getFOEventHandler().endRow(this);
}
@@ -79,6 +95,9 @@ public class TableRow extends FObj {
return keepWithPrevious;
}
+ /**
+ * @todo see if should remove, or move code to addProperties()
+ */
private void doSetup() {
this.breakAfter = getPropEnum(PR_BREAK_AFTER);
this.backgroundColor =