/*
- * $Id$
- *
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- *
- *
- * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ *
+ * $Id$
*/
package org.apache.fop.fo.flow;
/**
* Implements the fo:list-item flow object.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
*/
public class FoListItem extends FONode {
}
}
- /** The number of markers on this FO. */
- private int numMarkers = 0;
-
/**
* Construct an fo:list-item node, and build the fo:list-item subtree.
* <p>Content model for fo:list-item:
stateFlags, sparsePropsMap, sparseIndices);
XmlEvent ev;
// Look for zero or more markers
- String nowProcessing = "marker";
+ getMarkers();
try {
- while ((ev = xmlevents.expectStartElement
- (FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE))
- != null) {
- new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags);
- numMarkers++;
- ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev);
- namespaces.surrenderEvent(ev);
- }
-
// Look for one list-item-label
- nowProcessing = "list-item-label";
if ((ev = xmlevents.expectStartElement
(FObjectNames.LIST_ITEM_LABEL, XmlEvent.DISCARD_W_SPACE))
== null)
namespaces.surrenderEvent(ev);
// Look for one list-item-body
- nowProcessing = "list-item-body";
if ((ev = xmlevents.expectStartElement
(FObjectNames.LIST_ITEM_BODY, XmlEvent.DISCARD_W_SPACE))
== null)
ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev);
namespaces.surrenderEvent(ev);
- /*
- } catch (NoSuchElementException e) {
- throw new FOPException
- ("Unexpected EOF while processing " + nowProcessing + ".");
- */
} catch(TreeException e) {
throw new FOPException("TreeException: " + e.getMessage());
} catch(PropertyException e) {
}
}
- /** The number of markers on this FO. */
- private int numMarkers = 0;
-
/** The number of table-columns on this FO. */
private int numColumns = 0;
stateFlags, sparsePropsMap, sparseIndices);
XmlEvent ev;
// Look for zero or more markers
- String nowProcessing = "marker";
+ getMarkers();
try {
- while ((ev = xmlevents.expectStartElement
- (FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE))
- != null) {
- new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags);
- numMarkers++;
- ev = xmlevents.getEndElement(SyncedXmlEventsBuffer.DISCARD_EV, ev);
- namespaces.surrenderEvent(ev);
- }
-
// Look for zero or more table-columns
- nowProcessing = "table-column";
while ((ev = xmlevents.expectStartElement
(FObjectNames.TABLE_COLUMN, XmlEvent.DISCARD_W_SPACE))
!= null) {
}
// Look for optional table-header
- nowProcessing = "table-header";
if ((ev = xmlevents.expectStartElement
(FObjectNames.TABLE_HEADER, XmlEvent.DISCARD_W_SPACE))
!= null) {
}
// Look for optional table-footer
- nowProcessing = "table-footer";
if ((ev = xmlevents.expectStartElement
(FObjectNames.TABLE_FOOTER, XmlEvent.DISCARD_W_SPACE))
!= null) {
// Look for one or more table-body
// must have at least one
- nowProcessing = "table-body";
ev = xmlevents.expectStartElement
(FObjectNames.TABLE_BODY, XmlEvent.DISCARD_W_SPACE);
if (ev == null)
namespaces.surrenderEvent(ev);
}
- /*
- } catch (NoSuchElementException e) {
- throw new FOPException
- ("Unexpected EOF while processing " + nowProcessing + ".");
- */
} catch(TreeException e) {
throw new FOPException("TreeException: " + e.getMessage());
} catch(PropertyException e) {