All Downloads are FREE. Search and download functionalities are using the official Maven repository.

doc.transformers.se_tpb_filesetcreator.html Maven / Gradle / Ivy

The newest version!




	
	se_tpb_filesetcreator
	


Transformer documentation: se_tpb_filesetcreator

Transformer Purpose

Generates a z39.86-2005 fileset, given a dtbook-2005-1 or dtbook-2005-2 document enriched with the attributes smil:clipBegin, smil:clipEnd and smil:src, namespace URI http://www.w3.org/2001/SMIL20/, on elements with corresponding audio.

Input Requirements

This transformer is written to work with a manuscript, that is a dtbook-2005-1 or dtbook-2005-2 document enriched with, among others*, attributes indicating corresponding audio. Elements decorated with such attributes will be considered synchronization points (sync points) in the Z39.86 fileset. Those attributes come from the smil namespace having namespace URI http://www.w3.org/2001/SMIL20/. The attributes are:

src
The audio source file.
clipBegin
The time value in the source file representing the start time of the this sync point.
clipEnd
The time value in the source file representing the end time of the this sync point.

No explicit document type check is made on the input document. Since the document contains several namespaces (at least default and smil in order to make a non-empty book), the dtbook doctype is not valid and probably removed by preceding transformers.

Input that fits into this description is generated by se_tpb_speechgenerator.

*What others? On its way though Daisy Pipeline Narrator, the manuscript may be enriched with attributes pointing out acronyms, abbreviations and announcements of varying kind.

Output

On success

A z39.86-2005 digital talking book fileset that conforms to official standards, see
http://www.daisy.org/z3986/2005/z3986-2005.html for details. The book structure can be affected in some ways according to the configuration. See section Extended configurability for more info.

On error

No specific recovery scheme. On error, this transformer will send a fatal message, then throw an exception and abort.

Configuration/Customization

Parameters (tdf)

outputDirectory
required="true"
The directory (with possible subdirectories) in which to place the generated files.
Example: /path/to/directory
manuscriptFilename
required="true"
The modified dtbook document.
Example: /path/to/manuscript/file.xml
outputDTBFilename
required="true"
The desired name of the dtbook document in the generated fileset.
Example: filename.xml
resourceFilename
required="false"
The path to the z39.86-2005 recource file.
Example: /path/to/file.res
Default: ${transformer_dir}/resource/tpbnarrator.res
smilTemplateFilename
required="false"
The path to the z39.86-2005 smil file template.
Example: /path/to/smil.template.xml
Default: ${transformer_dir}/templates/smil.template.xml
ncxTemplateFilename
required="false"
The path to the z39.86-2005 ncx file template.
Example: /path/to/ncx.template.xml
Default: ${transformer_dir}/templates/ncx.template.xml
opfTemplateFilename
required="false"
The path to the z39.86-2005 opf file template.
Example: /path/to/opf.template.xml
Default: ${transformer_dir}/templates/opf.template.xml
fscConfigFilename
required="false"
Path to file containing additional configuration of the transformer not best fit into the tdf file. See Extended configurability.
Example: /path/to/file.xml
Default: ${transformer_dir}/config/fileSetCreatorConfig.xml

Extended configurability

The file pointed to by the tdf variable fscConfigFilename provides the possibility to affect the book structure. Things like which elements are supposed to be in the ncx navList, which elements are supposed to be skippable or escapable, and so on, are configured there. A description of the possibilities follows:

fscConfig/navListHeading/item
the name of elements supposed to be in the ncx navList.
fscConfig/forceLink/item
Elements supposed to be linked together with their references, such as notes and annotations (which should be linked to by noteref and annoref).
fscConfig/customNavList/item
Elements desired in the ncx custom navlist.
fscConfig/escapable/item
Escapable elements.
fscConfig/skippable/item
Skippable elements.
fscConfig/levels/item
Elements changing the ncx level by nesting navPoints.

A short example follows:

<?xml version="1.0" encoding="utf-8"?>
<fscConfig>

	<!-- Elements supposed to be in the ncx navList. hd is only a valid heading as a child of level. -->
	<navListHeading>
		<item>h1</item>
		<item>h2</item>
		<item>hd</item>
	</navListHeading>
	
	<!-- Elements supposed to be linked together with their refs. -->
	<forceLink>
		<item>note</item>
		<item>annotation</item>
	</forceLink>
	
	<customNavList>
		<item>sidebar</item>
		<item>note</item>
	</customNavList>

	<!-- Escapabel elements -->
	<escapable>
		<item>annotation</item>
		<item>note</item>
		<item>prodnote</item>
		<item>sidebar</item>
		<item>table</item>
	</escapable>	
	
	<!-- skippable elements -->
	<skippable>
		<item>annotation</item>
		<item>prodnote</item>
		<item>sidebar</item>
	</skippable>
	
	<!-- elements changing the ncx level -->
	<levels>
		<item>level1</item>
		<item>level2</item>
		<item>level</item>
	</levels>
</fscConfig>

Further development

  • RNG/Schematron validation of the extra configuration file.

Dependencies

None.

Author

Martin Blomberg, TPB

Licensing

LGPL





© 2015 - 2025 Weber Informatics LLC | Privacy Policy