dotify.formatter.impl contains an implementation of the formatter interfaces of dotify.api.
Many of the OBFL tests are also used as OBFL examples. The examples can be useful to study when learning about OBFL or creating OBFL-files. The examples are published here.
Java, StAX, OBFL, Java SPI, OSGi
- Implements most aspects of OBFL (including some experimental additions)
- Extends the currently described specification for the evaluation language with features such as:
- Converting numbers to text, e.g. 1 becomes “one”.
- Formatting localized messages
- Formatting dates
Download the latest release from maven central and add it to your runtime environment.
Access the implementations via the following APIs in dotify.api:
FormatterEngineMaker
FormatterFactoryMaker
ExpressionFactoryMaker
PagedMediaWriterFactoryMaker
or in an OSGi environment use:
FormatterEngineFactoryService
FormatterFactory
ExpressionFactory
PagedMediaWriterFactoryMakerService
Build with gradlew build
(Windows) or ./gradlew build
(Mac/Linux)
Tests are run with gradlew test
(Windows) or ./gradlew test
(Mac/Linux).
OBFL-to-PEF tests can be added by including lines such as the following:
testPEF("resource-files/foo-input.obfl", "resource-files/foo-expected.pef", false);
in a class that extends AbstractFormatterEngineTest
.
If you want the tests to be included in the overview page (linked to above)
the OBFL and PEF files need to be placed in
integrationtest/org/daisy/dotify/formatter/test/resource-files
and named according
to the pattern foo-input.obfl
/foo-expected.pef
.
- Requires Java 8
- Compatible with SPI and OSGi
Compared to the latest OBFL-version, at least the following is not yet supported:
- marker-reference scope=volume and scope=document
- the text-style attribute outside of header/footers
- tables (incubating)
- repeating headers
- border intersections (see issue #167)
- render cell-border next to table border (see issue #168)
- table-row-spacing > 0 (see issue #169)
Note that since OBFL does not have finalized releases, this list can be incomplete.
See the common wiki for more information.