Niels Grundtvig Nielsen wrote:
> I do realise the conversion/output options are provided by way of example,
> and indeed that it's not difficult to open the xhtml source in an editor
> afterwards ... but I was wondering if there was any simple way of persuading
> the conversion to leave references to svg graphics untouched.
It's certainly possible to have the XHTML/HTML generated by "Convert
Document" menu reference the SVG files specified in the XML source.
However for that you need to modify the following process commands:
* DocBook 4: docb.convertStep1 found in
XXE_install_dir/addon/config/docbook/xslMenu.incl.
* DocBook 5: docb.convertStep1 found in
XXE_install_dir/addon/config/docbook5/xslMenu.incl.
---
<resources match=".+\.(png|jpg|jpeg|gif)"
copyTo="resources" />
---
must be replaced:
---
<resources match=".+\.(png|jpg|jpeg|gif|svg|svgz)"
copyTo="resources" />
---
(This reads: if the document being converted references a resource
having a png, jpg, jpeg, gif, svg or svgz filename extension, simply
copy it to the resources/ directory (and hence, do not convert it to
another format.)
* DITA: dita.toXHTML, dita.toXHTML1, etc, found in
XXE_install_dir/addon/config/dita/xslMenu.incl.
---
<argument>-images</argument>
<argument>images/*.{png,jpg,jpeg,gif}</argument>
---
must be replaced by:
---
<argument>-images</argument>
<argument>images/*.{png,jpg,jpeg,gif,svg,svgz}</argument>
---
> If I've made the choice to deliver referenced graphics as svg, it's a bit
> surprising that the tool then knows better and generates png versions.
>
It's not that clear. One may use SVG files[*] and still want the
generated XHTML/HTML pages to be compatible with a maximum number of web
browsers.
FYI, even latest Internet Explorer 8 still does not support SVG
natively[**].
---
[*] Simply because she/he authored her/his graphics this way, or because
SVG files give great results when the same document is converted to PDF
or PostScript.
[**] On 1 January 2009, Adobe Systems discontinued the support for its
SVG Viewer plug-in; so you are somewhat stuck with IE.