import org.apache.fop.fo.FOPropertySets;
import org.apache.fop.fo.PropertySets;
import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FObjects;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FOTree;
import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.XMLEvent;
import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.xml.SyncedFoXmlEventsBuffer;
+import org.apache.fop.xml.UnexpectedStartElementException;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datastructs.TreeException;
import org.apache.fop.datatypes.PropertyValue;
import org.apache.fop.datatypes.Ints;
+import org.apache.fop.messaging.MessageHandler;
import java.util.HashMap;
import java.util.BitSet;
}
}
+ /** The <tt>SyncedFoXmlEventsBuffer</tt> from which events are drawn. */
+ private SyncedFoXmlEventsBuffer xmlevents;
+
/**
+ * Construct an fo:title node, and build the fo:title subtree.
+ * <p>Content model for fo:title: (#PCDATA|%inline;)*
* @param foTree the FO tree being built
* @param parent the parent FONode of this node
* @param event the <tt>FoXMLEvent</tt> that triggered the creation of
throws TreeException, FOPException
{
super(foTree, FObjectNames.TITLE, parent, event,
- FOPropertySets.PAGESEQ_SET, sparsePropsMap, sparseIndices,
+ FOPropertySets.TITLE_SET, sparsePropsMap, sparseIndices,
numProps);
- FoXMLEvent ev;
- String nowProcessing;
+ xmlevents = foTree.getXmlevents();
+ FoXMLEvent ev = null;
+ do {
+ try {
+ ev = xmlevents.expectOutOfLinePcdataOrInline();
+ } catch(UnexpectedStartElementException e) {
+ MessageHandler.logln
+ ("Ignoring unexpected Start Element: "
+ + ev.getQName());
+ ev = xmlevents.getStartElement();
+ ev = xmlevents.getEndElement(ev);
+ }
+ if (ev != null) {
+ // Generate the flow object
+ FObjects.fobjects.makeFlowObject
+ (foTree, this, ev, FOPropertySets.TITLE_SET);
+ }
+ } while (ev != null);
makeSparsePropsSet();
}