From: Peter Bernard West Date: Wed, 13 Nov 2002 15:29:36 +0000 (+0000) Subject: Adjusted for reversal of sense of normal and outOfLine in FObjectSets. X-Git-Tag: Alt-Design_pre_src-java-org~125 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c39cbab2bcc648062cf5dddc0ae70f42147d158;p=xmlgraphics-fop.git Adjusted for reversal of sense of normal and outOfLine in FObjectSets. Removed Normal from name of expectNormal... methods. Added expectOutOfLineBlock(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195528 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/xml/SyncedFoXmlEventsBuffer.java b/src/org/apache/fop/xml/SyncedFoXmlEventsBuffer.java index 257c1964c..705f17f4b 100644 --- a/src/org/apache/fop/xml/SyncedFoXmlEventsBuffer.java +++ b/src/org/apache/fop/xml/SyncedFoXmlEventsBuffer.java @@ -825,6 +825,15 @@ public class SyncedFoXmlEventsBuffer extends SyncedCircularBuffer { ("Unexpected START element: " + ev.getQName()); } + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of %block; from + * 6.2 Formatting Object Content, including out-of-line flow + * objects which may occur except as descendents of out-of-line formatting + * objects. White space is discarded. + * @return the FoXMLEvent found. If any other events are encountered + * return null. + */ public FoXMLEvent expectBlock() throws FOPException, UnexpectedStartElementException { @@ -832,7 +841,33 @@ public class SyncedFoXmlEventsBuffer extends SyncedCircularBuffer { (FObjectSets.blockEntity, XMLEvent.DISCARD_W_SPACE); } - public FoXMLEvent expectNormalPcdataOrInline() + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of %block; from + * 6.2 Formatting Object Content, excluding out-of-line flow + * objects which may not occur as descendents of out-of-line formatting + * objects. White space is discarded. + * @return the FoXMLEvent found. If any other events are encountered + * return null. + */ + public FoXMLEvent expectOutOfLineBlock() + throws FOPException, UnexpectedStartElementException + { + return expectStartElement + (FObjectSets.outOfLineBlockSet, XMLEvent.DISCARD_W_SPACE); + } + + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of (#PCDATA|%inline;) from + * 6.2 Formatting Object Content, including out-of-line flow + * objects which may occur except as descendents of out-of-line + * formatting objects. White space is retained, and + * will appear as #PCDATA, i.e, as an instance of FoCharacters. + * @return the FoXMLEvent found. If any other events are encountered + * return null. + */ + public FoXMLEvent expectPcdataOrInline() throws FOPException, UnexpectedStartElementException { FoXMLEvent ev = expectStartElement @@ -842,6 +877,16 @@ public class SyncedFoXmlEventsBuffer extends SyncedCircularBuffer { return ev; } + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of (#PCDATA|%inline;) from + * 6.2 Formatting Object Content, excluding out-of-line flow + * objects which may not occur as descendents of out-of-line formatting + * objects. White space is retained, and + * will appear as #PCDATA, i.e, as an instance of FoCharacters. + * @return the FoXMLEvent found. If any other events are encountered + * return null. + */ public FoXMLEvent expectOutOfLinePcdataOrInline() throws FOPException, UnexpectedStartElementException { @@ -852,7 +897,17 @@ public class SyncedFoXmlEventsBuffer extends SyncedCircularBuffer { return ev; } - public FoXMLEvent expectNormalPcdataOrInlineOrBlock() + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of (#PCDATA|%inline;|%block;) from + * 6.2 Formatting Object Content, including out-of-line flow + * objects which may occur except as descendents of out-of-line + * formatting objects. White space is retained, and + * will appear as #PCDATA, i.e, as an instance of FoCharacters. + * @return the FoXMLEvent found. If any other events are + * encountered return null. + */ + public FoXMLEvent expectPcdataOrInlineOrBlock() throws FOPException, UnexpectedStartElementException { FoXMLEvent ev = expectStartElement @@ -862,11 +917,22 @@ public class SyncedFoXmlEventsBuffer extends SyncedCircularBuffer { return ev; } + /** + * Expect that the next element will be a STARTELEMENT for one of the + * flow objects which are members of (#PCDATA|%inline;|%block;) from + * 6.2 Formatting Object Content, excluding out-of-line flow + * objects which may not occur as descendents of out-of-line formatting + * objects. White space is retained, and + * will appear as #PCDATA, i.e, as an instance of FoCharacters. + * @return the FoXMLEvent found. If any other events are + * encountered return null. + */ public FoXMLEvent expectOutOfLinePcdataOrInlineOrBlock() throws FOPException, UnexpectedStartElementException { FoXMLEvent ev = expectStartElement - (FObjectSets.pcdataBlockInlineSet, XMLEvent.RETAIN_W_SPACE); + (FObjectSets.outOfLinePcdataBlockInlineSet, + XMLEvent.RETAIN_W_SPACE); if (ev == null) ev = expectCharacters(); return ev;