xml.xproc.step.epub3-to-daisy202.convert.xpl Maven / Gradle / Ivy
The newest version!
px:assert
px:error
px:set-base-uri
px:fileset-filter
px:fileset-load
px:fileset-rebase
px:fileset-copy
px:fileset-update
px:fileset-join
px:fileset-add-entry
px:opf-spine-to-fileset
px:epub3-label-pagebreaks-from-nav
px:html-upgrade
px:html-downgrade
px:html-outline
px:html-merge
px:daisy202-rename-files
px:daisy202-update-links
px:smil-downgrade
pxi:create-ncc
pf:html-base-uri
pf:normalize-uri
Extract and verify the OPF.
Read the "page-list" navigation and label page break elements with epub:type="pagebreak".
Sort HTML files by spine order and delete HTML files that are not in spine. Note that the
navigation document may be part of the spine, in which case there will be the original
navigation document as well as the generated NCC.
Get spine.
Convert from EPUB 3 HTML to DAISY 2.02 HTML and identify page break elements.
Load content documents.
Identify page break elements and noteref elements
Get them from the navigation document.
Get them from epub:type="pagebreak" markup.
Normalize HTML5.
Drop "doc-backlink" elements because navigation to and from notes will be
handled through SMIL (see rearrange-notes). We drop all of them and assume they
are actually contained in a referenced note.
Downgrade to HTML4. This preserves all ID.
Make sure heading hierarchy is correct in output
Convert from EPUB 3 SMIL to DAISY 2.02 SMIL.
Load SMIL files.
Add systemRequired attributes (which will be converted to system-required)
Create DAISY 2.02 fileset
Make the base URI the directory containing the mimetype file.
- Delete package document (OPF).
- Delete table of contents (NCX).
- Delete mimetype and META-INF/.
- Delete files outside of the directory that contains the mimetype.
Create NCC file.
Move notes after their corresponding note refs in the media overlays.
Fix SMIL metadata and pretty print
Merge into single HTML document (workaround for Voice Dream Reader)
Rename content documents to .html.
Flatten DAISY 2.02 directory structure.
Don't rename CSS, images and font files because that could break links in CSS.
Finalize DAISY 2.02 fileset manifest: set DOCTYPE on XHTML and SMIL files
Move to final location