Save This Page
Home » fop-0.95beta-src » org.apache » fop » render » xml » [javadoc | source]
org.apache.fop.render.xml
public class: XMLRenderer [javadoc | source]
java.lang.Object
   org.apache.fop.render.AbstractRenderer
      org.apache.fop.render.PrintRenderer
         org.apache.fop.render.xml.XMLRenderer

All Implemented Interfaces:
    Renderer, Constants

Renderer that renders areas to XML for debugging purposes. This creates an xml that contains the information of the area tree. It does not output any state or derived information. The output can be used to build a new area tree which can be rendered to any renderer.
Field Summary
public static final  String XML_MIME_TYPE    XML MIME type 
public static final  String NS    Main namespace in use. 
public static final  String CDATA    CDATA type 
public static final  Attributes EMPTY_ATTS    An empty Attributes object used when no attributes are needed. 
protected  Renderer mimic    If not null, the XMLRenderer will mimic another renderer by using its font setup. 
protected  ContentHandler handler    ContentHandler that the generated XML is written to 
protected  AttributesImpl atts    AttributesImpl instance that can be used during XML generation. 
protected  OutputStream out    The OutputStream to write the generated XML to. 
protected  List extensionAttachments    A list of ExtensionAttachements received through processOffDocumentItem() 
Fields inherited from org.apache.fop.render.PrintRenderer:
fontInfo,  fontResolver,  fontList
Fields inherited from org.apache.fop.render.AbstractRenderer:
log,  userAgent,  currentBPPosition,  currentIPPosition,  containingBPPosition,  containingIPPosition,  currentPageViewport
Constructor:
 public XMLRenderer() 
