Step epub3-add-navigation-doc {http://www.daisy.org/ns/pipeline/xproc}

Defined in: http://www.daisy.org/pipeline/modules/epub-utils/library.xpl

Input Ports

Port Description
source.fileset primary
source.in-memory sequence

Input fileset

May already include a (at most one) navigation document, in which case it should either be marked with a role attribute with value nav, or it should contain a nav[@epub:type='toc'] or nav[@role='doc-toc'] element.

If the input fileset does not include a navigation document it is generated from the content documents.

content sequence

Fileset from which to generate the navigation document.

Defaults to all the "application/xhtml+xml" documents found in spine, or in the "source" fileset if the input does not contain a package document.

toc sequence

"toc" nav element to include in the navigation document.

At most one document is allowed and it is an error if a document is present when the input fileset already contains a navigation document.

page-list sequence

"page-list" nav element to include in the navigation document.

At most one document is allowed and it is an error if a document is present when the input fileset already contains a navigation document.

landmarks sequence

"landmarks" nav element to include in the navigation document.

At most one document is allowed and it is an error if a document is present when the input fileset already contains a navigation document.

Output Ports

Port Description
nav

The EPUB navigation document

nav.fileset

Fileset with as single file the navigation document

result.fileset primary

Copy of sourse fileset with navigation document added and package and HTML documents updated.

If a navigation document was already present and the output-base-uri option is set, it will be moved to the new location. If a navigation document needs to be generated, the output-base-uri option is mandatory.

If a package document is present in the input it will be updated.

If the navigation document was generated from the content documents, the content documents will be changed so that all body, article, aside, nav, section, h1, h2, h3, h4, h5, h6, hgroup and epub:type='pagebreak' elements have an id attribute.

result.in-memory sequence

Options

Local Name Namespace URI Default Description
output-base-uri

The base URI of the generated navigation document.

Mandatory if the input fileset contains no navigation document yet, ignored otherwise.

page-list-hidden 'true'

Whether to add a hidden attribute to the epub:type='page-list' element.

title ''

The title of the navigation document.

If not specified, the title is "Table of contents", localized to the language of the content documents.

language ''

The xml:lang and lang attributes of the navigation document.

If not specified, it will be the language of the content documents.

css ''

The CSS style sheet to attach to the navigation document.

reserved-prefixes '#default'

The reserved prefix mappings of the resulting package document. By default, prefixes that are used but not declared in the input are also not declared in the output, and if "schema" is not used in the input, it is declared in the output.

compatibility-mode 'true'

Whether to be backward compatible with Open Package Format 2.0.1.