You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2007/07/07 02:04:29 UTC

svn commit: r554094 [1/2] - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/area/ src/java/org/apache/fop/fo/ src/java/org/apache/fop/fo/flow/ src/java/org/apache/fop/fo/pagination/ src/java/org/apache/fop/layoutmgr/ src/java/org/apache/fop/layou...

Author: adelmelle
Date: Fri Jul  6 17:04:25 2007
New Revision: 554094

URL: http://svn.apache.org/viewvc?view=rev&rev=554094
Log:
Bugzilla 42089: Cleanup and restructuring (suggested by Adrian Cumiskey)

Added:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java   (with props)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreaker.java   (with props)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageProvider.java   (with props)
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BasicLink.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BlockContainer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InitialPropertySet.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineContainer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineLevel.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListBlock.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListItem.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiCase.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiProperties.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiSwitch.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Table.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableAndCaption.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCaption.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableFObj.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableRow.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Wrapper.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequence.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java Fri Jul  6 17:04:25 2007
@@ -21,12 +21,7 @@
 
 // Java
 import java.io.OutputStream;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.HashSet;
 import java.util.Iterator;
 
 // XML
@@ -65,34 +60,24 @@
  * type of renderer.
  */
 public class AreaTreeHandler extends FOEventHandler {
+    
+    private static Log log = LogFactory.getLog(AreaTreeHandler.class);
 
-    /** debug statistics */
+    // Recorder of debug statistics
     private Statistics statistics = null;
 
-    private static Log log = LogFactory.getLog(AreaTreeHandler.class);
-
-    // the LayoutManager maker
+    // The LayoutManager maker
     private LayoutManagerMaker lmMaker;
 
-    /** AreaTreeModel in use */
+    /** The AreaTreeModel in use */
     protected AreaTreeModel model;
 
+    // Keeps track of all meaningful id references
+    private IDTracker idTracker;
+
     // The fo:root node of the document
     private Root rootFObj;
-
-    // HashMap of ID's whose area is located on one or more consecutive
-    // PageViewports. Each ID has an arraylist of PageViewports that
-    // form the defined area of this ID
-    private Map idLocations = new HashMap();
-
-    // idref's whose target PageViewports have yet to be identified
-    // Each idref has a HashSet of Resolvable objects containing that idref
-    private Map unresolvedIDRefs = new HashMap();
-
-    private Set unfinishedIDs = new HashSet();
-
-    private Set alreadyResolvedIDs = new HashSet();
-
+    
     // The formatting results to be handed back to the caller.
     private FormattingResults results = new FormattingResults();
 
@@ -120,6 +105,8 @@
             lmMaker = new LayoutManagerMapping();
         }
 
+        idTracker = new IDTracker();
+        
         if (log.isDebugEnabled()) {
             statistics = new Statistics();
         }
@@ -159,137 +146,12 @@
     }
 
     /**
-     * Tie a PageViewport with an ID found on a child area of the PV. Note that
-     * an area with a given ID may be on more than one PV, hence an ID may have
-     * more than one PV associated with it.
-     * 
-     * @param id the property ID of the area
-     * @param pv a page viewport that contains the area with this ID
-     */
-    public void associateIDWithPageViewport(String id, PageViewport pv) {
-        if (log.isDebugEnabled()) {
-            log.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
-        }
-        List pvList = (List) idLocations.get(id);
-        if (pvList == null) { // first time ID located
-            pvList = new ArrayList();
-            idLocations.put(id, pvList);
-            pvList.add(pv);
-            // signal the PageViewport that it is the first PV to contain this id:
-            pv.setFirstWithID(id);
-            /*
-             * See if this ID is in the unresolved idref list, if so resolve
-             * Resolvable objects tied to it.
-             */
-            if (!unfinishedIDs.contains(id)) {
-                tryIDResolution(id, pv, pvList);
-            }
-        } else {
-            pvList.add(pv);
-        }
-    }
-
-    /**
-     * This method tie an ID to the areaTreeHandler until this one is ready to
-     * be processed. This is used in page-number-citation-last processing so we
-     * know when an id can be resolved.
+     * Get the IDTracker for this area tree.
      * 
-     * @param id the id of the object being processed
+     * @return IDTracker used to track reference ids for items in this area tree
      */
