|
68 | 68 | <para>If no action is specified within the dispatch element, the request will be passed through the filter chain and handled normally. The same happens if the action is the
|
69 | 69 | <tag>ignore</tag>
|
70 | 70 | element. For example, the simplest controller script consist of a single ignore:</para>
|
71 |
| - <para>eXist's URL rewriting mechanism lets you specify an <tag>error handler</tag> element for each dispatch directive in your <literal>controller.xql</literal>.</para> |
| 71 | + <para>eXist's URL rewriting mechanism lets you specify an <tag>error handler</tag> element for each dispatch directive in your <literal>controller.xq</literal>. <emphasis>NOTE</emphasis>: In eXist-db versions prior to 5.3.0, <literal>controller.xql</literal> must be used instead.</para> |
72 | 72 | <programlisting language="xml" xlink:href="listings/listing-4.xml"/>
|
73 | 73 |
|
74 | 74 | <note>
|
|
87 | 87 | <title>Variables</title>
|
88 | 88 |
|
89 | 89 | <para>Within a
|
90 |
| - <code>controller.xql</code> |
| 90 | + <code>controller.xq</code> |
91 | 91 | file, you have access to the entire XQuery function library, including the functions in the
|
92 | 92 | <code>request</code>,
|
93 | 93 | <code>response</code>
|
|
253 | 253 | <title>Locating Controller Scripts and Configuring Base Mappings</title>
|
254 | 254 |
|
255 | 255 | <para>By convention, the controller XQueries are called
|
256 |
| - <literal>controller.xql</literal>.</para> |
| 256 | + <literal>controller.xq</literal>.</para> |
257 | 257 | <para>
|
258 | 258 | <code>XQueryURLRewrite</code>
|
259 | 259 | will try to guess the path to the controller by looking at the request path.
|
|
288 | 288 | <literal>/rest</literal>
|
289 | 289 | in
|
290 | 290 | <literal>web.xml</literal>, we would need to make sure that this path is ignored in our main
|
291 |
| - <literal>controller.xql</literal>. However, if the mapping is done via |
| 291 | + <literal>controller.xq</literal>. However, if the mapping is done via |
292 | 292 | <literal>controller-config.xml</literal>, it will already been known to XQueryURLRewrite and we don't need take care of the path in our controller.</para>
|
293 | 293 | <para>The
|
294 | 294 | <tag>root</tag>
|
|
338 | 338 | <literal>webapp/stylesheets/db2html.xsl</literal>. This can be done by returning the following
|
339 | 339 | <tag>dispatch</tag>
|
340 | 340 | fragment by
|
341 |
| - <literal>controller.xql</literal>:</para> |
| 341 | + <literal>controller.xq</literal>:</para> |
342 | 342 | <programlisting language="xml" xlink:href="listings/listing-9.xml"/>
|
343 | 343 | <para>In this example there's no forwarding action except for the view So the request will be handled by the servlet engine the normal way. The response is then passed to
|
344 | 344 | <code>XSLTServlet</code>. A new HTTP POST request is created whose body is set to the response data of the previous step.
|
|
561 | 561 | <title>Accessing resources not stored in the database</title>
|
562 | 562 |
|
563 | 563 | <para>If your
|
564 |
| - <code>controller.xql</code> |
| 564 | + <code>controller.xq</code> |
565 | 565 | is stored in a database collection, all relative and/or absolute URIs within the controller will be resolved against the database, not the file system. This can be a problem if you need to access common resources, which should be shared with other
|
566 | 566 | applications residing on the file system or in the database.</para>
|
567 | 567 | <para>The
|
|
0 commit comments