]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
added recursive removeID method. This method assumes that FObj's are only children...
authorJordan Naftolin <jordan@apache.org>
Thu, 13 Jul 2000 17:36:50 +0000 (17:36 +0000)
committerJordan Naftolin <jordan@apache.org>
Thu, 13 Jul 2000 17:36:50 +0000 (17:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193498 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/FObj.java

index b44c9c7664911813010fe827910e22c423b222bf..274d2de9a073d740d6d9d43781916dfbab903d7a 100644 (file)
@@ -54,6 +54,7 @@ package org.apache.fop.fo;
 // FOP
 import org.apache.fop.layout.Area;
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.datatypes.IDReferences;
 
 // Java
 import java.util.Hashtable;
@@ -118,5 +119,22 @@ public class FObj extends FONode {
        return(properties.get(name));
     }
 
+    
+
+    public void removeID(IDReferences idReferences)
+    {
+        idReferences.removeID( ((FObj)this).properties.get("id").getString());                            
+        int numChildren = this.children.size();
+       for (int i = 0; i < numChildren; i++) 
+        {            
+            FONode child= (FONode)children.elementAt(i);
+            if ((child instanceof FObj))   
+            {
+                child.removeID(idReferences);            
+            }  
+       }
+    }
+
+
 }