On 15.8.2012 18:38, Richard L Hamilton wrote: > At different times I've used kindlegen and calibre for ePub to MOBI > conversion, with varying results, but I've never been 100% happy with the > result from either. > > Does anyone on the list have any suggestions as to which of these (or which > alternative) is the best choice for conversion when the ePub was generated > using the DocBook stylesheets?
Personally I haven't faced many serious problem when I was converting
output of epub3 stylesheet with Calibre. What I did was to adjust
resulting XHTML files prior packing into .epub. I used attached
stylesheet and simple Ant target:
<!-- Kindleize HTML -->
<target name="kindleize">
<xslt style="${home.dir}/kindleize.xsl" force="true"
basedir="${out.dir}" includes="*.xhtml" destdir="${out.dir}/kindle">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${saxon9.jar}"/>
</xslt>
</target>
HTH,
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: [email protected] http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="h xsl"
version="1.0">
<xsl:output
encoding="UTF-8"
omit-xml-declaration="no"/>
<xsl:template match="/">
<xsl:text disable-output-escaping="yes"><!DOCTYPE html></xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="h:li/h:p">
<xsl:apply-templates/>
<br/>
</xsl:template>
</xsl:stylesheet>
signature.asc
Description: OpenPGP digital signature
