diff options
author | Glen Mazza <gmazza@apache.org> | 2004-06-26 19:37:13 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-06-26 19:37:13 +0000 |
commit | b0449877f620ca620d7061e17fff267b27af87e8 (patch) | |
tree | 434b17ec3183bc1c50d2d42758218b0132214b8b /src/java/org/apache/fop/fo/pagination | |
parent | 8a045dbc8d61f3ae7750715cd61c626fb48f775b (diff) | |
download | xmlgraphics-fop-b0449877f620ca620d7061e17fff267b27af87e8.tar.gz xmlgraphics-fop-b0449877f620ca620d7061e17fff267b27af87e8.zip |
1. Output constant types (RENDER_PDF, RENDER_PS, etc.) made common between
CommandLineOptions and Driver, and factored into fo.Constants interface.
2. New Driver(AWTRenderer renderer) constructor added in apps.Driver for
the AWTRenderer (which does reloading, unique among the output types.) Note
reloading currently doesn't work--AWTRenderer not yet functional.
3. Driver.hasData() method removed from API--a search on when it was implemented
dates it to 2001, when reset() was coded. Unsure of its need, and so
removed until we have user requests for it.
4. Renderers abstracted away from API in favor of just calling .setRenderer(int Rendertype),
and configuring user-configurable options in FOUserAgent.
5. Driver.setRenderer(String <renderer class name>) also dropped. If external user
need for it, can be re-implemented fairly easily via a "renderer override" string in FOUserAgent, for which FOTreeHandler can read and use instead.
6. Validity checking added to fo:flow, and convenience functions defining the "%block;"
parameter entity and neutral containers as defined in 6.2 of spec [1] added to FObj.
[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#section-N9447-Formatting-Object-Content
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197745 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/Flow.java | 30 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java | 2 |
2 files changed, 24 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/Flow.java b/src/java/org/apache/fop/fo/pagination/Flow.java index ac2911e9d..d7cc88cf3 100644 --- a/src/java/org/apache/fop/fo/pagination/Flow.java +++ b/src/java/org/apache/fop/fo/pagination/Flow.java @@ -23,6 +23,7 @@ import java.util.ArrayList; // XML import org.xml.sax.Attributes; +import org.xml.sax.Locator; // FOP import org.apache.fop.fo.FONode; @@ -63,6 +64,28 @@ public class Flow extends FObj { } /** + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) + * XSL/FOP Content Model: (%block;)+ + */ + protected void validateChildNode(Locator loc, String nsURI, String localName) { + if (!isBlockItem(nsURI, localName)) { + invalidChildError(loc, nsURI, localName); + } + } + + /** + * Make sure content model satisfied, if so then tell the + * StructureRenderer that we are at the end of the flow. + * @see org.apache.fop.fo.FONode#end + */ + protected void end() { + if (children == null) { + missingChildElementError("(%block;)+"); + } + getFOInputHandler().endFlow(this); + } + + /** * @see org.apache.fop.fo.FObj#addProperties */ protected void addProperties(Attributes attlist) throws FOPException { @@ -96,13 +119,6 @@ public class Flow extends FObj { } /** - * Tell the StructureRenderer that we are at the end of the flow. - */ - protected void end() { - getFOInputHandler().endFlow(this); - } - - /** * @param name the name of the flow to set * @throws FOPException for an empty name */ diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java index e2919c3de..a97cbae1e 100644 --- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java +++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java @@ -74,7 +74,7 @@ public class LayoutMasterSet extends FObj { */ protected void end() { if (children == null) { - missingChildElementError("(simple-page-master|page-sequence-master)+"); + missingChildElementError("(simple-page-master|page-sequence-master)+"); } } |