From eefe8a281dcdb9b77bfd2f2b9944eff16eabf88f Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Tue, 20 Jan 2004 05:57:08 +0000 Subject: [PATCH] Changes involved in introducing XmlEventReader, with configurable XmlEventSources git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197224 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fo/flow/FoBasicLink.java | 10 ++++----- .../apache/fop/fo/flow/FoBidiOverride.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoBlock.java | 10 ++++----- .../apache/fop/fo/flow/FoBlockContainer.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoFloat.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoFlow.java | 10 ++++----- .../org/apache/fop/fo/flow/FoFootnote.java | 10 ++++----- .../apache/fop/fo/flow/FoFootnoteBody.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoInline.java | 10 ++++----- .../apache/fop/fo/flow/FoInlineContainer.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoLeader.java | 10 ++++----- .../org/apache/fop/fo/flow/FoListBlock.java | 10 ++++----- .../org/apache/fop/fo/flow/FoListItem.java | 10 ++++----- .../apache/fop/fo/flow/FoListItemBody.java | 10 ++++----- .../apache/fop/fo/flow/FoListItemLabel.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoMarker.java | 10 ++++----- .../org/apache/fop/fo/flow/FoMultiCase.java | 10 ++++----- .../apache/fop/fo/flow/FoMultiProperties.java | 10 ++++----- .../org/apache/fop/fo/flow/FoMultiSwitch.java | 6 ++--- .../org/apache/fop/fo/flow/FoMultiToggle.java | 10 ++++----- .../apache/fop/fo/flow/FoPageSequence.java | 18 +++++++-------- .../apache/fop/fo/flow/FoStaticContent.java | 10 ++++----- src/java/org/apache/fop/fo/flow/FoTable.java | 22 +++++++++---------- .../apache/fop/fo/flow/FoTableAndCaption.java | 14 ++++++------ .../org/apache/fop/fo/flow/FoTableBody.java | 14 ++++++------ .../apache/fop/fo/flow/FoTableCaption.java | 10 ++++----- .../org/apache/fop/fo/flow/FoTableCell.java | 10 ++++----- .../org/apache/fop/fo/flow/FoTableFooter.java | 14 ++++++------ .../org/apache/fop/fo/flow/FoTableHeader.java | 14 ++++++------ .../org/apache/fop/fo/flow/FoTableRow.java | 6 ++--- src/java/org/apache/fop/fo/flow/FoTitle.java | 14 ++++++------ .../org/apache/fop/fo/flow/FoWrapper.java | 10 ++++----- 32 files changed, 176 insertions(+), 176 deletions(-) diff --git a/src/java/org/apache/fop/fo/flow/FoBasicLink.java b/src/java/org/apache/fop/fo/flow/FoBasicLink.java index b3a3b7133..5aae317f5 100644 --- a/src/java/org/apache/fop/fo/flow/FoBasicLink.java +++ b/src/java/org/apache/fop/fo/flow/FoBasicLink.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -171,8 +171,8 @@ public class FoBasicLink extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -180,8 +180,8 @@ public class FoBasicLink extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoBidiOverride.java b/src/java/org/apache/fop/fo/flow/FoBidiOverride.java index 1064e3db8..2c07da62c 100644 --- a/src/java/org/apache/fop/fo/flow/FoBidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/FoBidiOverride.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -157,8 +157,8 @@ public class FoBidiOverride extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -166,8 +166,8 @@ public class FoBidiOverride extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoBlock.java b/src/java/org/apache/fop/fo/flow/FoBlock.java index 8d4395608..161425fcd 100644 --- a/src/java/org/apache/fop/fo/flow/FoBlock.java +++ b/src/java/org/apache/fop/fo/flow/FoBlock.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -183,9 +183,9 @@ public class FoBlock extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -193,8 +193,8 @@ public class FoBlock extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoBlockContainer.java b/src/java/org/apache/fop/fo/flow/FoBlockContainer.java index 61a74b614..04a6fb2bd 100644 --- a/src/java/org/apache/fop/fo/flow/FoBlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/FoBlockContainer.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -173,8 +173,8 @@ public class FoBlockContainer extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -186,8 +186,8 @@ public class FoBlockContainer extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoFloat.java b/src/java/org/apache/fop/fo/flow/FoFloat.java index cb968f624..42e851501 100644 --- a/src/java/org/apache/fop/fo/flow/FoFloat.java +++ b/src/java/org/apache/fop/fo/flow/FoFloat.java @@ -67,7 +67,7 @@ import org.apache.fop.fo.FObjects; import org.apache.fop.fo.PropNames; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -150,8 +150,8 @@ public class FoFloat extends FONode { foTree, this, (FoXmlEvent)ev, stateFlags | FONode.MC_FLOAT); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -164,8 +164,8 @@ public class FoFloat extends FONode { foTree, this, (FoXmlEvent)ev, stateFlags | FONode.MC_FLOAT); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoFlow.java b/src/java/org/apache/fop/fo/flow/FoFlow.java index e22a517cd..e422792c3 100644 --- a/src/java/org/apache/fop/fo/flow/FoFlow.java +++ b/src/java/org/apache/fop/fo/flow/FoFlow.java @@ -67,7 +67,7 @@ import org.apache.fop.fo.FObjects; import org.apache.fop.fo.PropNames; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -132,8 +132,8 @@ public class FoFlow extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, FONode.FLOW_SET); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { ev = xmlevents.expectBlock(); @@ -144,8 +144,8 @@ public class FoFlow extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, FONode.FLOW_SET); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoFootnote.java b/src/java/org/apache/fop/fo/flow/FoFootnote.java index 8a8514929..310efe9ed 100644 --- a/src/java/org/apache/fop/fo/flow/FoFootnote.java +++ b/src/java/org/apache/fop/fo/flow/FoFootnote.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:footnote flow object. @@ -156,8 +156,8 @@ public class FoFootnote extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags | FONode.MC_FOOTNOTE); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Look for the footnote-body if ((ev = xmlevents.expectStartElement @@ -167,8 +167,8 @@ public class FoFootnote extends FONode { new FoFootnoteBody( getFOTree(), this, (FoXmlEvent)ev, stateFlags | FONode.MC_FOOTNOTE); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); /* } catch (NoSuchElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoFootnoteBody.java b/src/java/org/apache/fop/fo/flow/FoFootnoteBody.java index ad208dd16..7d0710628 100644 --- a/src/java/org/apache/fop/fo/flow/FoFootnoteBody.java +++ b/src/java/org/apache/fop/fo/flow/FoFootnoteBody.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -147,8 +147,8 @@ public class FoFootnoteBody extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -160,8 +160,8 @@ public class FoFootnoteBody extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoInline.java b/src/java/org/apache/fop/fo/flow/FoInline.java index 588b0876a..1873402c8 100644 --- a/src/java/org/apache/fop/fo/flow/FoInline.java +++ b/src/java/org/apache/fop/fo/flow/FoInline.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -172,9 +172,9 @@ public class FoInline extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -182,8 +182,8 @@ public class FoInline extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoInlineContainer.java b/src/java/org/apache/fop/fo/flow/FoInlineContainer.java index 350630eb9..6ac8129a1 100644 --- a/src/java/org/apache/fop/fo/flow/FoInlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/FoInlineContainer.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -170,8 +170,8 @@ public class FoInlineContainer extends FONode { foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -183,8 +183,8 @@ public class FoInlineContainer extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoLeader.java b/src/java/org/apache/fop/fo/flow/FoLeader.java index 01f561bd4..225b331a4 100644 --- a/src/java/org/apache/fop/fo/flow/FoLeader.java +++ b/src/java/org/apache/fop/fo/flow/FoLeader.java @@ -66,7 +66,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -181,9 +181,9 @@ public class FoLeader extends FONode { foTree, this, ev, stateFlags | FONode.MC_LEADER); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -191,8 +191,8 @@ public class FoLeader extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoListBlock.java b/src/java/org/apache/fop/fo/flow/FoListBlock.java index 6a4634abb..7220e6a7a 100644 --- a/src/java/org/apache/fop/fo/flow/FoListBlock.java +++ b/src/java/org/apache/fop/fo/flow/FoListBlock.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:list-block flow object. @@ -165,8 +165,8 @@ public class FoListBlock extends FONode { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more table-rows @@ -177,8 +177,8 @@ public class FoListBlock extends FONode { new FoListItem(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numItems++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numItems > 0) { diff --git a/src/java/org/apache/fop/fo/flow/FoListItem.java b/src/java/org/apache/fop/fo/flow/FoListItem.java index c83a851ba..541fccbf1 100644 --- a/src/java/org/apache/fop/fo/flow/FoListItem.java +++ b/src/java/org/apache/fop/fo/flow/FoListItem.java @@ -65,7 +65,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:list-item flow object. @@ -157,8 +157,8 @@ public class FoListItem extends FONode { ("No list-item-label in list-item."); new FoListItemLabel( getFOTree(), this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Look for one list-item-body if ((ev = xmlevents.expectStartElement @@ -167,8 +167,8 @@ public class FoListItem extends FONode { throw new FOPException ("No list-item-body in list-item."); new FoListItemBody(getFOTree(), this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } catch(TreeException e) { throw new FOPException("TreeException: " + e.getMessage()); diff --git a/src/java/org/apache/fop/fo/flow/FoListItemBody.java b/src/java/org/apache/fop/fo/flow/FoListItemBody.java index a0c2f471b..bc2e73e59 100644 --- a/src/java/org/apache/fop/fo/flow/FoListItemBody.java +++ b/src/java/org/apache/fop/fo/flow/FoListItemBody.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -149,8 +149,8 @@ public class FoListItemBody extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -161,8 +161,8 @@ public class FoListItemBody extends FONode { // Generate the flow object FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoListItemLabel.java b/src/java/org/apache/fop/fo/flow/FoListItemLabel.java index 90147d462..8b4be53ab 100644 --- a/src/java/org/apache/fop/fo/flow/FoListItemLabel.java +++ b/src/java/org/apache/fop/fo/flow/FoListItemLabel.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -149,8 +149,8 @@ public class FoListItemLabel extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -161,8 +161,8 @@ public class FoListItemLabel extends FONode { // Generate the flow object FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoMarker.java b/src/java/org/apache/fop/fo/flow/FoMarker.java index 36d3ed99c..f1a3509c4 100644 --- a/src/java/org/apache/fop/fo/flow/FoMarker.java +++ b/src/java/org/apache/fop/fo/flow/FoMarker.java @@ -65,7 +65,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -139,9 +139,9 @@ public class FoMarker extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -149,8 +149,8 @@ public class FoMarker extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoMultiCase.java b/src/java/org/apache/fop/fo/flow/FoMultiCase.java index 849ba0546..74e8ef2f1 100644 --- a/src/java/org/apache/fop/fo/flow/FoMultiCase.java +++ b/src/java/org/apache/fop/fo/flow/FoMultiCase.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -155,9 +155,9 @@ public class FoMultiCase extends FONode { (foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -165,8 +165,8 @@ public class FoMultiCase extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoMultiProperties.java b/src/java/org/apache/fop/fo/flow/FoMultiProperties.java index bebdc845c..1a3ed1a87 100644 --- a/src/java/org/apache/fop/fo/flow/FoMultiProperties.java +++ b/src/java/org/apache/fop/fo/flow/FoMultiProperties.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:multi-properties flow object. @@ -147,8 +147,8 @@ public class FoMultiProperties extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numSets++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numSets == 0) @@ -162,8 +162,8 @@ public class FoMultiProperties extends FONode { throw new FOPException ("No wrapper in multi-properties."); new FoWrapper(getFOTree(), this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); /* } catch (NoSuchElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoMultiSwitch.java b/src/java/org/apache/fop/fo/flow/FoMultiSwitch.java index 37236860d..6a1f30256 100644 --- a/src/java/org/apache/fop/fo/flow/FoMultiSwitch.java +++ b/src/java/org/apache/fop/fo/flow/FoMultiSwitch.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:multi-switch flow object. @@ -147,8 +147,8 @@ public class FoMultiSwitch extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numCases++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numCases == 0) diff --git a/src/java/org/apache/fop/fo/flow/FoMultiToggle.java b/src/java/org/apache/fop/fo/flow/FoMultiToggle.java index 32a510795..548f91f42 100644 --- a/src/java/org/apache/fop/fo/flow/FoMultiToggle.java +++ b/src/java/org/apache/fop/fo/flow/FoMultiToggle.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -152,9 +152,9 @@ public class FoMultiToggle extends FONode { (foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) { ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); + XmlEventReader.DISCARD_EV, ev); } - namespaces.surrenderEvent(ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -162,8 +162,8 @@ public class FoMultiToggle extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoPageSequence.java b/src/java/org/apache/fop/fo/flow/FoPageSequence.java index 0de0506af..c352c3895 100644 --- a/src/java/org/apache/fop/fo/flow/FoPageSequence.java +++ b/src/java/org/apache/fop/fo/flow/FoPageSequence.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:simple-page-master flow object @@ -152,8 +152,8 @@ public class FoPageSequence extends FONode { // process the title title = numChildren(); new FoTitle(getFOTree(), this, (FoXmlEvent)ev); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // else ignore // Look for zero or more static-content @@ -165,8 +165,8 @@ public class FoPageSequence extends FONode { if (firstStaticContent != -1) firstStaticContent = numChildren(); new FoStaticContent(getFOTree(), this, (FoXmlEvent)ev); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more page-sequence @@ -178,15 +178,15 @@ public class FoPageSequence extends FONode { throw new FOPException("No flow found."); firstFlow = numChildren(); new FoFlow(getFOTree(), this, (FoXmlEvent)ev); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); while ((ev = xmlevents.expectStartElement (FObjectNames.FLOW, XmlEvent.DISCARD_W_SPACE)) != null) { // Loop over remaining fo:page-sequences new FoFlow(getFOTree(), this, (FoXmlEvent)ev); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch (NoSuchElementException e) { throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoStaticContent.java b/src/java/org/apache/fop/fo/flow/FoStaticContent.java index 6a22a51f1..21c44d656 100644 --- a/src/java/org/apache/fop/fo/flow/FoStaticContent.java +++ b/src/java/org/apache/fop/fo/flow/FoStaticContent.java @@ -67,7 +67,7 @@ import org.apache.fop.fo.FObjects; import org.apache.fop.fo.PropNames; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -134,8 +134,8 @@ public class FoStaticContent extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, FONode.STATIC_SET); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s while ((ev = xmlevents.expectBlock()) != null) { // Generate the flow object @@ -143,8 +143,8 @@ public class FoStaticContent extends FONode { //("Generating subsequent block for static-content."); FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, FONode.STATIC_SET); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoTable.java b/src/java/org/apache/fop/fo/flow/FoTable.java index 04ade070c..1d120c260 100644 --- a/src/java/org/apache/fop/fo/flow/FoTable.java +++ b/src/java/org/apache/fop/fo/flow/FoTable.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table flow object. @@ -186,8 +186,8 @@ public class FoTable extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numColumns++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for optional table-header @@ -198,8 +198,8 @@ public class FoTable extends FONode { new FoTableHeader( getFOTree(), this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for optional table-footer @@ -210,8 +210,8 @@ public class FoTable extends FONode { new FoTableFooter( getFOTree(), this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more table-body @@ -223,8 +223,8 @@ public class FoTable extends FONode { firstBodyOffset = numChildren(); new FoTableBody(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numBodies++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); while ((ev = xmlevents.expectStartElement (FObjectNames.TABLE_BODY, XmlEvent.DISCARD_W_SPACE)) != null) { @@ -233,8 +233,8 @@ public class FoTable extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numBodies++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(TreeException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoTableAndCaption.java b/src/java/org/apache/fop/fo/flow/FoTableAndCaption.java index d33b39900..4680cdd52 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableAndCaption.java +++ b/src/java/org/apache/fop/fo/flow/FoTableAndCaption.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table-and-caption flow object. @@ -167,8 +167,8 @@ public class FoTableAndCaption extends FONode { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for optional table-caption @@ -179,8 +179,8 @@ public class FoTableAndCaption extends FONode { new FoTableCaption( getFOTree(), this, (FoXmlEvent)ev, stateFlags); captionOffset = numMarkers; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one table @@ -191,8 +191,8 @@ public class FoTableAndCaption extends FONode { throw new FOPException("No table found."); tableOffset = numChildren(); new FoTable(getFOTree(), this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); /* } catch (NoSuchElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoTableBody.java b/src/java/org/apache/fop/fo/flow/FoTableBody.java index 53196a67d..f02145cd9 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableBody.java +++ b/src/java/org/apache/fop/fo/flow/FoTableBody.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table-body flow object. @@ -167,8 +167,8 @@ public class FoTableBody extends FONode { != null) { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more table-rows @@ -179,8 +179,8 @@ public class FoTableBody extends FONode { new FoTableRow(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numRows++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numRows > 0) { @@ -194,8 +194,8 @@ public class FoTableBody extends FONode { new FoTableCell( getFOTree(), this, (FoXmlEvent)ev, stateFlags); numCells++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numCells == 0) throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoTableCaption.java b/src/java/org/apache/fop/fo/flow/FoTableCaption.java index eb517e67f..276b05e23 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableCaption.java +++ b/src/java/org/apache/fop/fo/flow/FoTableCaption.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -159,8 +159,8 @@ public class FoTableCaption extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -172,8 +172,8 @@ public class FoTableCaption extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoTableCell.java b/src/java/org/apache/fop/fo/flow/FoTableCell.java index c9621826a..174e673a6 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableCell.java +++ b/src/java/org/apache/fop/fo/flow/FoTableCell.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.fo.PropertySets; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -168,8 +168,8 @@ public class FoTableCell extends FONode { FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); // Clear the blockage - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); // Get the rest of the %block;s do { if ((stateFlags & FONode.MC_OUT_OF_LINE) == 0) @@ -180,8 +180,8 @@ public class FoTableCell extends FONode { // Generate the flow object FObjects.fobjects.makeFlowObject( foTree, this, (FoXmlEvent)ev, stateFlags); - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); } catch(UnexpectedStartElementException e) { diff --git a/src/java/org/apache/fop/fo/flow/FoTableFooter.java b/src/java/org/apache/fop/fo/flow/FoTableFooter.java index 041630ff0..54b2fc80d 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableFooter.java +++ b/src/java/org/apache/fop/fo/flow/FoTableFooter.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table-footer flow object. @@ -167,8 +167,8 @@ public class FoTableFooter extends FONode { != null) { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more table-rows @@ -178,8 +178,8 @@ public class FoTableFooter extends FONode { != null) { new FoTableRow(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numRows++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numRows > 0) { @@ -194,8 +194,8 @@ public class FoTableFooter extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numCells++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numCells == 0) throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoTableHeader.java b/src/java/org/apache/fop/fo/flow/FoTableHeader.java index c3eb37fff..ea2413476 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableHeader.java +++ b/src/java/org/apache/fop/fo/flow/FoTableHeader.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table-header flow object. @@ -167,8 +167,8 @@ public class FoTableHeader extends FONode { != null) { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } // Look for one or more table-rows @@ -178,8 +178,8 @@ public class FoTableHeader extends FONode { != null) { new FoTableRow(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numRows++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numRows > 0) { @@ -193,8 +193,8 @@ public class FoTableHeader extends FONode { new FoTableCell( getFOTree(), this, (FoXmlEvent)ev, stateFlags); numCells++; - ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + ev = xmlevents.getEndElement(XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numCells == 0) throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoTableRow.java b/src/java/org/apache/fop/fo/flow/FoTableRow.java index 161d54785..efb007dd3 100644 --- a/src/java/org/apache/fop/fo/flow/FoTableRow.java +++ b/src/java/org/apache/fop/fo/flow/FoTableRow.java @@ -68,7 +68,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; /** * Implements the fo:table-row flow object. @@ -166,8 +166,8 @@ public class FoTableRow extends FONode { getFOTree(), this, (FoXmlEvent)ev, stateFlags); numCells++; ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } if (numCells == 0) throw new FOPException diff --git a/src/java/org/apache/fop/fo/flow/FoTitle.java b/src/java/org/apache/fop/fo/flow/FoTitle.java index 15b5854e2..87180f933 100644 --- a/src/java/org/apache/fop/fo/flow/FoTitle.java +++ b/src/java/org/apache/fop/fo/flow/FoTitle.java @@ -69,7 +69,7 @@ import org.apache.fop.fo.PropertySets; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -126,8 +126,8 @@ public class FoTitle extends FONode { } } - /** The SyncedXmlEventsBuffer from which events are drawn. */ - private SyncedXmlEventsBuffer xmlevents; + /** The XmlEventReader from which events are drawn. */ + private XmlEventReader xmlevents; /** * Construct an fo:title node, and build the fo:title subtree. @@ -152,8 +152,8 @@ public class FoTitle extends FONode { foTree, this, ev, FONode.TITLE_SET); if (ev.getType() != XmlEvent.CHARACTERS) ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -161,8 +161,8 @@ public class FoTitle extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); diff --git a/src/java/org/apache/fop/fo/flow/FoWrapper.java b/src/java/org/apache/fop/fo/flow/FoWrapper.java index 3e6371f49..e7c05ce91 100644 --- a/src/java/org/apache/fop/fo/flow/FoWrapper.java +++ b/src/java/org/apache/fop/fo/flow/FoWrapper.java @@ -65,7 +65,7 @@ import org.apache.fop.fo.PropNames; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; -import org.apache.fop.xml.SyncedXmlEventsBuffer; +import org.apache.fop.xml.XmlEventReader; import org.apache.fop.xml.UnexpectedStartElementException; /** @@ -137,8 +137,8 @@ public class FoWrapper extends FONode { foTree, this, ev, stateFlags); if (ev.getType() != XmlEvent.CHARACTERS) ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } catch(UnexpectedStartElementException e) { ev = xmlevents.getStartElement(); @@ -146,8 +146,8 @@ public class FoWrapper extends FONode { ("Ignoring unexpected Start Element: " + ev.getQName()); ev = xmlevents.getEndElement( - SyncedXmlEventsBuffer.DISCARD_EV, ev); - namespaces.surrenderEvent(ev); + XmlEventReader.DISCARD_EV, ev); + namespaces.relinquishEvent(ev); } } while (ev != null); -- 2.39.5