<command name="docb.convertToRTF"> <macro> <sequence> <command name="selectFile" parameter="saveFileURL" /> <command name="docb.toRTF" parameter='"%0" "%1" "%_"' /> </sequence> </macro> </command> <command name="docb.toRTF"> <process> <mkdir dir="resources" /> <mkdir dir="raw" /> <copyDocument to="__doc.xml"> <resources match="(https|http|ftp)://.*" /> <resources match=".+\.(png|jpg|jpeg|gif)" copyTo="resources" /> <resources match="(?:.+/)?(.+)\.(\w+)" copyTo="raw" referenceAs="resources/$1.png" /> <resources match=".+" copyTo="resources" /> </copyDocument> <convertImage from="raw" to="resources" format="png" /> <mkdir dir="images/callouts" /> <copyProcessResources resources="xsl/images/draft.png" to="images" /> <copyProcessResources resources="@xsl/images/callouts/png_callouts.list" to="images/callouts" /> <transform stylesheet="xsl/fo/docbook.xsl" file="__doc.xml" to="__doc.fo"> <parameter name="use.extensions">1</parameter> <!-- Cannot work and generates a lot of error messages. --> <parameter name="graphicsize.extension">0</parameter> <parameter name="paper.type">A4</parameter> <parameter name="generate.toc">%0</parameter> <parameter name="toc.section.depth">3</parameter> <parameter name="section.autolabel">%1</parameter> <parameter name="callout.graphics">1</parameter> <parameter name="shade.verbatim">1</parameter> <parameter name="ulink.show">0</parameter> <parameterGroup name="docb.toRTF.transformParameters" /> </transform> <processFO processor="XFC" file="__doc.fo" to="__doc.rtf"> <parameter name="outputEncoding">Cp1252</parameter> <parameterGroup name="docb.toRTF.XFCParameters" /> </processFO> <upload base="%2"> <copyFile file="__doc.rtf" to="%2" /> </upload> </process> </command>
The
| |
Images referenced in the DocBook document which are in formats supported by the XFC FO processor (GIF, JPEG and PNG) will be copied to directory | |
Images referenced in the DocBook document which are in formats not supported by the XFC FO processor will be copied to directory | |
Copy document being edited as The copied document is flattened: all references to external entities and all XIncludes are expanded. As specified by | |
References to really absolute resources are not modified in the copy of the document. | |
References to PNG, GIF, JPEG graphics files are modified to point to the copies which are made in directory | |
References to other graphics files are modified to point to the converted images that will be generated in directory | |
Converts all images found in directory | |
Copies resources internally used by the | |
Transforms the copy of the document | |
This Example of such <parameterGroup name="docb.toRTF.transformParameters"> <parameter name="callout.graphics">0</parameter> <parameter name="variablelist.as.blocks">1</parameter> </parameterGroup> | |
Convert XSL-FO file | |
Copies local RTF file The element is called |