Skip to content

Commit f4bd928

Browse files
yamahitoadamretter
authored andcommitted
[bugfix] Fix grammar issues
1 parent ed5a255 commit f4bd928

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/main/xar-resources/data/urlrewrite/urlrewrite.xml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<sect2 xml:id="eg2">
4242
<title>Example 2: Defining a Pipeline</title>
4343
<para>Real world controllers are typically more complex and may contain arbitrary XQuery code to distinguish between different scenarios. The URL rewriting framework allows you to turn simple requests into complex processing pipelines, involving any number of steps.</para>
44-
<para>For example, let us split above <tag>dispatch</tag> fragment into a pipeline involving two steps:</para>
44+
<para>For example, let us split the <tag>dispatch</tag> fragment above into a pipeline involving two steps:</para>
4545
<orderedlist>
4646
<listitem>
4747
<para>load the resource to be transformed</para>
@@ -332,15 +332,8 @@
332332
</para>
333333
</listitem>
334334
</itemizedlist>
335-
<para>The
336-
<tag>forward</tag>
337-
tags specify path mappings for common servlets, similar to a servlet mapping in
338-
<literal>web.xml</literal>. The advantage is that XQueryURLRewrite becomes a single point of entry for the entire web application and we don't need to handle any of the servlet paths in the main controller. For example, if we registered a servlet mapping for
339-
<literal>/rest</literal>
340-
in
341-
<literal>web.xml</literal>, we would need to make sure that this path is ignored in our main
342-
<literal>controller.xq</literal>. However, if the mapping is done via
343-
<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>
335+
<para>The <tag>forward</tag> tags specify path mappings for common servlets, similar to a servlet mapping in <literal>web.xml</literal>. The advantage is that XQueryURLRewrite becomes a single point of entry for the entire web application and we don't need to handle any of the servlet paths in the main controller.</para>
336+
<para>For example, if we registered a servlet mapping for <literal>/rest</literal> in <literal>web.xml</literal>, we would need to make sure that this path is ignored in our main <literal>controller.xq</literal>. However, if the mapping is done via <literal>controller-config.xml</literal>, XQueryURLRewrite will have already handled the path, which won't need to be accounted for in our controller.</para>
344337
<para>The
345338
<tag>root</tag>
346339
elements define the roots of a directory or database collection hierarchy, mapped to a certain base path. For example, the default
@@ -390,12 +383,7 @@
390383
fragment by
391384
<literal>controller.xq</literal>:</para>
392385
<programlisting language="xml" xlink:href="listings/listing-9.xml"/>
393-
<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
394-
<code>XSLTServlet</code>. A new HTTP POST request is created whose body is set to the response data of the previous step.
395-
<code>XSLTServlet</code>
396-
gets the path to the stylesheet from the request attribute
397-
<code>xslt.stylesheet</code>
398-
and applies it to the data.</para>
386+
<para>In this example there are no forwarding actions except for the view, so the request will be handled by the servlet engine the normal way. The response is then passed to <code>XSLTServlet</code>. A new HTTP POST request is created whose body is set to the response data of the previous step. <code>XSLTServlet</code> gets the path to the stylesheet from the request attribute <code>xslt.stylesheet</code> and applies it to the data.</para>
399387
<para>If any step in the pipeline generates an error or returns an HTTP status code &gt;= 400, the pipeline processing stops and the response is send back to the client immediately. The same happens if the first step returns with an HTTP status 304
400388
(NOT MODIFIED), which indicates that the client can use the version it has cached.</para>
401389
<para>We can also pass a request through more than one view. The following fragment applies two stylesheets in sequence:</para>

0 commit comments

Comments
 (0)