jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-taglibs/string/xml string.xml
Date Mon, 17 Sep 2001 23:31:36 GMT
bayard      01/09/17 16:31:36

  Modified:    string/xml string.xml
  Log:
  Finished documentation of examples.
  
  Revision  Changes    Path
  1.4       +121 -3    jakarta-taglibs/string/xml/string.xml
  
  Index: string.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/string/xml/string.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- string.xml	2001/09/17 02:20:33	1.3
  +++ string.xml	2001/09/17 23:31:36	1.4
  @@ -10,7 +10,7 @@
     <title>Jakarta Project: String JSP Tag Library</title>
          -->
     <!-- The name here is used in the HTML <meta name="author"...> tag -->
  -  <author>bayard@generationjava.com</author>
  +  <author>Henri Yandell, bayard@generationjava.com</author>
   </properties>
   
   <!-- The following defines elements uses both to create the taglib
  @@ -906,13 +906,25 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              &apos;pond&apos; will be replaced by &apos;tree&apos;
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:overlay with="tree" start="4" end="8">The pond was wet.</str:overlay>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
           <name>substring</name>
           <tagclass>org.apache.taglibs.string.SubstringTag</tagclass>
           <body-content>JSP</body-content>
  -        <display-name>substrin</display-name>
  +        <display-name>substring</display-name>
           <description>
               Get a specified substring from a larger String based
               on the start index and end-before index in the larger
  @@ -940,6 +952,18 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              Will get the substring &apos;tree&apos; from the body.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:substring start="4" end="8">The tree is green.</str:substring>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -962,6 +986,18 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              Will output &apos;xxxxx&apos;
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:repeat count="5">x</str:repeat>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1011,6 +1047,17 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:wordWrap width ="50" delimiter="&lt;br&gt;>Word-wrap a String. This
involves formatting a long String to fit within a certain character width of page. A delimiter
may be passed in to put at the end of each line and a splitting character can be specified
for when a word has to be cut in half.</str:wordWrap>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1044,6 +1091,18 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              Pluck's &apos;Bob&apos; from out of the square brackets.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:nestedString open="[" close="]">[Bob]</str:nestedString>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1067,6 +1126,19 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              The substring &apos;world&apos; is repeated four times in the
  +              body.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:countMatches substring="world">Hello world programs are rife in this world due
to their worldy view of how to program a world of code</str:countMatches>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1104,6 +1176,19 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              If the inner tag (db:get) return null (or the string "null") 
  +              then an empty string will be printed out.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:default><db:get value="Name"></str:default>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1149,6 +1234,19 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              One use of the replace tag is to change newlines to html 
  +              br's.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:replace replace="\n" with="&lt;br&gt;\n"><db:get value="data"></str:replace>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
         <tag>
  @@ -1209,6 +1307,26 @@
             </description>
             <availability>1.0</availability>
           </attribute>
  +        <example>
  +          <usage>
  +            <comment>
  +              The random tag has a lot of options. The easiest way is to 
  +              just use the type field, as in the example. The second 
  +              example shows how the developer can specify the characters 
  +              to use, for example, random vowels. The last example is 
  +              merely demonstrative, no one would want to do this, but it 
  +              shows how the developer may specify the range of characters, 
  +              in this example, all the control characters.
  +            </comment>
  +            <code>
  +<![CDATA[ 
  +<str:random count="10" type="alphanumeric"/>
  +<str:random count="1">aeiou</str:random>
  +<str:random count="5" start="1" end="32"/>
  +]]>       
  +            </code>
  +          </usage>
  +        </example>
         </tag>
   
   <!-- end of imported string.tld file -->
  @@ -1217,7 +1335,7 @@
   
   </taglib>
   
  -<revision release="Initial Version" date="08/../2001"> 
  +<revision release="Initial Version" date="08/30/2001"> 
     <description>
       Initial version of String tag-library. Matching the v0.4 of the 
       GenerationJava String taglib.
  
  
  

Mime
View raw message