Method from org.apache.fop.render.xml.XMLRenderer Summary:
addAreaAttributes,   addAttribute,   addAttribute,   addAttribute,   addAttribute,   addTraitAttributes,   characters,   comment,   endElement,   endPageSequence,   endVParea,   getMimeType,   handleSAXException,   mimicRenderer,   processOffDocumentItem,   renderBeforeFloat,   renderBlock,   renderBookmarkTree,   renderContainer,   renderDestination,   renderFlow,   renderFootnote,   renderForeignObject,   renderImage,   renderInlineArea,   renderInlineAreaBackAndBorders,   renderInlineBlockParent,   renderInlineParent,   renderInlineSpace,   renderLeader,   renderLineArea,   renderMainReference,   renderPage,   renderRegionViewport,   renderSpace,   renderText,   renderViewport,   renderWord,   setCompactFormat,   setContentHandler,   setUserAgent,   setupFontInfo,   startElement,   startElement,   startPageSequence,   startRenderer,   startVParea,   stopRenderer
Methods from org.apache.fop.render.PrintRenderer:
addFontList,   createRendererContext,   getFontFromArea,   getFontResolver,   getInternalFontNameForArea,   lightenColor,   renderDocument,   setFontList,   setupFontInfo
Methods from org.apache.fop.render.AbstractRenderer:
convertTitleToString,   endVParea,   getCurrentPageViewport,   getGraphics2DAdapter,   getImageAdapter,   getMimeType,   getUserAgent,   handleBlockTraits,   handleRegionTraits,   mptToPt,   preparePage,   processOffDocumentItem,   ptToMpt,   renderBeforeFloat,   renderBlock,   renderBlockViewport,   renderBlocks,   renderBodyRegion,   renderCharacter,   renderContainer,   renderFlow,   renderFootnote,   renderForeignObject,   renderImage,   renderInlineArea,   renderInlineAreaBackAndBorders,   renderInlineBlockParent,   renderInlineParent,   renderInlineSpace,   renderLeader,   renderLineArea,   renderMainReference,   renderPage,   renderPageAreas,   renderRegion,   renderRegionViewport,   renderSpace,   renderText,   renderViewport,   renderWord,   renderXML,   setUserAgent,   setupFontInfo,   startPageSequence,   startPageSequence,   startRenderer,   startVParea,   stopRenderer,   supportsOutOfOrder
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.fop.render.xml.XMLRenderer Detail:
 protected  void addAreaAttributes(Area area) 
    Adds the general Area attributes.
 protected  void addAttribute(String name,
    String value) 
    Adds a new attribute to the protected member variable "atts".
 protected  void addAttribute(QName name,
    String value) 
    Adds a new attribute to the protected member variable "atts".
 protected  void addAttribute(String name,
    int value) 
    Adds a new attribute to the protected member variable "atts".
 protected  void addAttribute(String name,
    Rectangle2D rect) 
    Adds a new attribute to the protected member variable "atts".
 protected  void addTraitAttributes(Area area) 
    Adds attributes from traits of an Area.
 protected  void characters(String text) 
    Sends plain text to the XML
 protected  void comment(String comment) 
    Writes a comment to the generated XML.
 protected  void endElement(String tagName) 
    Ends an element.
 public  void endPageSequence() 
    Tells the renderer to finish the current PageSequence
 protected  void endVParea() 
    {@inheritDoc}
 public String getMimeType() 
    {@inheritDoc}
 protected  void handleSAXException(SAXException saxe) 
    Handles SAXExceptions.
 public  void mimicRenderer(Renderer renderer) 
    Call this method to make the XMLRenderer mimic a different renderer by using its font setup. This is useful when working with the intermediate format parser.
 public  void processOffDocumentItem(OffDocumentItem oDI) 
    {@inheritDoc}
 protected  void renderBeforeFloat(BeforeFloat bf) 
    {@inheritDoc}
 protected  void renderBlock(Block block) 
    {@inheritDoc}
 protected  void renderBookmarkTree(BookmarkData bookmarkRoot) 
    Renders a BookmarkTree object
 public  void renderContainer(Container cont) 
    {@inheritDoc}
 protected  void renderDestination(DestinationData destination) 
    Renders a DestinationData object (named destination)
 protected  void renderFlow(NormalFlow flow) 
    {@inheritDoc}
 protected  void renderFootnote(Footnote footnote) 
    {@inheritDoc}
 public  void renderForeignObject(ForeignObject fo,
    Rectangle2D pos) 
    Renders an fo:foreing-object.
 public  void renderImage(Image image,
    Rectangle2D pos) 
    {@inheritDoc}
 protected  void renderInlineArea(InlineArea inlineArea) 
    {@inheritDoc}
 protected  void renderInlineAreaBackAndBorders(InlineArea area) 
    {@inheritDoc} org.apache.fop.area.inline.InlineArea)
 protected  void renderInlineBlockParent(InlineBlockParent ibp) 
    {@inheritDoc}
 protected  void renderInlineParent(InlineParent ip) 
    {@inheritDoc}
 protected  void renderInlineSpace(Space space) 
    {@inheritDoc}
 protected  void renderLeader(Leader area) 
    {@inheritDoc}
 protected  void renderLineArea(LineArea line) 
    {@inheritDoc}
 protected  void renderMainReference(MainReference mr) 
    {@inheritDoc}
 public  void renderPage(PageViewport page) throws IOException, FOPException 
    {@inheritDoc}
 protected  void renderRegionViewport(RegionViewport port) 
    {@inheritDoc}
 protected  void renderSpace(SpaceArea space) 
    {@inheritDoc}
 protected  void renderText(TextArea text) 
    {@inheritDoc}
 protected  void renderViewport(Viewport viewport) 
    {@inheritDoc}
 protected  void renderWord(WordArea word) 
    {@inheritDoc}
 public  void setCompactFormat(boolean compact) 
 public  void setContentHandler(ContentHandler handler) 
    Sets an outside TransformerHandler to use instead of the default one create in this class in startRenderer().
 public  void setUserAgent(FOUserAgent agent) 
    {@inheritDoc}
 public  void setupFontInfo(FontInfo inFontInfo) 
    {@inheritDoc}
 protected  void startElement(String tagName) 
    Starts a new element (without attributes).
 protected  void startElement(String tagName,
    Attributes atts) 
    Starts a new element.
 public  void startPageSequence(PageSequence pageSequence) 
    {@inheritDoc}
 public  void startRenderer(OutputStream outputStream) throws IOException 
    {@inheritDoc}
 protected  void startVParea(CTM ctm,
    Rectangle2D clippingRect) 
    {@inheritDoc}
 public  void stopRenderer() throws IOException 
    {@inheritDoc}