Class IFParser
- java.lang.Object
-
- org.apache.fop.render.intermediate.IFParser
-
- All Implemented Interfaces:
IFConstants
,XMLConstants
public class IFParser extends java.lang.Object implements IFConstants
This is a parser for the intermediate format XML which converts the intermediate file intoIFPainter
events.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
IFParser.Handler
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.String>
handledNamespaces
protected static org.apache.commons.logging.Log
log
Logger instanceprivate static javax.xml.transform.sax.SAXTransformerFactory
tFactory
-
Fields inherited from interface org.apache.fop.render.intermediate.IFConstants
EL_BORDER_RECT, EL_CLIP_RECT, EL_DOCUMENT, EL_FONT, EL_GROUP, EL_HEADER, EL_ID, EL_IMAGE, EL_LINE, EL_LOCALE, EL_PAGE, EL_PAGE_CONTENT, EL_PAGE_HEADER, EL_PAGE_SEQUENCE, EL_PAGE_TRAILER, EL_RECT, EL_STRUCTURE_TREE, EL_TEXT, EL_TRAILER, EL_VIEWPORT, MIME_TYPE, NAMESPACE
-
Fields inherited from interface org.apache.fop.util.XMLConstants
CDATA, XLINK_HREF, XLINK_NAMESPACE, XLINK_PREFIX, XML_NAMESPACE, XML_PREFIX, XML_SPACE, XMLNS_NAMESPACE_URI, XMLNS_PREFIX
-
-
Constructor Summary
Constructors Constructor Description IFParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.ContentHandler
getContentHandler(IFDocumentHandler documentHandler, FOUserAgent userAgent)
Creates a new ContentHandler instance that you can send the area tree XML to.void
parse(javax.xml.transform.Source src, IFDocumentHandler documentHandler, FOUserAgent userAgent)
Parses an intermediate file and paints it.
-
-
-
Method Detail
-
parse
public void parse(javax.xml.transform.Source src, IFDocumentHandler documentHandler, FOUserAgent userAgent) throws javax.xml.transform.TransformerException, IFException
Parses an intermediate file and paints it.- Parameters:
src
- the Source instance pointing to the intermediate filedocumentHandler
- the intermediate format document handler used to process the IF eventsuserAgent
- the user agent- Throws:
javax.xml.transform.TransformerException
- if an error occurs while parsing the area tree XMLIFException
- if an IF-related error occurs inside the target document handler
-
getContentHandler
public org.xml.sax.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 eventsuserAgent
- the user agent- Returns:
- the ContentHandler instance to receive the SAX stream from the area tree XML
-
-