Hey Lars,

I think there is an error in the zip part of your Ant buildfile. Try to
change "temp.mimetype" to "mimetype.zip".

<zip destfile="${output.dir}/mimetype.zip" ...
<zipfileset src="${output.dir}/mimetype.zip" ...

Best regards

Nils



2014-02-17 16:32 GMT+01:00 Lars Vogel <lars.vo...@gmail.com>:

> Hi,
>
> I'm generating epub from Docbook via Apache Ant and I'm getting the
> following error during the validation with Epubcheck.
>
>      [java] Epubcheck Version 3.0ERROR:
> /home/vogella/workspace/docu/de.vogella.publishing/../output/epub/book.epub:
> Extra field length for first filename must be 0, but was 20
>
> Any suggestion what might be causing the error.
>
> I generate the epub via the following snippet (see below).
>
> Thanks for any help, Lars
>
>  <target name="build-epub_eclipsercp" description="Generates EPUB files
> from DocBook XML">
> <xslt style="${epub.stylesheet}" extension=".html"
> basedir="${output.dir}/tmp2" destdir="${output.dir}/tmp">
>  <include name="*80_Book_Eclipse_RCP*/*book.xml" />
> <param name="epub.stylesheet" expression="style.css" />
>  <param name="html.stylesheet" expression="${stylesheet}" />
> <param name="section.autolabel" expression="1" />
>  <param name="chapter.autolabel" expression="1" />
> <param name="show.comments" expression="0" />
>  <param name="section.autolabel.max.depth" expression="1" />
> <param name="toc.section.depth" expression="1" />
>  <param name="section.label.includes.component.label" expression="1" />
> <param name="make.valid.html" expression="1" />
>  <param name="html.cleanup" expression="1" />
> <param name="chunker.output.encoding" expression="UTF-8" />
>  <param name="ignore.image.scaling" expression="1" />
> <outputproperty name="indent" value="yes" />
>  <classpath refid="saxon.class.path" />
> </xslt>
>
> <copy todir="${output.dir}/tmp/OEBPS">
>  <fileset dir="OEBPS">
> </fileset>
> </copy>
>
> <copy todir="${output.dir}/tmp/META-INF">
> <fileset dir="META-INF">
>  </fileset>
> </copy>
>
> <!-- Don't know how to avoid genereation of "${destfilename}.html" by
> Saxon -->
>  <delete file="${output.dir}/tmp/book.html" />
>
> <echo message="Generating book.epub" level="info" />
>
> <!-- We create temporary zips so that minetype is the first one in the
> final zip  -->
> <zip destfile="${output.dir}/temp.mimetype" basedir="${output.dir}/tmp"
> compress="false" includes="mimetype" />
>  <zip destfile="${output.dir}/temp.zip" basedir="${output.dir}/tmp/"
> level="9" compress="true" excludes="mimetype" includes="OEBPS/**
> META-INF/**" />
>  <zip destfile="${output.dir}/book.epub" update="true"
> keepcompression="true" encoding="UTF-8" excludes="*.html">
>  <zipfileset src="${output.dir}/temp.mimetype" />
> <zipfileset src="${output.dir}/temp.zip" />
>  </zip>
>
> <!-- Have to delete these directories would be nicer to place then in tmp
> output dir
>  <delete dir="./OEBPS" />
> <delete dir="./META-INF" />
> -->
>
> <!-- Make sure the epubcheck lib has a subfolder lib with saxon.jar and
> jing.jar in it
> -->
>  <epub.check epub="book" />
>
> </target>
>
>

Reply via email to