dita4publishers / org.dita4publishers.epub Goto Github PK
View Code? Open in Web Editor NEWDITA-to-EPUB transformation type
License: Apache License 2.0
DITA-to-EPUB transformation type
License: Apache License 2.0
Provide option of organizing EPUB contents using the OEBPS/ convention per examples in EPUB spec and test documents. Note that this organization is not mandated by the EPUB2 or EPUB3 standards.
These keydefs:
<keydefs>
<mapref
href="content/keydefs-content.ditamap"/>
<mapref
href="media/keydefs-media-pdf.ditamap"/>
<mapref
href="media/keydefs-media-epub.ditamap"/>
</keydefs>
Result in these OPF entries:
<item id="d70e17"
href="content/keydefs-content.xhtml"
media-type="application/xhtml+xml"/>
<item id="d70e19"
href="media/keydefs-media-pdf.xhtml"
media-type="application/xhtml+xml"/>
<item id="d70e21"
href="media/keydefs-media-epub.xhtml"
media-type="application/xhtml+xml"/>
Need one or more regression tests to verify that the EPUB transform works for OT 1.8 and 2.0.
Ideally should run epubcheck after building the EPUB.
Would be possible to unzip the EPUB and verify specific structures, but that might be too hard to maintain.
Users have the requirement to chunk output at the chapter level for EPUB where the same map would not be chunked for other HTML outputs (e.g., Web help).
Need to provide a way to automatically trigger chunking, e.g., a pre-process extension to add @chunk values to the map in advance of chunk processing.
Use the OT's "get string" facility to get localized versions of all generated strings.
EPUB3 mandates a restricted set of HTML5 files. Ensure that the HTML5 generated for EPUB3 conforms to the EPUB3 constraints.
Common practice for published EPUBs (at least for fiction) is to make part and chapter titles link back to their TOC entries. Since this is common publishing practice need to provide option to do this automatically.
In the module map2epubNavImpl.xsl, there is no CSS references in the xsl:result-document instruction that generates the NAV XHTML document. Actually there is a "FIXME" comment there.
<xsl:result-document href="{$resultUri}" format="html5">
<html
xmlns:epub="http://www.idpf.org/2007/ops"
>
<head>
<meta charset="utf-8" />
<!-- FIXME: May need to generate appropriate CSS references here -->
</head>
<body>
<xsl:for-each select="$navTypes">
<xsl:variable name="navType" as="xs:string" select="."/>
<xsl:message> + [INFO] Generating nav structure for type "<xsl:value-of select="$navType"/>"...</xsl:message>
<xsl:for-each select="$map">
<xsl:call-template name="generate-nav-structure">
<xsl:with-param name="doDebug" as="xs:boolean" tunnel="yes" select="$doDebug"/>
<xsl:with-param name="navType" select="$navType" as="xs:string" tunnel="yes"/>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:result-document>
Need to detect this case:
<front-cover keyref="coverpage" keys="coverpage"/>
This does not work.
Design and implement extension point to create flat list of links to major components of book
In map2epubContentImpl.xsl, topicheads are "expanded" to be their own DITA topics (c.f., <xsl:template match="*[df:isTopicHead(.)]" mode="generate-content">). The creation of their topic and title elements means their node URIs are that of the XSLT file rather than the context's (i.e., the topichead). It seems to me that the topic and title elements being created should retain the topichead's node URI in case someone wants to use those elements' URIs. I can't readily imagine typical use cases where that would actually occur. It would of course be easy to implement. (This decision will also apply to the HTML2 [which is going end of life soon] and Kindle plugins, which have identical code.)
The "Generated by html2xhtml mode..." comment in html2xhtml.xsl writes the timestamp to the generated ePub file. This means two executions of the plugin will produce different files. Setting this comment to only be executed when $doDebug is true.
See file sample_data/epub-test/chapters/reusable-resources/common-figures.xml
The relative path with a go-up is not being handled correctly: the absolute path is one level too low so copy instruction in copy-graphics.xml is wrong.
See http://www.idpf.org/epub/301/spec/epub-publications.html#sec-collection-elem
This is an optional component of an EPUB3 package.
Is it normal behaviour for pub ?
Should I replace the xpath expression for the template mode="generate-content"
?
match="*[df:class(., 'map/topicref')]">
by
match="*[df:class(., 'map/topicref')][not(@processing-role = 'resource-only')]
EPUB requires that each navigation reference to a file be the only reference to that file. Thus, each navigation reference must be to a separate HTML file or equivalent resource.
The process should behave as follows:
This processing could be implemented during the base chunk processing or during final map-driven HTML processing.
Update generation of OPF package document to reflect EPUB3 requirements.
For EPUB3, need a normal HTML5 navigation structure, as for the HTML5 transform.
The navigation generation should be an extension point that is easy to configure and customize.
Some publications collect chapter footnotes at the end of the book, e.g., No Greater Valor
Detect missing graphics and use the "missing graphics" images in the plugin's resources/ dir for any missing graphic.
This should be an optional behavior, with the option to continue to fail if any graphic cannot be found.
For EPUB3, the meta element uses the @Property attribute rather than @name, where @Property is a prefix-qualified name. See http://www.idpf.org/epub/301/spec/epub-publications.html#sec-meta-elem and http://www.idpf.org/epub/301/spec/epub-publications.html#sec-property-datatype
It's not yet clear what to do for DITA data elements with names that are not prefixed. Unprefixed names are inherently in the default vocabulary, which means you can't just put in any unprefixed name you want.
See http://www.idpf.org/epub/301/spec/epub-publications.html#sec-bindings-elem
This is an optional component of the EPUB3 package. There is no useful default but it might be necessary to generate when an EPUB includes non-standard media types.
Getting this failure:
The mimetype file has an extension of length 20. No filename extensions are permitted for the mimetype file.
From epubcheck for the EPUB Zip file generated by the Ant task. Have asked Radu and Jean Kaplansky for guidance. Using Oxygen's archive browser to open and save the EPUB file resolves the issue, so it must be something with how Ant's Zip implementation works.
Would like to avoid having custom Java code just to make the Zip file.
See http://www.idpf.org/epub/301/spec/epub-ocf.html#sec-container-metainf-encryption.xml
This file is required when obfuscated fonts are included. It is also required when any resource is itself encrypted.
Check Ant version and warn when version is < 1.9.1
See http://www.idpf.org/epub/301/spec/epub-publications.html#sec-publication-resources
When a referenced resource is not a core resource type, there must be a fallback. System needs to report lack of a fallback and/or generate appropriate fallbacks when possible.
Refactor code as necessary to put any HTML2-specific required by the EPUB transforms into a more generic plugin.
Need a way to specify and include embedded fonts in the generated EPUB file. Probably need a runtime parameter and maybe a conventional place to put fonts to be embedded. Since fonts need to be coordinated with the CSS it might make sense to just expect fonts to be in the same directory as the CSS file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.