
doc.transformers.us_rfbd_textOnlyDtbCreator.html Maven / Gradle / Ivy
Transformer documentation: us_rfbd_textOnlyDtbCreator [BETA]
Transformer documentation:
us_rfbd_textOnlyDtbCreator [BETA]
Transformer Purpose
This transformer takes a valid Z39.86-2005 textual content file (dtbook file)
as input and creates a complete, conforming Z39.86-2005 text-only DTB fileset.
The output DTB includes:
- A conforming package file (OPF)
- A conforming NCX file
- One or more conforming SMIL files
- The input text file, with added
smilRef
and id
attributes as needed
- A conforming resource file and associated media (one is supplied by
default, or you may provide your own)
The output DTB includes the following features and functions:
- Skippability for all structures mandated by the specification.
- Escapability for all structures mandated by the specification
- SMIL links for all structures mandated by the specification
- Resource file entries for all structures mandated by the specification
Input Requirements
The transformer takes a Z39.86-2005 textual content file as input (dtbook
file). The file must be valid. It is recommended that any script using this
transformer pass the input through the Pipeline validator prior to executing
the transform.
Output
On success
The output is a Z39.86-2005 text-only fileset: package file, NCX, SMIL
file(s), textual content file, resource file, and associated resource media
files.
On error
Messages indicating the source of the error.
Configuration/Customization
Parameters (tdf)
- input
- The full path and name of the input dtbook file (required).
- output
- The full path in which to put the output DTB (required).
- configFile
- The full path and name of a configuration file (see below; optional). If
not given, the default configuration file (located in the transformer
directory) will be used.
- resourceFile
- The full path and name of a Z39.86-2005 resource file to include with the
DTB (optional). If not given, the default resource file (located in the
transformer directory) will be used.
Extended configurability
The transformer uses a configuration file for extended configuration options.
A default file (toConfig.xml) is included in the transformer directory and will
be used if a custom configuration is not provided by the user. The configuration
file allows for the following customizations:
- Identification of which dtbook element names create synchronization points
within the output SMIL (default:
a
, sent
, pagenum
, noteref
,
annoref
, and linenum
).
- Identification of which dtbook element names are skippable structures
(default:
pagenum
, noteref
, linenum
, note
, annotation
, sidebar
, prodnote
).
- Identification of which dtbook element names are escapable structures
(default:
table
, list
, note
, annotation
, prodnote
, sidebar
).
- Control over the size of output SMIL files by indicating a threshold number
of events after which a new file will be started (default: 500).
The file must be a well-formed XML document. The following describes the
elements that are recognized:
<synchElement name="foo" ns="http://www.example.com/ns/" />
- Element name and (optional) namespace that generates a SMIL synchronization
point
<skippableElement name="foo" ns="http://www.example.com/ns/" />
- Element name and (optional) namespace that generates a skippable structure in SMIL
<escapableElement name="foo" ns="http://www.example.com/ns/" />
- Element name and (optional) namespace that generates a skippable structure in SMIL
<smilEventThreshold value="500" />
- Number of events per SMIL file before looking for an exit (defaults to 500)
All other elements in the config file will be ignored.
Further development
This transformer is in beta release. It has not been fully tested against a
wide variety of inputs to confirm robustness.
This transformer does not include support for MathML, but ought to.
Dependencies
None.
Author
James Pritchett, Recording for the Blind & Dyslexic (RFB&D), USA
Licensing