cmlenz      2003/03/17 09:44:47

  Modified:    documentation/docs/xdocs sitemap.xml
               documentation/docs/xdocs/integration/ant navigation.xml
  Added:       documentation/docs/xdocs/integration/ant
                        task_webxmlmerge.xml
  Log:
  First cut of documentation for the <webxmlmerge> task, using a
  structure similar to the Ant manual. Also introduce a navigation
  specific to the Ant-Integration docs. Haven't yet figured out a nice way
  to provide a link back to the main navigation/site.
  
  Revision  Changes    Path
  1.19      +1 -0      jakarta-cactus/documentation/docs/xdocs/sitemap.xml
  
  Index: sitemap.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/sitemap.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sitemap.xml       12 Mar 2003 09:21:04 -0000      1.18
  +++ sitemap.xml       17 Mar 2003 17:44:47 -0000      1.19
  @@ -60,6 +60,7 @@
     <resource id="howto_ant_cactus" target="integration/ant/howto_ant_cactus.html"/>
     <resource id="howto_ant_install" target="integration/ant/howto_ant_install.html"/>
     <resource id="howto_ant_primer" target="integration/ant/howto_ant_primer.html"/>
  +  <resource id="task_webxmlmerge" target="integration/ant/task_webxmlmerge.html"/>
     <resource id="howto_httpunit" target="writing/howto_httpunit.html"/>
     <resource id="howto_sample" target="howto_sample.html"/>
     <resource id="howto_ejb" target="writing/howto_ejb.html"/>
  
  
  
  1.2       +13 -1     
jakarta-cactus/documentation/docs/xdocs/integration/ant/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/documentation/docs/xdocs/integration/ant/navigation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- navigation.xml    3 Feb 2003 10:52:38 -0000       1.1
  +++ navigation.xml    17 Mar 2003 17:44:47 -0000      1.2
  @@ -4,4 +4,16 @@
     "file:../../../dtds/navigation-v10.dtd">
   
   <navigation>
  -</navigation>
  \ No newline at end of file
  +
  +  <menu label="Ant Integration">
  +    <item id="howto_ant" label="Overview"/>
  +    <item id="howto_ant_install" label="Ant Installation"/>
  +    <item id="howto_ant_primer" label="Ant Primer"/>
  +    <item id="howto_ant_cactus" label="Using Cactus with Ant"/>
  +  </menu>
  +
  +  <menu label="Ant Tasks">
  +    <item id="task_webxmlmerge" label="WebXmlMerge"/>
  +  </menu>
  +
  +</navigation>
  
  
  
  1.1                  
jakarta-cactus/documentation/docs/xdocs/integration/ant/task_webxmlmerge.xml
  
  Index: task_webxmlmerge.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document id="task_webxmlmerge">
  
    <properties>
      <title>WebXmlMerge Ant Task</title>
      <authors>
        <author name="Christopher Lenz" email="[EMAIL PROTECTED]"/>
      </authors>
    </properties>
  
    <body>
  
    <section title="WebXmlMerge Task">
  
      <p>
        The task <strong>&lt;webxmlmerge&gt;</strong> provides a convenient way 
        to inject external definitions into a web deployment descriptor
        (<code>web.xml</code>) from an Ant build. It's primary intended use is to
        include the definition of the Cactus redirectors into the application's
        descriptor to enable testing the application with Cactus.
      </p>
  
      <section title="Parameters">
  
        <table>
          <tr>
            <th>Name</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
          <tr>
            <td>srcfile</td>
            <td>
              The original deployment descriptor.
            </td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>destfile</td>
            <td>
              The destination file.
            </td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>mergefile</td>
            <td>
              The descriptor containing the definitions that should be merged
              into the descriptor.
            </td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>encoding</td>
            <td>
              The character encoding of the destination file. If this attribute is
              ommitted, the character encoding of the source file will be applied.
            </td>
            <td>No</td>
          </tr>
          <tr>
            <td>force</td>
            <td>
              By default the task checks the modification times of the files before
              performing the merge. Set this attribute to <em>false</em> to perform
              the merge regardless of whether the destination file seems to be up
              to date.
            </td>
            <td>No</td>
          </tr>
          <tr>
            <td>indent</td>
            <td>
              Whether the resulting XML should be indented when written to the
              destination file.
            </td>
            <td>No, the default is <em>false</em></td>
          </tr>
        </table>
  
      </section>
  
      <section title="Nested Elements">
  
        <section title="xmlcatalog">
  
          <p>
            The <em>xmlcatalog</em> element can be used to perform Entity and URI
            resolution. This is a built-in Ant type. See the Ant documentation for
            details.
          </p>
  
        </section>
  
      </section>
  
      <section title="Examples">
  
        <p>
          The following example demonstrates the simplest-possible use of the
          task.
        </p>
  
        <source><![CDATA[
  <webxmlmerge srcfile="${src.conf.dir}/web.xml"
      destfile="${build.conf.dir}/web.xml"
      mergefile="${cactus.ant.home}/confs/web.xml"/>
  ]]></source>
  
        <p>
          To improve speed of the parsing process and enable offline operation,
          you should specify local paths to the web-app DTDs using a nested
          <em>xmlcatalog</em> element:
        </p>
  
        <source><![CDATA[
  <webxmlmerge srcfile="${src.conf.dir}/web.xml"
      destfile="${build.conf.dir}/web.xml"
      mergefile="${cactus.ant.home}/confs/web.xml">
    <xmlcatalog>
      <dtd publicid="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
          location="${src.dtd.dir}/web-app_2_2.dtd"/>
      <dtd publicid="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
          location="${src.dtd.dir}/web-app_2_3.dtd"/>
    </xmlcatalog>
  </webxmlmerge>
  ]]></source>
  
        <p>
          The following example demonstrates using an <em>xmlcatalog</em>
          by reference, so that it can also be used in other tasks (for 
          example to validate the descriptors). In addition, the
          <em>indent</em> attribute is set to <em>yes</em> to achieve better
          readability of the resulting descriptor.
        </p>
  
        <source><![CDATA[
  <xmlcatalog id="j2ee.dtds">
    <dtd publicid="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        location="${src.dtd.dir}/web-app_2_2.dtd"/>
    <dtd publicid="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        location="${src.dtd.dir}/web-app_2_3.dtd"/>
  </xmlcatalog>
  
  <webxmlmerge srcfile="${src.conf.dir}/web.xml"
      destfile="${build.conf.dir}/web.xml"
      mergefile="${cactus.ant.home}/confs/web.xml"
      indent="yes">
    <xmlcatalog refid="j2ee.dtds"/>
  </webxmlmerge>
  ]]></source>
  
      </section>
  
    </section>
  
    </body>
  </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to