
doc.transformers.int_daisy_prettyPrinter.html Maven / Gradle / Ivy
int_daisy_prettyPrinter
Transformer documentation: int_daisy_prettyPrinter
Transformer Purpose
Pretty print all XML members of a fileset. For DTB filesets, take special care to compatibilize the output with certain heritage and/or sensitive DTB players
The following specific pretty printing aspects are implemented for DTB player compatibility
- DOS linebreaks (is the default, can however be overriden)
- Order of the name and content attributes in meta elements in Daisy 2.02 ncc.html and smil files
- Order of the src, clip-begin and clip-end attributes in audio elements in Daisy 2.02 smil files
- Absence of linebreaks before and after anchors in Daisy 2.02 ncc.html
Input Requirements
The transformer has been written with the intention to work on any file/fileset that can be represented by the org.daisy.util.fileset
package.
Pretty printing will only be done on XML members of the input fileset; all other types of members pass through untouched.
If no file in the fileset is of type XML, then the whole fileset will pass through untouched. It is therefore safe to place this transformer in contexts whose dataflow varies considerably.
Output
On success
A file/fileset whose XML members have been pretty printed. See parameters
On error
No specific recovery scheme. On error the transformer will send a fatal message, then throw an exception and abort.
Configuration/Customization
Parameters (tdf)
- input
- Input fileset manifest file (NCC, OPF, etc)
- output
- The output directory. This can be the same as the input dir - meaning less IO and higher risk
- linebreak
- Type of linebreak to use. Choices are
DOS
(CR (Carriage Return, 0x0D) + LF (Line Feed, 0x0A)) and UNIX
(LF (Line Feed, 0x0A)). Default is DOS
.
Extended configurability
None.
Further development
None registered.
Dependencies
Author
Markus Gylling, Daisy Consortium
Licensing
LGPL