Cocoon API: Class XHTMLFormatter

Class XHTMLFormatter

All Implemented Interfaces:
Cacheable, Configurable, Formatter, Status

public class XHTMLFormatter
extends AbstractFormatter

This formatter is used to serialize XHTML content. The difference between this formatter and the XMLFormatter is that while the XML formatter doesn't have any semantic information about the document type being formatted, this class handles tags like <br/> and transforms them to XHTML that non-XML-aware browsers can understand (for example, < br/>).

$Revision: 1.1 $ $Date: 2000/04/20 22:12:04 $
Stefano Mazzocchi

Fields inherited from class org.apache.cocoon.formatter.AbstractFormatter
doctypePublic, doctypeSystem, encoding, format, indent, lineWidth, MIMEtype, preserveSpace, statusMessage
Constructor Summary
Method Summary
 void format(org.w3c.dom.Document document, writer, java.util.Dictionary p)
          Prints the give document into a page.
 void init(Configurations conf)
          Initialize the class by passing its configurations.
Methods inherited from class org.apache.cocoon.formatter.AbstractFormatter
getEncoding, getMIMEType, getStatus, isCacheable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public XHTMLFormatter()
Method Detail


public void init(Configurations conf)
Description copied from interface: Configurable
Initialize the class by passing its configurations.
init in class AbstractFormatter


public void format(org.w3c.dom.Document document,
                   java.util.Dictionary p)
            throws java.lang.Exception
Description copied from interface: Formatter
Prints the give document into a page.

Copyright 1999-2001 Apache Software Foundation. All Rights Reserved.