Interface Sink

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface Sink
    extends java.lang.AutoCloseable
    A Sink consumes Doxia events to produce a resultant output format (eg Docbook, PDF, XHTML...).

    Doxia allows you to transform any supported input document format (ie for which a Parser exists) into any supported output document format (ie for which a Sink exists).

    A parser is responsible for reading an input document and emitting a sequence of Doxia events which can then be consumed by a Doxia Sink. Thus, you can parse any front- end format (eg APT, FML, Xdoc, ...) and have them all contribute to a final XHTML version of a web site. All documents being parsed result in a stream of Doxia events (eg paragraph, bold, italic, text,...), which are then fed into a XHTML Sink to produce a set of XHTML pages.

    A Sink is ultimately responsible for the final format and structure of the output document. For example, you can take a collection of APT documents, let a Parser emit a series of Doxia events and have that be fed into a Sink to produce a single PDF, a book, a site, or a Word document. The Sink is fully responsible for the final output.

    You can easily integrate any custom (XML, Wiki,...) format by creating a Doxia Parser which reads your input document and produces a proper sequence of Doxia events. Those can then be fed into an arbitrary Sink to produce any desired final output.

    Note: All implemented sink should use UTF-8 as encoding.

    Since:
    1.0-alpha-6
    Author:
    Jason van Zyl, Vincent Siveton, ltheussl