A new document has been created. http://cocoon.zones.apache.org/daisy/documentation/1360.html
Document ID: 1360 Branch: main Language: default Name: XPatch Document Type: Cocoon Document Created: 5/2/07 10:00:27 AM Creator (owner): Reinhard Pötz State: publish Parts ===== Content ------- Mime type: text/xml Size: 1834 bytes Content: <html> <body> <p>The xpatch mechanism enables you to split up your web.xml and put the snippets into the block it belongs too. It takes all *.xweb files from <tt>src/main/resources/META-INF/cocoon/xpatch</tt> and applies them to the generated <tt>web.xml</tt> file that you will find in <tt>target/rcl/webapp/WEB-INF/web.xml</tt>.</p> <p>Here is an example of an xweb file:</p> <pre><xweb <strong>xpath</strong>="/web-app" <strong>unless</strong>="comment()[contains(., 'Xindice XML-RPC Server servlet configuration')]" <strong>insert-after</strong>="servlet[last()]"> <!-- XMLDB Block, Xindice XML-RPC Server servlet configuration --> <servlet> <servlet-name>Xindice</servlet-name> <display-name>Xindice XML-RPC Server</display-name> <servlet-class>org.apache.xindice.server.XindiceServlet</servlet-class> <init-param> <param-name>xindice.configuration</param-name> <param-value>WEB-INF/xindice.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> </xweb> </pre> <p>This xweb file adds the Xindice-RPC Server servlet to your web.xml.</p> <h3>Syntax</h3> <table> <tbody> <tr> <th/> <th> <p>description</p> </th> </tr> <tr> <th> <p>xweb</p> </th> <td> <p>That's the root element. Everything it contains will be applied.</p> </td> </tr> <tr> <th> <p>@xpath</p> </th> <td> <p>The xpatch within web.xml where the xweb snippet should be applied to.</p> </td> </tr> <tr> <th> <p>@unless</p> </th> <td> <p>A condition when the patch should NOT be applied.</p> </td> </tr> <tr> <th> <p>@insert-after</p> </th> <td valign="top"> <p>Define the exact position within result of the xpath.</p> </td> </tr> </tbody> </table> </body> </html> Collections =========== The document belongs to the following collections: cdocs-maven-plugin