From 19d16a6818467fae19dcf9c208c46d01185b38be Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Wed, 21 Jan 2004 10:59:35 +0000 Subject: [PATCH] getMarkers - Javadoc comment added relinquish(event) problem fixed git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197233 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FONode.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 5f3a232b1..8d3775b76 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -606,17 +606,21 @@ public class FONode extends Node{ } } + /** + * Gets the fo:marker elements (if any) defined in the this node. Any + * fo:marker events found are relinquished. + * @return the number of markers found + * @throws FOPException + */ public int getMarkers() throws FOPException { XmlEvent ev; - try { while ((ev = xmlevents.expectStartElement (FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE)) != null) { new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags); numMarkers++; - ev = xmlevents.getEndElement( - XmlEventReader.DISCARD_EV, ev); + // Relinquish the original event namespaces.relinquishEvent(ev); } } catch (TreeException e) { -- 2.39.5