-    public void signalPendingID(String id) {
-        if (log.isDebugEnabled()) {
-            log.debug("signalPendingID(" + id + ")");
-        }
-        unfinishedIDs.add(id);
-    }
-
-    /**
-     * Signals that all areas for the formatting object with the given ID have
-     * been generated. This is used to determine when page-number-citation-last
-     * ref-ids can be resolved.
-     * 
-     * @param id the id of the formatting object which was just finished
-     */
-    public void signalIDProcessed(String id) {
-        if (log.isDebugEnabled()) {
-            log.debug("signalIDProcessed(" + id + ")");
-        }
-
-        alreadyResolvedIDs.add(id);
-        if (!unfinishedIDs.contains(id)) {
-            return;
-        }
-        unfinishedIDs.remove(id);
-
-        List pvList = (List) idLocations.get(id);
-        Set todo = (Set) unresolvedIDRefs.get(id);
-        if (todo != null) {
-            for (Iterator iter = todo.iterator(); iter.hasNext();) {
-                Resolvable res = (Resolvable) iter.next();
-                res.resolveIDRef(id, pvList);
-            }
-            unresolvedIDRefs.remove(id);
-        }
-    }
-
-    /**
-     * Check if an ID has already been resolved
-     * 
-     * @param id the id to check
-     * @return true if the ID has been resolved
-     */
-    public boolean alreadyResolvedID(String id) {
-        return (alreadyResolvedIDs.contains(id));
-    }
-
-    /**
-     * Tries to resolve all unresolved ID references on the given page.
-     * 
-     * @param id ID to resolve
-     * @param pv page viewport whose ID refs to resolve
-     * @param List of PageViewports
-     */
-    private void tryIDResolution(String id, PageViewport pv, List pvList) {
-        Set todo = (Set) unresolvedIDRefs.get(id);
-        if (todo != null) {
-            for (Iterator iter = todo.iterator(); iter.hasNext();) {
-                Resolvable res = (Resolvable) iter.next();
-                if (!unfinishedIDs.contains(id)) {
-                    res.resolveIDRef(id, pvList);
-                } else {
-                    return;
-                }
-            }
-            alreadyResolvedIDs.add(id);
-            unresolvedIDRefs.remove(id);
-        }
-    }
-
-    /**
-     * Tries to resolve all unresolved ID references on the given page.
-     * 
-     * @param pv page viewport whose ID refs to resolve
-     */
-    public void tryIDResolution(PageViewport pv) {
-        String[] ids = pv.getIDRefs();
-        if (ids != null) {
-            for (int i = 0; i < ids.length; i++) {
-                List pvList = (List) idLocations.get(ids[i]);
-                if (pvList != null) {
-                    tryIDResolution(ids[i], pv, pvList);
-                }
-            }
-        }
-    }
-
-    /**
-     * Get the list of page viewports that have an area with a given id.
-     * 
-     * @param id the id to lookup
-     * @return the list of PageViewports
-     */
-    public List getPageViewportsContainingID(String id) {
-        return (List) idLocations.get(id);
+    public IDTracker getIDTracker() {
+        return idTracker;
     }
 
     /**
@@ -302,22 +164,6 @@
     }
 
     /**
-     * Add an Resolvable object with an unresolved idref
-     * 
-     * @param idref the idref whose target id has not yet been located
-     * @param res the Resolvable object needing the idref to be resolved
-     */
-    public void addUnresolvedIDRef(String idref, Resolvable res) {
-        Set todo = (Set) unresolvedIDRefs.get(idref);
-        if (todo == null) {
-            todo = new HashSet();
-            unresolvedIDRefs.put(idref, todo);
-        }
-        // add Resolvable object to this HashSet
-        todo.add(res);
-    }
-
-    /**
      * Prepare AreaTreeHandler for document processing This is called from
      * FOTreeBuilder.startDocument()
      * 
@@ -453,12 +299,13 @@
             Resolvable res = (Resolvable) odi;
             String[] ids = res.getIDRefs();
             for (int count = 0; count < ids.length; count++) {
-                if (idLocations.containsKey(ids[count])) {
-                    res.resolveIDRef(ids[count], (List) idLocations.get(ids[count]));
+                List pageVPList = idTracker.getPageViewportsContainingID(ids[count]);
+                if (pageVPList != null) {
+                    res.resolveIDRef(ids[count], pageVPList);
                 } else {
                     log.warn(odi.getName() + ": Unresolved id reference \""
                             + ids[count] + "\" found.");
-                    addUnresolvedIDRef(ids[count], res);
+                    idTracker.addUnresolvedIDRef(ids[count], res);
                 }
             }
             // check to see if ODI is now fully resolved, if so process it
@@ -481,9 +328,86 @@
     }
 
     /**
-     * Gather statistics when log is debug
+     * Tie a PageViewport with an ID found on a child area of the PV. Note that
+     * an area with a given ID may be on more than one PV, hence an ID may have
+     * more than one PV associated with it.
+     * 
+     * @param id the property ID of the area
+     * @param pv a page viewport that contains the area with this ID
+     * @deprecated use getIdTracker().associateIDWithPageViewport(id, pv) instead
+     */
+    public void associateIDWithPageViewport(String id, PageViewport pv) {
+        idTracker.associateIDWithPageViewport(id, pv);
+    }
+
+    /**
+     * This method tie an ID to the areaTreeHandler until this one is ready to
+     * be processed. This is used in page-number-citation-last processing so we
+     * know when an id can be resolved.
+     * 
+     * @param id the id of the object being processed
+     * @deprecated use getIdTracker().signalPendingID(id) instead
+     */
+    public void signalPendingID(String id) {
+        idTracker.signalPendingID(id);
+    }
+
+    /**
+     * Signals that all areas for the formatting object with the given ID have
+     * been generated. This is used to determine when page-number-citation-last
+     * ref-ids can be resolved.
+     * 
+     * @param id the id of the formatting object which was just finished
+     * @deprecated use getIdTracker().signalIDProcessed(id) instead
+     */
+    public void signalIDProcessed(String id) {
+        idTracker.signalIDProcessed(id);
+    }
+
+    /**
+     * Check if an ID has already been resolved
+     * 
+     * @param id the id to check
+     * @return true if the ID has been resolved
+     * @deprecated use getIdTracker().alreadyResolvedID(id) instead
      */
-    private final class Statistics {
+    public boolean alreadyResolvedID(String id) {
+        return idTracker.alreadyResolvedID(id);
+    }
+
+    /**
+     * Tries to resolve all unresolved ID references on the given page.
+     * 
+     * @param pv page viewport whose ID refs to resolve
+     * @deprecated use getIdTracker().tryIDResolution(pv) instead
+     */
+    public void tryIDResolution(PageViewport pv) {
+        idTracker.tryIDResolution(pv);
+    }
+
+    /**
+     * Get the list of page viewports that have an area with a given id.
+     * 
+     * @param id the id to lookup
+     * @return the list of PageViewports
+     * @deprecated use getIdTracker().getPageViewportsContainingID(id) instead
+     */
+    public List getPageViewportsContainingID(String id) {
+        return idTracker.getPageViewportsContainingID(id);
+    }
+
+    /**
+     * Add an Resolvable object with an unresolved idref
+     * 
+     * @param idref the idref whose target id has not yet been located
+     * @param res the Resolvable object needing the idref to be resolved
+     * @deprecated use getIdTracker().addUnresolvedIDRef(idref, res) instead
+     */
+    public void addUnresolvedIDRef(String idref, Resolvable res) {
+        idTracker.addUnresolvedIDRef(idref, res);
+    }
+    
+    private class Statistics {
         // for statistics gathering
         private Runtime runtime;
 
@@ -493,21 +417,34 @@
         // time used in rendering (for statistics)
         private long startTime;
 
-        private Statistics() {
-            runtime = Runtime.getRuntime();
-        }
-
-        public void start() {
-            initialMemory = runtime.totalMemory() - runtime.freeMemory();
-            startTime = System.currentTimeMillis();
-        }
-
-        public void end() {
+        /**
+         * Default constructor
+         * @param areaTreeHandler area tree handler
+         */
+        protected Statistics() {
+            this.runtime = Runtime.getRuntime();
+        }
+
+        /**
+         * starts the area tree handler statistics gathering
+         */
+        protected void start() {
+            this.initialMemory = runtime.totalMemory() - runtime.freeMemory();
+            this.startTime = System.currentTimeMillis();
+        }
+
+        /**
+         * ends the area tree handler statistics gathering
+         */
+        protected void end() {
             long memoryNow = runtime.totalMemory() - runtime.freeMemory();
             log.debug("Current heap size: " + (memoryNow / 1024L) + "KB");
         }
 
-        public void logResults() {
+        /**
+         * logs the results of the area tree handler statistics gathering
+         */
+        protected void logResults() {
             long memoryNow = runtime.totalMemory() - runtime.freeMemory();
             long memoryUsed = (memoryNow - initialMemory) / 1024L;
             long timeUsed = System.currentTimeMillis() - startTime;

Added: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java?view=auto&rev=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java (added)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java Fri Jul  6 17:04:25 2007
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.area;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Used by the AreaTreeHandler to keep track of ID reference usage
+ * on a PageViewport level.
+ */
+public class IDTracker {
+    
+    private static Log log = LogFactory.getLog(IDTracker.class);
+
+    // HashMap of ID's whose area is located on one or more consecutive
+    // PageViewports. Each ID has an arraylist of PageViewports that
+    // form the defined area of this ID
+    private Map idLocations = new HashMap();
+
+    // idref's whose target PageViewports have yet to be identified
+    // Each idref has a HashSet of Resolvable objects containing that idref
+    private Map unresolvedIDRefs = new HashMap();
+
+    private Set unfinishedIDs = new HashSet();
+
+    private Set alreadyResolvedIDs = new HashSet();
+    
+    /**
+     * Tie a PageViewport with an ID found on a child area of the PV. Note that
+     * an area with a given ID may be on more than one PV, hence an ID may have
+     * more than one PV associated with it.
+     * 
+     * @param id the property ID of the area
+     * @param pv a page viewport that contains the area with this ID
+     */
+    public void associateIDWithPageViewport(String id, PageViewport pv) {
+        if (log.isDebugEnabled()) {
+            log.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
+        }
+        List pvList = (List) idLocations.get(id);
+        if (pvList == null) { // first time ID located
+            pvList = new ArrayList();
+            idLocations.put(id, pvList);
+            pvList.add(pv);
+            // signal the PageViewport that it is the first PV to contain this id:
+            pv.setFirstWithID(id);
+            /*
+             * See if this ID is in the unresolved idref list, if so resolve
+             * Resolvable objects tied to it.
+             */
+            if (!unfinishedIDs.contains(id)) {
+                tryIDResolution(id, pv, pvList);
+            }
+        } else {
+            pvList.add(pv);
+        }
+    }
+
+    /**
+     * This method tie an ID to the areaTreeHandler until this one is ready to
+     * be processed. This is used in page-number-citation-last processing so we
+     * know when an id can be resolved.
+     * 
+     * @param id the id of the object being processed
+     */
+    public void signalPendingID(String id) {
+        if (log.isDebugEnabled()) {
+            log.debug("signalPendingID(" + id + ")");
+        }
+        unfinishedIDs.add(id);
+    }
+
+    /**
+     * Signals that all areas for the formatting object with the given ID have
+     * been generated. This is used to determine when page-number-citation-last
+     * ref-ids can be resolved.
+     * 
+     * @param id the id of the formatting object which was just finished
+     */
+    public void signalIDProcessed(String id) {
+        if (log.isDebugEnabled()) {
+            log.debug("signalIDProcessed(" + id + ")");
+        }
+
+        alreadyResolvedIDs.add(id);
+        if (!unfinishedIDs.contains(id)) {
+            return;
+        }
+        unfinishedIDs.remove(id);
+
+        List pvList = (List) idLocations.get(id);
+        Set todo = (Set) unresolvedIDRefs.get(id);
+        if (todo != null) {
+            for (Iterator iter = todo.iterator(); iter.hasNext();) {
+                Resolvable res = (Resolvable) iter.next();
+                res.resolveIDRef(id, pvList);
+            }
+            unresolvedIDRefs.remove(id);
+        }
+    }
+    
+    /**
+     * Check if an ID has already been resolved
+     * 
+     * @param id the id to check
+     * @return true if the ID has been resolved
+     */
+    public boolean alreadyResolvedID(String id) {
+        return (alreadyResolvedIDs.contains(id));
+    }
+    
+    /**
+     * Tries to resolve all unresolved ID references on the given page.
+     * 
+     * @param id ID to resolve
+     * @param pv page viewport whose ID refs to resolve
+     * @param List of PageViewports
+     */
+    private void tryIDResolution(String id, PageViewport pv, List pvList) {
+        Set todo = (Set) unresolvedIDRefs.get(id);
+        if (todo != null) {
+            for (Iterator iter = todo.iterator(); iter.hasNext();) {
+                Resolvable res = (Resolvable) iter.next();
+                if (!unfinishedIDs.contains(id)) {
+                    res.resolveIDRef(id, pvList);
+                } else {
+                    return;
+                }
+            }
+            alreadyResolvedIDs.add(id);
+            unresolvedIDRefs.remove(id);
+        }
+    }
+
+    /**
+     * Tries to resolve all unresolved ID references on the given page.
+     * 
+     * @param pv page viewport whose ID refs to resolve
+     */
+    public void tryIDResolution(PageViewport pv) {
+        String[] ids = pv.getIDRefs();
+        if (ids != null) {
+            for (int i = 0; i < ids.length; i++) {
+                List pvList = (List) idLocations.get(ids[i]);
+                if (pvList != null) {
+                    tryIDResolution(ids[i], pv, pvList);
+                }
+            }
+        }
+    }
+    
+    /**
+     * Get the list of page viewports that have an area with a given id.
+     * 
+     * @param id the id to lookup
+     * @return the list of PageViewports
+     */
+    public List getPageViewportsContainingID(String id) {
+        return (List) idLocations.get(id);
+    }
+    
+    /**
+     * Add an Resolvable object with an unresolved idref
+     * 
+     * @param idref the idref whose target id has not yet been located
+     * @param res the Resolvable object needing the idref to be resolved
+     */
+    public void addUnresolvedIDRef(String idref, Resolvable res) {
+        Set todo = (Set) unresolvedIDRefs.get(idref);
+        if (todo == null) {
+            todo = new HashSet();
+            unresolvedIDRefs.put(idref, todo);
+        }
+        // add Resolvable object to this HashSet
+        todo.add(res);
+    }        
+}

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java Fri Jul  6 17:04:25 2007
@@ -145,27 +145,28 @@
     /**
      * Check prepared pages
      *
-     * @param newpage the new page being added
+     * @param newPageViewport the new page being added
      * @param renderUnresolved render pages with unresolved idref's
      *          (done at end-of-document processing)
      * @return true if the current page should be rendered
      *         false if the renderer doesn't support out of order
      *         rendering and there are pending pages
      */
-    protected boolean checkPreparedPages(PageViewport newpage, boolean
+    protected boolean checkPreparedPages(PageViewport newPageViewport, boolean
         renderUnresolved) {
         for (Iterator iter = prepared.iterator(); iter.hasNext();) {
-            PageViewport p = (PageViewport)iter.next();
-            if (p.isResolved() || renderUnresolved) {
-                if (!renderer.supportsOutOfOrder() && p.getPageSequence().isFirstPage(p)) {
+            PageViewport pageViewport = (PageViewport)iter.next();
+            if (pageViewport.isResolved() || renderUnresolved) {
+                if (!renderer.supportsOutOfOrder()
+                        && pageViewport.getPageSequence().isFirstPage(pageViewport)) {
                     renderer.startPageSequence(this.currentPageSequence.getTitle());
                 }
                 try {
-                    renderer.renderPage(p);
-                    if (!p.isResolved()) {
-                        String[] idrefs = p.getIDRefs();
+                    renderer.renderPage(pageViewport);
+                    if (!pageViewport.isResolved()) {
+                        String[] idrefs = pageViewport.getIDRefs();
                         for (int count = 0; count < idrefs.length; count++) {
-                            log.warn("Page " + p.getPageNumberString()
+                            log.warn("Page " + pageViewport.getPageNumberString()
                                 + ": Unresolved id reference \"" + idrefs[count] 
                                 + "\" found.");
                         }
@@ -174,7 +175,7 @@
                     // use error handler to handle this FOP or IO Exception
                     log.error(e);
                 }
-                p.clear();
+                pageViewport.clear();
                 iter.remove();
             } else {
                 // if keeping order then stop at first page not resolved

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java Fri Jul  6 17:04:25 2007
@@ -60,6 +60,10 @@
     /** Markers added to this element. */
     private Map markers = null;
     
+    // The value of properties relevant for all fo objects
+    private String id = null;
+    // End of property values
+
     /**
      * Create a new formatting object.
      * All formatting object classes extend this class.
@@ -136,6 +140,17 @@
      * @throws FOPException if there is a problem binding the values
      */
     public void bind(PropertyList pList) throws FOPException {
+        id = pList.get(PR_ID).getString();
+    }
+
+    /**
+     * @see org.apache.fop.fo.FONode#startOfNode
+     * @throws FOPException FOP Exception
+     */
+    protected void startOfNode() throws FOPException {
+        if (id != null) {
+            checkId(id);
+        }
     }
 
     /**
@@ -147,7 +162,7 @@
      * @throws ValidationException if the ID is already defined elsewhere
      *                              (strict validation only)
      */
-    protected void checkId(String id) throws ValidationException {
+    private void checkId(String id) throws ValidationException {
         if (!inMarker() && !id.equals("")) {
             Set idrefs = getFOEventHandler().getIDReferences();
             if (!idrefs.contains(id)) {
@@ -190,7 +205,7 @@
     protected void addChildNode(FONode child) throws FOPException {
         if (canHaveMarkers() && child.getNameId() == FO_MARKER) {
             addMarker((Marker) child);
-        } else {
+        } else { 
             ExtensionAttachment attachment = child.getExtensionAttachment();
             if (attachment != null) {
                 /* This removes the element from the normal children, 
@@ -469,7 +484,16 @@
         return -1;
     }
     
+    /** @return the "id" property. */
+    public String getId() {
+        return id;
+    }
     
+    /** @return whether this object has an id set */
+    public boolean hasId() {
+        return id != null && id.length() > 0;
+    }
+
     /** @see org.apache.fop.fo.FONode#getNamespaceURI() */
     public String getNamespaceURI() {
         return FOElementMapping.URI;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java Fri Jul  6 17:04:25 2007
@@ -34,7 +34,6 @@
  */
 public abstract class AbstractListItemPart extends FObj {
     // The value of properties relevant for fo:list-item-label and fo:list-item-body.
-    private String id;
     private KeepProperty keepTogether;
     // Valid properties, commented out for performance:
     //   private CommonAccessibility commonAccessibility;
@@ -54,18 +53,11 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
+        super.bind(pList);
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
     }
 
     /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
      * XSL Content Model: marker* (%block;)+
      */
@@ -106,11 +98,5 @@
     public KeepProperty getKeepTogether() {
         return keepTogether;
     }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
-    }
-    
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BasicLink.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BasicLink.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BasicLink.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BasicLink.java Fri Jul  6 17:04:25 2007
@@ -128,6 +128,20 @@
         return externalDestination;
     }
 
+    /**
+     * @return whether or not this basic link has an internal destination or not
+     */
+    public boolean hasInternalDestination() {
+        return internalDestination != null && internalDestination.length() > 0;
+    }
+
+    /**
+     * @return whether or not this basic link has an external destination or not
+     */
+    public boolean hasExternalDestination() {
+        return externalDestination != null && externalDestination.length() > 0;
+    }
+
     /** @see org.apache.fop.fo.FObj#getLocalName() */
     public String getLocalName() {
         return "basic-link";

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java Fri Jul  6 17:04:25 2007
@@ -32,8 +32,6 @@
 import org.apache.fop.fo.NullCharIterator;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.ValidationException;
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 import org.apache.fop.fo.properties.CommonFont;
 import org.apache.fop.fo.properties.CommonHyphenation;
@@ -52,8 +50,6 @@
     private boolean initialPropertySetFound = false;
 
     // The value of properties relevant for fo:block.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
     private CommonHyphenation commonHyphenation;
@@ -64,7 +60,6 @@
     private Color color;
     private int hyphenationKeep;
     private Numeric hyphenationLadderCount;
-    private String id;
     private int intrusionDisplace;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
@@ -84,6 +79,8 @@
     private Numeric widows;
     private int wrapOption;
     // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
     //     private Length textDepth;
     //     private Length textAltitude;
     //     private int visibility;
@@ -101,8 +98,7 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
         commonHyphenation = pList.getHyphenationProps();
@@ -114,7 +110,6 @@
         color = pList.get(PR_COLOR).getColor(getUserAgent());
         hyphenationKeep = pList.get(PR_HYPHENATION_KEEP).getEnum();
         hyphenationLadderCount = pList.get(PR_HYPHENATION_LADDER_COUNT).getNumeric();
-        id = pList.get(PR_ID).getString();
         intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
@@ -139,7 +134,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startBlock(this);
     }
 
@@ -232,13 +227,6 @@
     }
 
     /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
-    }
-
-    /**
      * @return the "line-height" property.
      */
     public SpaceProperty getLineHeight() {
@@ -347,20 +335,6 @@
         return whiteSpaceCollapse;
     }
     
-    /**
-     * @return Returns the commonAccessibility.
-     */
-    public CommonAccessibility getCommonAccessibility() {
-        return this.commonAccessibility;
-    }
-
-    /**
-     * @return Returns the commonAural.
-     */
-    public CommonAural getCommonAural() {
-        return this.commonAural;
-    }
-
     /**
      * @return Returns the commonRelativePosition.
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BlockContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BlockContainer.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BlockContainer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/BlockContainer.java Fri Jul  6 17:04:25 2007
@@ -48,7 +48,6 @@
     // private ToBeImplementedProperty clip;
     private int displayAlign;
     private Length height;
-    private String id;
     private LengthRangeProperty inlineProgressionDimension;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
@@ -77,6 +76,7 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonAbsolutePosition = pList.getAbsolutePositionProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
@@ -86,7 +86,6 @@
         // clip = pList.get(PR_CLIP);
         displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
         height = pList.get(PR_HEIGHT).getLength();
-        id = pList.get(PR_ID).getString();
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
@@ -102,7 +101,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startBlockContainer(this);
     }
 
@@ -201,13 +200,6 @@
     /** @return the "keep-together" property.  */
     public KeepProperty getKeepTogether() {
         return keepTogether;
-    }
-
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java Fri Jul  6 17:04:25 2007
@@ -68,7 +68,6 @@
     private int dominantBaseline;
     // private ToBeImplementedProperty glyphOrientationHorizontal;
     // private ToBeImplementedProperty glyphOrientationVertical;
-    private String id;
     private Property letterSpacing;
     private SpaceProperty lineHeight;
     /** Holds the text decoration values. May be null */
@@ -106,6 +105,7 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
         commonHyphenation = pList.getHyphenationProps();
@@ -118,7 +118,6 @@
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         // glyphOrientationHorizontal = pList.get(PR_GLYPH_ORIENTATION_HORIZONTAL);
         // glyphOrientationVertical = pList.get(PR_GLYPH_ORIENTATION_VERTICAL);
-        id = pList.get(PR_ID).getString();
         letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         textDecoration = pList.getTextDecorationProps();
@@ -130,7 +129,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().character(this);
     }
 
@@ -213,13 +212,6 @@
         return dominantBaseline;
     }
     
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
-    }
-
     /**
      * @return the "letter-spacing" property.
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ExternalGraphic.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ExternalGraphic.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ExternalGraphic.java Fri Jul  6 17:04:25 2007
@@ -83,7 +83,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(getId());
+        super.startOfNode();
         getFOEventHandler().image(this);
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InitialPropertySet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InitialPropertySet.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InitialPropertySet.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InitialPropertySet.java Fri Jul  6 17:04:25 2007
@@ -69,17 +69,10 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
+        super.bind(pList);
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         // textShadow = pList.get(PR_TEXT_SHADOW);
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java Fri Jul  6 17:04:25 2007
@@ -42,7 +42,6 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
-    private String id;
     // Unused but valid items, commented out for performance:
     //     private CommonRelativePosition commonRelativePosition;
     //     private LengthRangeProperty blockProgressionDimension;
@@ -74,13 +73,14 @@
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        id = pList.get(PR_ID).getString();
     }
 
     /**
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
+       super.startOfNode();
+       
        /* Check to see if this node can have block-level children.
         * See validateChildNode() below.
         */
@@ -99,9 +99,7 @@
            }
        }
 
-        checkId(id);
-        
-        getFOEventHandler().startInline(this);
+       getFOEventHandler().startInline(this);
     }
 
     /**
@@ -138,13 +136,6 @@
         } else {
             blockOrInlineItemFound = true;
         }
-    }
-
-    /**
-     * Return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineContainer.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineContainer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineContainer.java Fri Jul  6 17:04:25 2007
@@ -46,7 +46,6 @@
     private Length baselineShift;
     // private ToBeImplementedProperty clip;
     private int dominantBaseline;
-    private String id;
     private SpaceProperty lineHeight;
     // Unused but valid items, commented out for performance:
     //     private CommonBorderPaddingBackground commonBorderPaddingBackground;
@@ -79,23 +78,16 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         // clip = pList.get(PR_CLIP);
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        id = pList.get(PR_ID).getString();
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
     }
 
     /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
      * XSL Content Model: marker* (%block;)+
      */
@@ -154,13 +146,6 @@
      */
     public SpaceProperty getLineHeight() {
         return lineHeight;
-    }
-
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineLevel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineLevel.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineLevel.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InlineLevel.java Fri Jul  6 17:04:25 2007
@@ -60,6 +60,7 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonAccessibility = pList.getAccessibilityProps();
         commonMarginInline = pList.getMarginInlineProps();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java Fri Jul  6 17:04:25 2007
@@ -50,13 +50,6 @@
     }
 
     /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(getId());
-    }
-
-    /**
      * Make sure content model satisfied, if so then tell the
      * FOEventHandler that we are at the end of the flow.
      * @see org.apache.fop.fo.FONode#endOfNode

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java Fri Jul  6 17:04:25 2007
@@ -41,7 +41,6 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
-    private String id;
     private int leaderAlignment;
     private LengthRangeProperty leaderLength;
     private int leaderPattern;
@@ -75,7 +74,6 @@
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        id = pList.get(PR_ID).getString();
         leaderAlignment = pList.get(PR_LEADER_ALIGNMENT).getEnum();
         leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
         leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
@@ -101,21 +99,6 @@
         }
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         // textShadow = pList.get(PR_TEXT_SHADOW);
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListBlock.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListBlock.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListBlock.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListBlock.java Fri Jul  6 17:04:25 2007
@@ -43,7 +43,6 @@
     private CommonMarginBlock commonMarginBlock;
     private int breakAfter;
     private int breakBefore;
-    private String id;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
@@ -74,11 +73,11 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
-        id = pList.get(PR_ID).getString();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
@@ -91,7 +90,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startList(this);
     }
     
@@ -175,11 +174,6 @@
     /** @return the "fox:orphan-content-limit" extension property */
     public Length getOrphanContentLimit() {
         return orphanContentLimit;
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListItem.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListItem.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListItem.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/ListItem.java Fri Jul  6 17:04:25 2007
@@ -42,7 +42,6 @@
     private CommonMarginBlock commonMarginBlock;
     private int breakAfter;
     private int breakBefore;
-    private String id;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
@@ -68,11 +67,11 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
-        id = pList.get(PR_ID).getString();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
@@ -82,7 +81,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startListItem(this);
     }
 
@@ -181,13 +180,6 @@
     /** @return the "keep-together" property.  */
     public KeepProperty getKeepTogether() {
         return keepTogether;
-    }
-
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiCase.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiCase.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiCase.java Fri Jul  6 17:04:25 2007
@@ -57,17 +57,10 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
+        super.bind(pList);
         startingState = pList.get(PR_STARTING_STATE).getEnum();
         // caseName = pList.get(PR_CASE_NAME);
         // caseTitle = pList.get(PR_CASE_TITLE);
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiProperties.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiProperties.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiProperties.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiProperties.java Fri Jul  6 17:04:25 2007
@@ -25,7 +25,6 @@
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.ValidationException;
 import org.apache.fop.fo.properties.CommonAccessibility;
 
@@ -34,7 +33,6 @@
  */
 public class MultiProperties extends FObj {
     // The value of properties relevant for fo:multi-properties.
-    private String id;
     // Unused but valid items, commented out for performance:
     //     private CommonAccessibility commonAccessibility;
     // End of property values
@@ -58,20 +56,6 @@
     }
 
     /**
-     * @see org.apache.fop.fo.FObj#bind(PropertyList)
-     */
-    public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * Make sure content model satisfied, if so then tell the
      * FOEventHandler that we are at the end of the flow.
      * @see org.apache.fop.fo.FONode#endOfNode
@@ -103,13 +87,6 @@
             } else {
                 invalidChildError(loc, nsURI, localName);
             }
-    }
-
-    /**
-     * Return the "id" property.
-     */
-    public String getId() {
-        return id;
     }
     
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiPropertySet.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiPropertySet.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiPropertySet.java Fri Jul  6 17:04:25 2007
@@ -33,7 +33,6 @@
  */
 public class MultiPropertySet extends FObj {
     // The value of properties relevant for fo:multi-property-set.
-    private String id;
     // private ToBeImplementedProperty activeState;
     // End of property values
 
@@ -55,29 +54,17 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
+        super.bind(pList);
         // activeState = pList.get(PR_ACTIVE_STATE);
     }
 
     /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
      * XSL Content Model: empty
      */
     protected void validateChildNode(Locator loc, String nsURI, String localName) 
         throws ValidationException {
             invalidChildError(loc, nsURI, localName);
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiSwitch.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiSwitch.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiSwitch.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/MultiSwitch.java Fri Jul  6 17:04:25 2007
@@ -36,7 +36,6 @@
 public class MultiSwitch extends FObj {
     // The value of properties relevant for fo:multi-switch.
     // private ToBeImplementedProperty autoRestore;
-    private String id;
     // Unused but valid items, commented out for performance:
     //     private CommonAccessibility commonAccessibility;
     // End of property values
@@ -59,16 +58,10 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         // autoRestore = pList.get(PR_AUTO_RESTORE);
-        id = pList.get(PR_ID).getString();
     }
 
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
 
     /**
      * Make sure content model satisfied.
@@ -89,11 +82,6 @@
         if (!(FO_URI.equals(nsURI) && localName.equals("multi-case"))) {
             invalidChildError(loc, nsURI, localName);
         }
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java Fri Jul  6 17:04:25 2007
@@ -51,7 +51,6 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
-    private String id;
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
     /** Holds the text decoration values. May be null */
@@ -87,13 +86,13 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        id = pList.get(PR_ID).getString();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         textDecoration = pList.getTextDecorationProps();
@@ -107,7 +106,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startPageNumber(this);
     }
 
@@ -140,11 +139,6 @@
     /** @return the Common Border, Padding, and Background Properties. */
     public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
         return commonBorderPaddingBackground;
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @return the "text-decoration" property. */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Fri Jul  6 17:04:25 2007
@@ -54,7 +54,6 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
-    private String id;
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
     private String refId;
@@ -91,13 +90,13 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        id = pList.get(PR_ID).getString();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         refId = pList.get(PR_REF_ID).getString();
@@ -112,7 +111,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         if (refId.equals("")) {
             missingPropertyError("ref-id");
         }
@@ -182,11 +181,6 @@
         return lineHeight;
     }
     
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
-    }
-
     /** @return the "ref-id" property. */
     public String getRefId() {
         return refId;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Table.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Table.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Table.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Table.java Fri Jul  6 17:04:25 2007
@@ -54,7 +54,6 @@
     private LengthPairProperty borderSeparation;
     private int breakAfter;
     private int breakBefore;
-    private String id;
     private LengthRangeProperty inlineProgressionDimension;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
@@ -110,6 +109,7 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
@@ -117,7 +117,6 @@
         borderSeparation = pList.get(PR_BORDER_SEPARATION).getLengthPair();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
-        id = pList.get(PR_ID).getString();
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
@@ -125,7 +124,6 @@
         tableLayout = pList.get(PR_TABLE_LAYOUT).getEnum();
         tableOmitFooterAtBreak = pList.get(PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum();
         tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum();
-        super.bind(pList);
 
         //Bind extension properties
         widowContentLimit = pList.get(PR_X_WIDOW_CONTENT_LIMIT).getLength();
@@ -161,7 +159,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startTable(this);
     }
    
@@ -464,11 +462,6 @@
     /** @return the "fox:orphan-content-limit" extension property */
     public Length getOrphanContentLimit() {
         return orphanContentLimit;
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableAndCaption.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableAndCaption.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableAndCaption.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableAndCaption.java Fri Jul  6 17:04:25 2007
@@ -40,7 +40,6 @@
  */
 public class TableAndCaption extends FObj {
     // The value of properties relevant for fo:table-and-caption.
-    private String id;
     // Unused but valid items, commented out for performance:
     //     private CommonAccessibility commonAccessibility;
     //     private CommonAural commonAural;
@@ -76,20 +75,6 @@
     }
 
     /**
-     * @see org.apache.fop.fo.FObj#bind(PropertyList)
-     */
-    public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * Make sure content model satisfied, if so then tell the
      * FOEventHandler that we are at the end of the flow.
      * @see org.apache.fop.fo.FONode#endOfNode
@@ -130,11 +115,6 @@
         } else {
             invalidChildError(loc, nsURI, localName);
         }
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCaption.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCaption.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCaption.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCaption.java Fri Jul  6 17:04:25 2007
@@ -44,7 +44,6 @@
     // The value of properties relevant for fo:table-caption.
     private CommonAccessibility commonAccessibility;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private String id;
     // Unused but valid items, commented out for performance:
     //     private CommonAural commonAural;
     //     private CommonRelativePosition commonRelativePosition;
@@ -77,16 +76,9 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonAccessibility = pList.getAccessibilityProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        id = pList.get(PR_ID).getString();
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
     }
 
     /**
@@ -122,11 +114,6 @@
         } else {
             blockItemFound = true;
         }
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java Fri Jul  6 17:04:25 2007
@@ -46,7 +46,6 @@
     private int displayAlign;
     private int emptyCells;
     private int endsRow;
-    private String id;
     private int numberColumnsSpanned;
     private int numberRowsSpanned;
     private int startsRow;
@@ -77,26 +76,24 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
         emptyCells = pList.get(PR_EMPTY_CELLS).getEnum();
         endsRow = pList.get(PR_ENDS_ROW).getEnum();
-        id = pList.get(PR_ID).getString();
         columnNumber = pList.get(PR_COLUMN_NUMBER).getNumeric().getValue();
         numberColumnsSpanned = pList.get(PR_NUMBER_COLUMNS_SPANNED).getNumeric().getValue();
         numberRowsSpanned = pList.get(PR_NUMBER_ROWS_SPANNED).getNumeric().getValue();
         startsRow = pList.get(PR_STARTS_ROW).getEnum();
-        width = pList.get(PR_WIDTH).getLength();
-        
-        super.bind(pList);
+        width = pList.get(PR_WIDTH).getLength();        
     }
 
     /**
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startCell(this);
     }
 
@@ -163,13 +160,6 @@
         return (this.emptyCells == EN_SHOW);
     }
     
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
-    }
-
     /**
      * @return the "number-columns-spanned" property.
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableFObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableFObj.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableFObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableFObj.java Fri Jul  6 17:04:25 2007
@@ -83,6 +83,7 @@
      * @see FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         borderAfterPrecedence = pList.get(PR_BORDER_AFTER_PRECEDENCE).getNumeric();
         borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
         borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableRow.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableRow.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableRow.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableRow.java Fri Jul  6 17:04:25 2007
@@ -47,7 +47,6 @@
     private int breakAfter;
     private int breakBefore;
     private Length height;
-    private String id;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
@@ -80,7 +79,6 @@
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
-        id = pList.get(PR_ID).getString();
         height = pList.get(PR_HEIGHT).getLength();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
@@ -162,7 +160,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode
      */
     protected void startOfNode() throws FOPException {
-        checkId(id);
+        super.startOfNode();
         getFOEventHandler().startRow(this);
     }
 
@@ -192,13 +190,6 @@
         }
     }    
     
-    /**
-     * @return the "id" property.
-     */
-    public String getId() {
-        return id;
-    }
-
     /** @return the "break-after" property. */
     public int getBreakAfter() {
         return breakAfter;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Wrapper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Wrapper.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Wrapper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Wrapper.java Fri Jul  6 17:04:25 2007
@@ -34,7 +34,6 @@
  */
 public class Wrapper extends FObjMixed {
     // The value of properties relevant for fo:wrapper.
-    private String id;
     // End of property values
     
     // used for FO validation
@@ -48,20 +47,6 @@
     }
 
     /**
-     * @see org.apache.fop.fo.FObj#bind(PropertyList)
-     */
-    public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
-    }
-
-    /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
      * XSL Content Model: marker* (#PCDATA|%inline;|%block;)*
      * Additionally (unimplemented): "An fo:wrapper that is a child of an 
@@ -80,11 +65,6 @@
         } else {
             invalidChildError(loc, nsURI, localName);
         }
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @see org.apache.fop.fo.FONode#getLocalName() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequence.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequence.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequence.java Fri Jul  6 17:04:25 2007
@@ -43,7 +43,6 @@
     private int letterValue;
     private char groupingSeparator;
     private int groupingSize;
-    private String id;
     private Numeric initialPageNumber;
     private int forcePageCount;
     private String masterReference;
@@ -96,13 +95,13 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
+        super.bind(pList);
         country = pList.get(PR_COUNTRY).getString();
         format = pList.get(PR_FORMAT).getString();
         language = pList.get(PR_LANGUAGE).getString();
         letterValue = pList.get(PR_LETTER_VALUE).getEnum();
         groupingSeparator = pList.get(PR_GROUPING_SEPARATOR).getCharacter();
         groupingSize = pList.get(PR_GROUPING_SIZE).getNumber().intValue();
-        id = pList.get(PR_ID).getString();
         initialPageNumber = pList.get(PR_INITIAL_PAGE_NUMBER).getNumeric();
         forcePageCount = pList.get(PR_FORCE_PAGE_COUNT).getEnum();
         masterReference = pList.get(PR_MASTER_REFERENCE).getString();
@@ -116,6 +115,7 @@
      * @see org.apache.fop.fo.FONode#startOfNode()
      */
     protected void startOfNode() throws FOPException {
+        super.startOfNode();
         this.root = (Root) parent;
         flowMap = new java.util.HashMap();
 
@@ -133,7 +133,6 @@
         this.pageNumberGenerator = new PageNumberGenerator(
                 format, groupingSeparator, groupingSize, letterValue);
 
-        checkId(id);
         getFOEventHandler().startPageSequence(this);
     }
 
@@ -392,11 +391,6 @@
      */
     public StaticContent getStaticContent(String name) {
         return (StaticContent) flowMap.get(name);
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java Fri Jul  6 17:04:25 2007
@@ -34,7 +34,6 @@
  */
 public class PageSequenceWrapper extends FObj {
     // The value of properties relevant for this FO
-    private String id;
     private String indexClass;
     private String indexKey;
     // End of property values
@@ -50,19 +49,12 @@
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        id = pList.get(PR_ID).getString();
+        super.bind(pList);
         indexClass = pList.get(PR_INDEX_CLASS).getString();
         indexKey = pList.get(PR_INDEX_KEY).getString();
     }
 
     /**
-     * @see org.apache.fop.fo.FONode#startOfNode
-     */
-    protected void startOfNode() throws FOPException {
-        checkId(id);
-    }
-
-    /**
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
         XSL/FOP: (bookmark+)
      */
@@ -72,11 +64,6 @@
             localName.equals("page-sequence-wrapper")))) {
                 invalidChildError(loc, nsURI, localName);
         }
-    }
-
-    /** @return the "id" property. */
-    public String getId() {
-        return id;
     }
 
     /** @return the "index-class" property. */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Fri Jul  6 17:04:25 2007
@@ -192,7 +192,7 @@
      * algorithm.
      * @return the applicable PageProvider, or null if not applicable
      */
-    protected PageSequenceLayoutManager.PageProvider getPageProvider() {
+    protected PageProvider getPageProvider() {
         return null;
     }
     
@@ -214,7 +214,7 @@
 
     /** @return true if there's no content that could be handled. */
     public boolean isEmpty() {
-        return (blockLists.size() == 0);
+        return (this.blockLists.size() == 0);
     }
     
     protected void startPart(BlockSequence list, int breakClass) {
@@ -289,7 +289,7 @@
         childLC.setBPAlignment(alignment);
 
         BlockSequence blockList;
-        blockLists = new java.util.ArrayList();
+        this.blockLists = new java.util.ArrayList();
 
         log.debug("PLM> flow BPD =" + flowBPD);
         
@@ -298,7 +298,7 @@
         while (hasMoreContent()) {
             blockLists.clear();
 
-            nextSequenceStartsOn = getNextBlockList(childLC, nextSequenceStartsOn, blockLists);
+            nextSequenceStartsOn = getNextBlockList(childLC, nextSequenceStartsOn);
 
             //*** Phase 2: Alignment and breaking ***
             log.debug("PLM> blockLists.size() = " + blockLists.size());
@@ -539,19 +539,17 @@
      * Gets the next block list (sequence) and adds it to a list of block lists if it's not empty.
      * @param childLC LayoutContext to use
      * @param nextSequenceStartsOn indicates on what page the next sequence should start
-     * @param blockLists list of block lists (sequences)
      * @return the page on which the next content should appear after a hard break
      */
     protected int getNextBlockList(LayoutContext childLC, 
-            int nextSequenceStartsOn, 
-            List blockLists) {
+            int nextSequenceStartsOn) {
         updateLayoutContext(childLC);
         //Make sure the span change signal is reset
         childLC.signalSpanChange(Constants.NOT_SET);
         
-        LinkedList returnedList;
         BlockSequence blockList;
-        if ((returnedList = getNextKnuthElements(childLC, alignment)) != null) {
+        LinkedList returnedList = getNextKnuthElements(childLC, alignment);
+        if (returnedList != null) {
             if (returnedList.size() == 0) {
                 nextSequenceStartsOn = handleSpanChange(childLC, nextSequenceStartsOn);
                 return nextSequenceStartsOn;
@@ -594,7 +592,7 @@
             BlockSequence seq = null;
             seq = blockList.endBlockSequence(breakPosition);
             if (seq != null) {
-                blockLists.add(seq);
+                this.blockLists.add(seq);
             }
         }
         return nextSequenceStartsOn;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java?view=diff&rev=554094&r1=554093&r2=554094
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java Fri Jul  6 17:04:25 2007
@@ -21,7 +21,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.fop.layoutmgr.PageBreakingAlgorithm.PageBreakingLayoutListener;
 import org.apache.fop.traits.MinOptMax;
 
 /**
@@ -37,7 +36,7 @@
     private int idealPartLen;
     
     public BalancingColumnBreakingAlgorithm(LayoutManager topLevelLM,
-            PageSequenceLayoutManager.PageProvider pageProvider,
+            PageProvider pageProvider,
             PageBreakingLayoutListener layoutListener,
             int alignment, int alignmentLast,
             MinOptMax footnoteSeparatorLength,



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org