commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/xdocs/tag-reference ant_setProperty.xml ant_ant.xml index.xml ant_fileScanner.xml template.xml
Date Tue, 30 Nov 2004 05:01:13 GMT
dion        2004/11/29 21:01:13

  Added:       jelly/xdocs/tag-reference ant_setProperty.xml ant_ant.xml
                        index.xml ant_fileScanner.xml template.xml
  Log:
  Add initial tag ref prototype
  
  Revision  Changes    Path
  1.1                  jakarta-commons/jelly/xdocs/tag-reference/ant_setProperty.xml
  
  Index: ant_setProperty.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 2002,2004 The Apache Software Foundation.
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <document>
  
   <properties>
    <title>Jelly Tag Reference (ant:setProperty)</title>
   </properties>
  
    <body>
  
      <section name="Home Page">
        <p>See 
          <a href="http://jakarta.apache.org/commons/jelly/libs/ant/">http://jakarta.apache.org/commons/jelly/libs/ant/</a>
        </p>
      </section>
  
      <section name="Description">
        <p>
          This tag sets an attribute of an Ant task or datatype if the given value is not
null. This is very useful in
          allowing attributes of ant tasks to be set conditionally without ugly if/then/else
logic.
        </p>
      </section>
      
      <section name="Attributes">
        <table>
          <tr>
            <th>Name</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
          <tr>
            <td>name</td>
            <td>The name of the attribute of the ant task to set</td>
            <td>Yes</td>
          </tr>
          <tr>
            <td>value</td>
            <td>The value to give the attribute of the ant task</td>
            <td>Yes.</td>
          </tr>
          <tr>
            <td>default</td>
            <td>The default value to give the attribute of the ant task, if the <code>value</code>
provided is null.</td>
            <td>No</td>
          </tr>
        </table>
      </section>
      
      <section name="Examples">
        <p>
          This tag is <strong>always</strong> nested inside of another Ant task,
target or datatype.
        </p>
        <source><![CDATA[
  <j:jelly xmlns:j="jelly:core" xmlns:ant="jelly:ant">
    <ant:javac
      destdir="${maven.build.dest}"
      excludes="**/package.html"
      debug="${maven.compile.debug}"
      deprecation="${maven.compile.deprecation}"
      optimize="${maven.compile.optimize}">
    
      <ant:setProperty name="encoding" value="${maven.compile.encoding}" />
            
      <ant:setProperty name="executable" value="${maven.compile.executable}" />
  
    </ant:javac>
  </j:jelly>
        ]]></source>
      
      </section>
      
    </body>
  </document>
  
  
  1.1                  jakarta-commons/jelly/xdocs/tag-reference/ant_ant.xml
  
  Index: ant_ant.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 2002,2004 The Apache Software Foundation.
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <document>
  
   <properties>
    <title>Jelly Tag Reference (ant:ant)</title>
    <author email="dion@apache.org">Dion Gillard</author>
   </properties>
  
    <body>
  
      <section name="Home Page">
        <p>See 
          <a href="http://jakarta.apache.org/commons/jelly/libs/ant/">http://jakarta.apache.org/commons/jelly/libs/ant/</a>
        </p>
      </section>
  
      <section name="Description">
        <p>
          This tag represents all <a href="http://ant.apache.org/manual/anttaskslist.html">Ant
tasks</a>, and 
          can create any <a href="http://ant.apache.org/">Ant</a> task, target
or datatype dynamically from the
          tag name you use, e.g. &lt;copy&gt;
        </p>
        <p>
          Any tag <strong>not</strong> defined in the Jelly tag library for Ant
is assumed to be an Ant task, target
          or datatype. When Jelly tries to execute an undefined tag, it looks for an Ant task,
target or datatype to match
          the tag name, and if found, matches the tag's attributes to the Ant element's attributes,
as Ant would.
        </p>
      </section>
      <section name="Examples">
        <p>
          You never code this tag directly, instead you use it by defining the ant tag library
namespace 
          and the using an Ant element. For example,
          to use the <a href="http://ant.apache.org/manual/CoreTasks/copy.html">Ant
