We'll explain how to add a custom conversion by using the
following example: define a conversion called "refCardToPS" which
allows to convert a quick reference card to PostScript using Apache FOP. The
XSLT stylesheets needed to perform that conversion are found in
/opt/quickrefcard/
.
E:\opt\xslsrv/
.
AttentionMay be you'll have to slightly modify your custom
XSLT stylesheets in order to use them in XMLmind XSL Server. Let's use
an example to explain a possible issue.
When you use XMLmind XSL
Server to convert a remote document such as https://www.xmlmind.com/xmleditor/_distrib/demo/docbook/docbook-image.xml
to PDF or RTF , the server generates a temporary XSL-FO file on its
host. Let's call this temporary file
/tmp/xslu12345.fo .By default, an XML
element such as:
<imagedata fileref="graphics/fish1.png" format="PNG"/> is translated to something like:
<fo:external-graphic src="graphics/fish1.png" content-type="content-type:image/png"/> Unfortunately
this cannot work because there is no
/tmp/graphics/fish1.png file on the host running
XMLmind XSL Server.Instead, the above XML element should be
translated to:
<fo:external-graphic src="https://www.xmlmind.com/xmleditor/_distrib/demo/graphics/fish1.png" content-type="content-type:image/png"/> The
dbToXXX and db5ToXXX
conversion specifications pass a number of parameters such as img.src.path to their XSLT
stylesheets in order to get absolute URLs in the generated XSL-FO
file. May be you'll have to add a similar facility to your own XSL
stylesheets.(1).
|
(1) |
The xhtmlToXXX conversion
specifications pass img-src-path to their XSLT
stylesheets.
The ditaToXXX conversion
specifications, which use XMLmind DITA
Converter (ditac), have no such
issue.
|