|
94 | 94 | <sect1 xml:id="apachefop"> |
95 | 95 | <title>Using the Apache FOP Renderer</title> |
96 | 96 | <para>By default eXist-db ships with and is configured to use Apache FOP. It is configured in eXist-db's <code>conf.xml</code> file through the following configuration option:</para> |
97 | | - <programlisting language="xml"><![CDATA[<module uri="http://exist-db.org/xquery/xslfo" class="org.exist.xquery.modules.xslfo.XSLFOModule"> |
98 | | - <parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter"/> |
99 | | -</module>]]></programlisting> |
| 97 | + <programlisting language="xml" xlink:href="listings/listing-3.xml"/> |
100 | 98 | <para> |
101 | 99 | An example of using Apache FOP to transform FO and save the result to a PDF file in the database. |
102 | 100 | </para> |
103 | 101 | <example> |
104 | 102 | <title>Using Apache FOP from XQuery</title> |
105 | | - <programlisting language="xquery" xlink:href="listings/listing-3.txt"/> |
| 103 | + <programlisting language="xquery" xlink:href="listings/listing-4.txt"/> |
106 | 104 | </example> |
107 | 105 |
|
108 | 106 | </sect1> |
|
116 | 114 | </listitem> |
117 | 115 | <listitem> |
118 | 116 | <para>eXist-db uses a number of configuration files, one per script, to determine which <code>jar</code> files to load. You should edit the XML files in the folder <code>$EXIST_HOME/etc</code> to add the following configuration (adjust the <emphasis>version</emphasis> numbers appropriately):</para> |
119 | | - <programlisting language="xml"><![CDATA[[<dependency> |
120 | | -<groupId>com.renderx.xep</groupId> |
121 | | -<artifactId>xep</artifactId> |
122 | | -<version>4.30.961</version> |
123 | | -<relativePath>xep.jar</relativePath> |
124 | | -</dependency> |
125 | | -<dependency> |
126 | | -<groupId>com.renderx.xep.thirdparty.com.jclark.xsl</groupId> |
127 | | -<artifactId>xt</artifactId> |
128 | | -<version>4.30.961</version> |
129 | | -<relativePath>xt.jar</relativePath> |
130 | | -</dependency>]]></programlisting> |
| 117 | + <programlisting language="xml" xlink:href="listings/listing-5.txt"/> |
131 | 118 | </listitem> |
132 | 119 | <listitem> |
133 | 120 | <para>Create the folder <code>$EXIST_HOME/renderx</code></para> |
|
139 | 126 | <para>Edit the file <code>$EXIST_HOME/renderx/xep.xml</code> to make the following changes:</para> |
140 | 127 | <itemizedlist> |
141 | 128 | <listitem> |
142 | | - <para>From:</para><programlisting language="xml"><![CDATA[<option name="LICENSE" value="license.xml"/>]]></programlisting> |
143 | | - <para>To:</para><programlisting language="xml"><![CDATA[<option name="LICENSE" value="renderx/license.xml"/>]]></programlisting> |
| 129 | + <para>From:</para><programlisting language="xml" xlink:href="listings/listing-6.xml"/> |
| 130 | + <para>To:</para><programlisting language="xml" xlink:href="listings/listing-7.xml"/> |
144 | 131 | </listitem> |
145 | 132 | <listitem> |
146 | | - <para>From:</para> <programlisting language="xml"><![CDATA[<option name="BROKENIMAGE" value="images/404.gif"/> |
147 | | -<option name="LOGO" value="images/logo-renderx.svg"/> |
148 | | -<option name="STAMP_PNG" value="images/stamp-renderx.png"/> |
149 | | -<option name="ROLE_MAP" value="rolemap.xml"/>]]></programlisting> |
150 | | - <para>To:</para> <programlisting language="xml"><![CDATA[<option name="BROKENIMAGE" value="renderx/images/404.gif"/> |
151 | | -<option name="LOGO" value="renderx/images/logo-renderx.svg"/> |
152 | | -<option name="STAMP_PNG" value="renderx/images/stamp-renderx.png"/> |
153 | | -<option name="ROLE_MAP" value="renderx/rolemap.xml"/>]]></programlisting> |
| 133 | + <para>From:</para> <programlisting language="xml" xlink:href="listings/listing-8.txt"/> |
| 134 | + <para>To:</para> <programlisting language="xml" xlink:href="listings/listing-9.txt"/> |
154 | 135 | </listitem> |
155 | 136 | <listitem> |
156 | | - <para>From:</para> <programlisting language="xml"><![CDATA[<fonts xml:base="fonts/" default-family="Helvetica">]]></programlisting> |
157 | | - <para>To:</para> <programlisting language="xml"><![CDATA[<fonts xml:base="renderx/fonts/" default-family="Helvetica">]]></programlisting> |
| 137 | + <para>From:</para> <programlisting language="xml" xlink:href="listings/listing-10.xml"/> |
| 138 | + <para>To:</para> <programlisting language="xml" xlink:href="listings/listing-11.xml"/> |
158 | 139 | </listitem> |
159 | 140 | <listitem> |
160 | | - <para>From:</para> <programlisting language="xml"><![CDATA[<languages default-language="en-US" xml:base="hyphen/">]]></programlisting> |
161 | | - <para>To:</para> <programlisting language="xml"><![CDATA[<languages default-language="en-US" xml:base="renderx/hyphen/">]]></programlisting> |
| 141 | + <para>From:</para> <programlisting language="xml" xlink:href="listings/listing-12.xml"/> |
| 142 | + <para>To:</para> <programlisting language="xml" xlink:href="listings/listing-13.xml"/> |
162 | 143 | </listitem> |
163 | 144 | </itemizedlist> |
164 | 145 | </listitem> |
|
167 | 148 | </listitem> |
168 | 149 | <listitem> |
169 | 150 | <para>Edit the file <code>$EXIST_HOME/conf.xml</code> to make the following changes:</para> |
170 | | - <para>From:</para> <programlisting language="xml"><![CDATA[<module uri="http://exist-db.org/xquery/xslfo" class="org.exist.xquery.modules.xslfo.XSLFOModule"> |
171 | | -<parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter"/> |
172 | | -</module>]]></programlisting> |
173 | | - <para>To: </para><programlisting language="xml"><![CDATA[<module uri="http://exist-db.org/xquery/xslfo" class="org.exist.xquery.modules.xslfo.XSLFOModule"> |
174 | | -<parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.RenderXXepProcessorAdapter"/> |
175 | | -</module>]]></programlisting> |
| 151 | + <para>From:</para> <programlisting language="xml" xlink:href="listings/listing-14.xml"/> |
| 152 | + <para>To: </para><programlisting language="xml" xlink:href="listings/listing-15.xml"/> |
176 | 153 | </listitem> |
177 | 154 | <listitem> |
178 | 155 | <para>If eXist-db was running whilst you were making these changes, then you will need to restart it for the change to take effect.</para> |
|
183 | 160 | </para> |
184 | 161 | <example> |
185 | 162 | <title>Using RenderX XEP from XQuery</title> |
186 | | - <programlisting language="xquery" xlink:href="listings/listing-4.txt"/> |
| 163 | + <programlisting language="xquery" xlink:href="listings/listing-16.txt"/> |
187 | 164 | </example> |
188 | 165 |
|
189 | 166 | </sect1> |
|
0 commit comments