From: Glen Mazza Date: Tue, 27 Jul 2004 23:23:24 +0000 (+0000) Subject: Provided validateChildFO() methods for the "easy" FO's--i.e., those X-Git-Tag: Root_Temp_KnuthStylePageBreaking~644 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a65925f0dbb1c4fe68887fe9deb9f90ba159dfbd;p=xmlgraphics-fop.git Provided validateChildFO() methods for the "easy" FO's--i.e., those with an empty content model. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197844 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java index 8bc70f0c2..670e55e7e 100644 --- a/src/java/org/apache/fop/fo/flow/Character.java +++ b/src/java/org/apache/fop/fo/flow/Character.java @@ -18,6 +18,11 @@ 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.CharIterator; import org.apache.fop.fo.FONode; @@ -61,6 +66,15 @@ public class Character extends FObj { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + private void setup() throws FOPException { // Common Aural Properties diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java index f617d5620..de42915d1 100644 --- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java +++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java @@ -18,9 +18,14 @@ package org.apache.fop.fo.flow; -// XML +// Java import java.awt.geom.Rectangle2D; +// XML +import org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; + import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.Length; import org.apache.fop.fo.FONode; @@ -58,6 +63,15 @@ public class ExternalGraphic extends FObj { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + /** * @see org.apache.fop.fo.FObj#addProperties */ diff --git a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java index 0c9a7867d..8b1c90fe1 100644 --- a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java +++ b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java @@ -18,6 +18,11 @@ 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.FOTreeVisitor; @@ -41,6 +46,15 @@ public class InitialPropertySet extends ToBeImplementedElement { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + private void setup() { // Common Accessibility Properties diff --git a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java index 8472962fa..159519f37 100644 --- a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java +++ b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java @@ -18,6 +18,11 @@ 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.FOTreeVisitor; @@ -36,11 +41,18 @@ public class MultiPropertySet extends ToBeImplementedElement { super(parent); } - private void setup() { + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + private void setup() { setupID(); // this.propertyList.get("active-state"); - } public void acceptVisitor(FOTreeVisitor fotv) { diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java index 0035afea7..40ed737e7 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumber.java +++ b/src/java/org/apache/fop/fo/flow/PageNumber.java @@ -20,6 +20,7 @@ package org.apache.fop.fo.flow; // XML import org.xml.sax.Attributes; +import org.xml.sax.Locator; import org.xml.sax.SAXParseException; // FOP @@ -56,6 +57,15 @@ public class PageNumber extends FObj { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + /** * @see org.apache.fop.fo.FObj#addProperties */ diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java index 7084305fc..7d93eb28d 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java @@ -18,6 +18,11 @@ package org.apache.fop.fo.flow; +// XML +import org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; + import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; @@ -57,6 +62,15 @@ public class PageNumberCitation extends FObj { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + /** * @param str string to be measured * @return width (in millipoints ??) of the string diff --git a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java index dee50c989..5702d5412 100644 --- a/src/java/org/apache/fop/fo/flow/RetrieveMarker.java +++ b/src/java/org/apache/fop/fo/flow/RetrieveMarker.java @@ -18,12 +18,16 @@ 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.apps.FOPException; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.FOTreeVisitor; - import org.xml.sax.Attributes; /** * The retrieve-marker formatting object. @@ -45,6 +49,15 @@ public class RetrieveMarker extends FObjMixed { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + /** * @see org.apache.fop.fo.FObj#addProperties */ diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java index 7f7089783..c6659690e 100644 --- a/src/java/org/apache/fop/fo/flow/TableColumn.java +++ b/src/java/org/apache/fop/fo/flow/TableColumn.java @@ -20,6 +20,7 @@ package org.apache.fop.fo.flow; // XML import org.xml.sax.Attributes; +import org.xml.sax.Locator; import org.xml.sax.SAXParseException; // FOP @@ -55,6 +56,15 @@ public class TableColumn extends FObj { super(parent); } + /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL Content Model: empty + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); + } + /** * @see org.apache.fop.fo.FObj#addProperties */ diff --git a/src/java/org/apache/fop/fo/pagination/Region.java b/src/java/org/apache/fop/fo/pagination/Region.java index ef37d1e9c..d06f392b3 100644 --- a/src/java/org/apache/fop/fo/pagination/Region.java +++ b/src/java/org/apache/fop/fo/pagination/Region.java @@ -68,7 +68,7 @@ public abstract class Region extends FObj { /** * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) - * XSL/FOP Content Model: empty + * XSL Content Model: empty */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws SAXParseException {