Interface Sink

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
BufferingSinkProxyFactory.BufferingSink
All Known Implementing Classes:
AbstractSink, AbstractTextSink, AbstractXhtml5Sink, AbstractXmlSink, AptSink, CreateAnchorsForIndexEntries, IndexingSink, MarkdownSink, RandomAccessSink, SinkAdapter, SinkWrapper, UniqueAnchorNamesValidator, XdocSink, Xhtml5BaseSink, Xhtml5Sink

public interface Sink extends 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