On 06/30/2011 01:53 PM, Thomas Dumm wrote:
>
> Is there a document conversion parameter in XMLmind under options /
> customize configuration in the « Convert to Epub » Group of parameters,
> that causes the referenced svg-images to be left untouched.
>
> Now the referenced svg-imgaes in my docbook5-file are converted into
> .png images (and this with a very low resolution that I was not able to
> change).
>
Specifying XSLT stylesheet parameter use.svg=1 is not sufficient.
The process command which is used to generate EPUB automatically
converts SVG to PNG. Rationale: SVG is not yet well-supported by all
EPUB readers.
You need to modify the db5.toEpub process command.
Excerpts from XXE_install_dir/addon/config/docbook5/xslMenu.incl:
---
<command name="db5.toEpub">
<process>
<mkdir dir="raw" />
<mkdir dir="images" />
<mkdir dir="META-INF" />
<copyDocument to="__doc.xml">
<!-- ============================================================
Support for DocBook 5 imagedata/svg:svg, imagedata/mml:math
and *equation/mml:math.
============================================================ -->
<cfg:extract xmlns=""
xmlns:db5="http://docbook.org/ns/docbook"
xmlns:svg="http://www.w3.org/2000/svg"
xpath="//db5:imagedata/svg:svg" toDir="raw" >
<cfg:attribute name="fileref"
value="images/{$url.rootName}.png" />
</cfg:extract>
<cfg:extract xmlns=""
xmlns:db5="http://docbook.org/ns/docbook"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xpath="//db5:imagedata/mml:math" toDir="raw" >
<cfg:attribute name="fileref"
value="images/{$url.rootName}.png" />
</cfg:extract>
<cfg:extract xmlns=""
xmlns:db5="http://docbook.org/ns/docbook"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xpath="//db5:equation/mml:math |
//db5:informalequation/mml:math |
//db5:inlineequation/mml:math" toDir="raw" >
<db5:imagedata fileref="images/{$url.rootName}.png" />
</cfg:extract>
<resources match="(https|http|ftp)://.*" />
<!-- Support for textdata/@fileref.
add your favorite text file extensions here: -->
<resources
match=".+\.(txt|text|htm|html|xml|h|c|cpp|java|js|tcl|py|pl|rb)"
copyTo="." />
<resources match=".+\.(png|jpg|jpeg|gif)"
copyTo="images" />
<resources match="(?:.+/)?(.+)\.(\w+)"
copyTo="raw" referenceAs="images/$1.png" />
<resources match=".+"
copyTo="images" />
</copyDocument>
<convertImage from="raw" to="images" format="png" />
---
must be replaced by:
---
<command name="db5.toEpub">
<process>
<mkdir dir="raw" />
<mkdir dir="images" />
<mkdir dir="META-INF" />
<copyDocument to="__doc.xml">
<resources match="(https|http|ftp)://.*" />
<!-- Support for textdata/@fileref.
add your favorite text file extensions here: -->
<resources
match=".+\.(txt|text|htm|html|xml|h|c|cpp|java|js|tcl|py|pl|rb)"
copyTo="." />
<resources match=".+\.(svg|png|jpg|jpeg|gif)"
copyTo="images" />
<resources match="(?:.+/)?(.+)\.(\w+)"
copyTo="raw" referenceAs="images/$1.png" />
<resources match=".+"
copyTo="images" />
</copyDocument>
<convertImage from="raw" to="images" format="png" />
---
* removed the cfg:extract elements
* prepended svg| before png|jpg|jpeg|gif
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support