Class IFParser

java.lang.Object
org.apache.fop.render.intermediate.IFParser
All Implemented Interfaces:
IFConstants, XMLConstants

public class IFParser extends Object implements IFConstants
This is a parser for the intermediate format XML which converts the intermediate file into IFPainter events.
  • Field Details

    • log

      protected static final org.apache.commons.logging.Log log
      Logger instance
  • Constructor Details

    • IFParser

      public IFParser()
  • Method Details

    • parse

      public void parse(Source src, IFDocumentHandler documentHandler, FOUserAgent userAgent) throws TransformerException, IFException
      Parses an intermediate file and paints it.
      Parameters:
      src - the Source instance pointing to the intermediate file
      documentHandler - the intermediate format document handler used to process the IF events
      userAgent - the user agent
      Throws:
      TransformerException - if an error occurs while parsing the area tree XML
      IFException - if an IF-related error occurs inside the target document handler
    • getContentHandler

      public ContentHandler getContentHandler(IFDocumentHandler documentHandler, FOUserAgent userAgent)
      Creates a new ContentHandler instance that you can send the area tree XML to. The parsed pages are added to the AreaTreeModel instance you pass in as a parameter.
      Parameters:
      documentHandler - the intermediate format document handler used to process the IF events
      userAgent - the user agent
      Returns:
      the ContentHandler instance to receive the SAX stream from the area tree XML