OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Generated epub to mobi - lists are incorrectly displayed


On 29.10.2011 11:59, Lars Vogel wrote:

> thanks. This also looks like a great solution. I think the suggestion from
> Robert is easier for my toolchain as I only have to change the customization
> layer and not have an additional step. But your suggestion is great as it
> shows options how to further influence the result.
> 
> How to you separate the step XHTML and EPUB creation? I believe the epub
> XSLT stylesheets do this in one step?

I use Ant to manage build process. I have separate target for Kindle
which applies this fixing transformation on output of DocBook
stylesheets before ziping final epub file. Something like:

  <target name="kindle">
    ... call normal DocBook epub stylesheet ..

    <!-- Make fixes for Kindle in generated XHTML -->
    <xslt style="kindleize.xsl" force="true" basedir="${out.dir}"
includes="*.xhtml" destdir="${out.dir}/kindle">
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
      <classpath location="${saxon9.jar}"/>
    </xslt>

    <!-- Replace original XHTML files with "kindleized" ones -->
    <copy todir="${out.dir}">
      <fileset dir="${out.dir}/kindle"/>
      <globmapper from="*.html" to="*.xhtml"/>
    </copy>

    <!-- Delete temporary "kindleized" files -->
    <delete dir="${out.dir}/kindle"/>

    <!-- Build final epub package -->
    <zip destfile="${out}-kindle.epub"
	 basedir="ebook"
	 includes="mimetype"
	 compress="false"
	 />
    <zip destfile="${out}-kindle.epub"
	 basedir="ebook"
	 excludes="mimetype"
	 update="true"
	 compress="true"
	 keepcompression="true"
	 />

  </target>


-- 
------------------------------------------------------------------
  Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
  Profesionální školení a poradenství v oblasti technologií XML.
       Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
  http://docbook.cz    Stránky o dokumentačním formátu DocBook
  http://xmlguru.cz    Blog mostly about XML for English readers
------------------------------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]