I'm sorry but there is a misunderstanding here. XMLmind XML Editor does
not provide any way to convert MathML to SVG in order workaround a
limitation of RenderX XEP.
Unlike Apache FOP, XMLmind XSL-FO Converter and Antenna House XSL
Formatter, RenderX XEP does not support MathML at all.
Moreover the error message reported by RenderX XEP is completely
incorrect. For example, Render XEP says:
---
XEP error: Failed to create image
file:/tmp/xxe6447450936759804317_d/resources/imagedata_tmp_2.mml of type
null (com.renderx.graphics.ImageFormatException:
org.xml.sax.SAXException: Root element in an SVG image
file:/tmp/xxe6447450936759804317_d/resources/imagedata_tmp_2.mml is not
in the SVG namespace (http://www.w3.org/2000/svg))
---
RenderX XEP thinks that imagedata_tmp_2.mml is an SVG file despite that
fact this file starts with:
---
<?xml version="1.0" encoding="UTF-8"?>
<math
display="block"
xmlns="http://www.w3.org/1998/Math/MathML"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook"
>
...
---
File imagedata_tmp_2.mml which has been automatically extracted from
some MathML embedded in a DocBook 5 document:
---
<mediaobject>
<imageobject>
<imagedata>
<m:math display="block">
<m:mi>x</m:mi>
<m:mo>=</m:mo>
<m:mfrac>
<m:mrow>
<m:mrow>
<m:mo>-</m:mo>
<m:mi>b</m:mi>
</m:mrow>
<m:mo>±</m:mo>
<m:msqrt>
<m:msup>
<m:mi>b</m:mi>
<m:mn>2</m:mn>
</m:msup>
<m:mo>-</m:mo>
<m:mrow>
<m:mn>4</m:mn>
<m:mo>⁢</m:mo>
<m:mi>a</m:mi>
<m:mo>⁢</m:mo>
<m:mi>c</m:mi>
</m:mrow>
</m:msqrt>
</m:mrow>
<m:mrow>
<m:mn>2</m:mn>
<m:mo>⁢</m:mo>
<m:mi>a</m:mi>
</m:mrow>
</m:mfrac>
</m:math>
</imagedata>
</imageobject>
</mediaobject>
---
is in fact a valid MathML file.
On 10/19/2015 10:26 PM, Martin Goik wrote:
Dear all,
referring to an older answer the setup being given at
http://www.mail-archive.com/xmleditor-support%40xmlmind.com/msg04583.html
describes MathML Docbook5 PDF support by converting mml to svg and
subsequently using RenderX's xep svg capabilities.
This setup works for xmlmind 6.4 apart from a very small failure.
Extracting docbook equations yields correct mathml exports being
transformed into individual svg images. However the <svg> root
elements do not carry any namespace attribute:
<svg fill-opacity="1" ... , but no xmlns="http://www.w3.org/2000/svg"
whatsoever, resulting in an xep Exception:
xxetool: error: XEP error: Failed to create image
file:/tmp/xxe1997919912855643128_d/resources/fig_tmp_0.svg of type
null (com.renderx.graphics.ImageFormatException:
org.xml.sax.SAXException: Root element in an SVG image
file:/tmp/xxe1997919912855643128_d/resources/fig_tmp_0.svg is not in
the SVG namespace (http://www.w3.org/2000/svg))
After executing xxetool with "-d" option I added the missing xmlns
attribute by editing fig_tmp_0.svg manually. A subsequent execution of
xep on __doc.fo gives the desired PDF result. I've however no clue at
all how to convince the mml --> svg conversion process to provide the
required namespace on its own. All parameters I've found so far below
http://www.xmlmind.com/xmleditor/addons_doc.html#jeuclid_imagetoolkit
are totally unrelated to namespace considerations.
Martin Goik
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support