epub:create-ocf create-ocf
epubtools/modules/create-ocf/xpl/create-ocf.xpl
Import URI: http://transpect.le-tex.de/epubtools/modules/create-ocf/xpl/create-ocf.xpl
This step is used to create the directory structure of the OCF Abstract Container. It is required to provide as option the path to the source html file.
Visualisation
The pre-creation of this SVG image needs the Graphviz software installed. Please inform your project maintainer.
Input Ports
Name | Documentation | Connections |
---|---|---|
source | ||
meta | an epub-config document, see epub:convert |
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅⓈ | ||
files |
Options
Name | Documentation | Default |
---|---|---|
base-uriⓇ | ||
debug | 'no' | |
debug-dir-uri | 'debug' |
Subpipeline
Step | Inputs | Outputs | Options | |||||
---|---|---|---|---|---|---|---|---|
p:variable variant | meta on create-ocf | (/epub-config/@variant, '')[1] | ||||||
p:variable layout | meta on create-ocf | (/epub-config/@layout, 'reflowable')[1] | ||||||
p:group basic-files | ||||||||
p:choose which-files | ||||||||
not(tokenize($variant, '\s+') = ('FIXED-Apple', 'ORIGINAL-CSS')) | ||||||||
p:identity basic-files-1 |
| result | ||||||
p:otherwise | ||||||||
p:identity basic-files-2 |
| result | ||||||
p:sink d451e88 |
| |||||||
p:group apple-display | ||||||||
p:choose load-options | ||||||||
tokenize($variant, '\s+') = 'ORIGINAL-CSS' | ||||||||
p:identity d451e106 |
| result | ||||||
p:sink d451e108 | ||||||||
p:otherwise | ||||||||
p:identity d451e118 |
| result | ||||||
p:sink d451e120 | ||||||||
p:sink d451e124 |
| |||||||
p:delete right-options |
| result | match = '*:option[@name ne 'specified-fonts']' | |||||
p:sink d451e132 |
| |||||||
p:group create | ||||||||
p:variable workdir | replace($base-uri, '^(.*[/])+(.*)', '$1') | |||||||
p:identity report |
| result | ||||||
cxf:delete del | result | recursive = 'true' fail-on-error = 'false' href = concat($workdir, 'epub') | ||||||
cxf:mkdir mkdir1 | result | href = concat($workdir, 'epub') | ||||||
cxf:mkdir mkdir2 | result | href = concat($workdir, 'epub/META-INF') | ||||||
cxf:mkdir mkdir3 | result | href = concat($workdir, 'epub/OEBPS') | ||||||
p:store store1 |
| result | method = 'xml' media-type = 'text/xml' omit-xml-declaration = 'false' href = concat($workdir, 'epub/META-INF/container.xml') | |||||
p:store store2 |
| result | method = 'text' media-type = 'text/plain' encoding = 'US-ASCII' href = concat($workdir, 'epub/mimetype') | |||||
p:choose fixed | ||||||||
$layout = 'fixed' or tokenize($variant, '\s+') = 'ORIGINAL-CSS' | ||||||||
p:try try-fixed | ||||||||
p:group d451e211 | ||||||||
cxf:info d451e220 | result | fail-on-error = 'true' href = concat($workdir, 'com.apple.ibooks.display-options.xml') | ||||||
p:load load-applemetadata | result | href = concat($workdir, 'com.apple.ibooks.display-options.xml') | ||||||
p:store apple-meta |
| result | method = 'xml' media-type = 'text/xml' omit-xml-declaration = 'false' href = concat($workdir, 'epub/META-INF/com.apple.ibooks.display-options.xml') | |||||
p:catch d451e241 | error | |||||||
p:store otherwise |
| result | method = 'xml' media-type = 'text/xml' omit-xml-declaration = 'false' href = concat($workdir, 'epub/META-INF/com.apple.ibooks.display-options.xml') | |||||
p:otherwise | ||||||||
p:sink sink |
| |||||||
p:identity d451e278 |
| result | ||||||
p:sink d451e286 |