copy task</a> you would code something similar
          to this:
        </p>
        <source><![CDATA[
  <jelly xmlns:ant="jelly:ant">
    <ant:copy file="myfile.txt" tofile="mycopy.txt"/>
  <jelly>
  ]]></source>
      </section>
    </body>
  </document>
  
  
  
  1.1                  jakarta-commons/jelly/xdocs/tag-reference/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 2002,2004 The Apache Software Foundation.
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <document>
  
   <properties>
    <title>Jelly Tag Reference</title>
   </properties>
  
    <body>
  
      <section name="Overview">
        <p>
          This tag reference details all tags available for Jelly along with
          an example of it's usage.
        </p>
      </section>
    </body>
  </document>
  
  
  1.1                  jakarta-commons/jelly/xdocs/tag-reference/ant_fileScanner.xml
  
  Index: ant_fileScanner.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 2002,2004 The Apache Software Foundation.
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <document>
  
   <properties>
    <title>Jelly Tag Reference (ant:fileScanner)</title>
    <author email="dion@apache.org">Dion Gillard</author>
   </properties>
  
    <body>
  
      <section name="Home Page">
        <p>See 
          <a href="http://jakarta.apache.org/commons/jelly/libs/ant/">http://jakarta.apache.org/commons/jelly/libs/ant/</a>
        </p>
      </section>
  
      <section name="Description">
        <p>
          This tag creates a <code>FileScanner</code> object so that you can loop
over the contents of an Ant
          <a href="http://ant.apache.org/manual/CoreTypes/fileset.html">fileset</a>.
        </p>
        <p>
          The <code>FileScanner</code> object has the following useful methods:
          <ul>
            <li><code>Iterator iterator()</code>: returns an iterator of
the files in the nested filesets.</li>
            <li><code>Iterator directories()</code>: returns an iterator
of the directories in the nested filesets.</li>
            <li><code>boolean hasFiles()</code>: returns true if there are
files in the nested filesets..</li>
          </ul>
        </p>
      </section>
      
      <section name="Attributes">
        <table>
          <tr>
            <th>Name</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
          <tr>
            <td>var</td>
            <td>The variable name for the <code>FileScanner</code> object</td>
            <td>Yes</td>
          </tr>
        </table>
      </section>
      
      <section name="Nested Elements">
        <table>
          <tr>
            <th>Name</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
          <tr>
            <td>fileset</td>
            <td>Any valid ant <a href="http://ant.apache.org/manual/CoreTypes/fileset.html">fileset</a>.</td>
            <td>No</td>
          </tr>
        </table>
      </section>
  
      <section name="Examples">
        <source><![CDATA[
  <j:jelly xmlns:j="jelly:core" xmlns:ant="jelly:ant">
    <ant:fileScanner var="pluginProjects">
      <ant:fileset dir="${basedir}">
        <ant:include name="jelly-tags/*/project.xml" />
      </ant:fileset>
    </ant:fileScanner>
  
    <j:forEach items="${pluginProjects.iterator()}" var="plugin">
      <!-- process using ${plugin} variable -->
    </j:forEach>
  </j:jelly>
  ]]></source>
      </section>
      
    </body>
  </document>
  
  
  1.1                  jakarta-commons/jelly/xdocs/tag-reference/template.xml
  
  Index: template.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 2002,2004 The Apache Software Foundation.
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <document>
  
   <properties>
    <title>Jelly Tag Reference (taglib:tag)</title>
   </properties>
  
    <body>
  
      <section name="Home Page">
        <p>See 
          <a href="http://jakarta.apache.org/commons/jelly/libs/xxx/">http://jakarta.apache.org/commons/jelly/libs/xxx/</a>
        </p>
      </section>
  
      <section name="Description">
      </section>
      
      <section name="Attributes">
        <table>
          <tr>
            <th>Name</th>
            <th>Description</th>
            <th>Required</th>
          </tr>
          <tr>
            <td>...</td>
            <td>...</td>
            <td>...</td>
          </tr>
        </table>
      </section>
      
      <section name="Nested Elements">
      </section>
  
      <section name="Examples">
        <source><![CDATA[
  ...
        ]]></source>
      </section>
      
    </body>
  </document>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message