]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
getMarkers -
authorPeter Bernard West <pbwest@apache.org>
Wed, 21 Jan 2004 10:59:35 +0000 (10:59 +0000)
committerPeter Bernard West <pbwest@apache.org>
Wed, 21 Jan 2004 10:59:35 +0000 (10:59 +0000)
 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

index 5f3a232b1a57a467d240756eab2e5e275ab42d15..8d3775b761661a7673d619182739c91bea1c2dc3 100644 (file)
@@ -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) {