catlett 01/08/13 16:33:40
Added: random/xml random.xml
Log:
added for use with the new build process
Revision Changes Path
1.1 jakarta-taglibs/random/xml/random.xml
Index: random.xml
===================================================================
<?xml version="1.0" ?>
<!-- Change all instances of session with the jakarta-taglib
name for this tag library.
Change all instances of Random with the name to use
for things such as titles in the tag library documentation.
Change all instances of {your-name} with your name for
for things such as author name in the tag library documentation.
Change <prefix>foo</prefix> below to a short prefix for this
tag library.
-->
<document url="./random.xml">
<!-- More properties can be added. Good place to stick loose
data needed elsewhere. -->
<properties>
<!-- The title here overrides the title generated by the
stylesheet for the documentation HTML <title> tag
<title>Jakarta Project: Random JSP Tag Library</title>
-->
<!-- The name here is used in the HTML <meta name="author"...> tag -->
<author>Rich Catlett</author>
</properties>
<!-- The following defines elements uses both to create the taglib
documentation and the tag library descriptor .tld file. The
elements used are those from the JSP 1.2 TLD DTD and special
elements used when creating the tagib documentation. Although
the JSP1.2 TLD DTD is used, this document can be used to
generate both a JSP 1.1 and a JSP 1.2 TLD.
-->
<taglib>
<!-- The following elements are from the JSP 1.2 TLD DTD -->
<!-- Version number of this tagib -->
<tlib-version>1.0</tlib-version>
<!-- Minimum version of JSP spec required -->
<jsp-version>1.1</jsp-version>
<!-- jakarta-taglib name of this tag library -->
<short-name>random</short-name>
<!-- URI of taglib -->
<uri>http://jakarta.apache.org/taglibs/random-1.0</uri>
<!-- The name to use in titles, etc. for the taglib -->
<display-name>Random Tag library (Pre Beta)</display-name>
<description>
The Random tag library creates random strings and random numbers. You may
specify a set of allowable characters as well as the length for randomly
generated strings. You may specify a range of allowable integers or a
random floating point number between zero and one for randomly generated
numbers. <!-- Both the RandomStrgTag and the RandomNum tag support the use of
a SecureRandom object in the generation of their random objects. To make use
of this option there are two attributes that can be used: algorithm and
provider. The algorithm attribute is required, and it is the name of the
algorithm that the SecureRandom object will use. The provider attribute is
optional, if there are multiples of the same algorithm available, and the
desired algorithm exists within a specific package, then that package can be
specified here. -->
</description>
<!-- The taglib-location is used to fill in the web.xml configuration
information in the HTML doc. -->
<taglib-location>/WEB-INF/random.tld</taglib-location>
<!-- The prefix is used to fill in the taglib directive
configuration information in the HTML doc. -->
<prefix>rand</prefix>
<!-- This element must be straight text and is copied right into
the "Requirements" section of the HTML doc. -->
<requirements-info>
This custom tag library requires no software other than a servlet container
that supports the JavaServer Pages Specification, version 1.1 or higher.
</requirements-info>
<tagtoc name="Random Tags">
<tag>
<name>string</name>
<tag-class>org.apache.taglibs.random.RandomStrgTag</tag-class>
<tei-class>org.apache.taglibs.random.RandomStrgTEI</tei-class>
<body-content>Empty</body-content>
<display-name>string</display-name>
<description>
Set the properties of a variable length random string generator. A new
random string will be created every time the <b>jsp:getProperty</b> tag
is used to access the generator.
</description>
<summary>
Set the properties of a variable length random string generator. A new
random string will be created every time the jsp:getProperty tag is
used to access the generator.
</summary>
<availability>1.0</availability>
<restrictions>None</restrictions>
<variable>
<name-from-attribute>id</name-from-attribute>
<variable-class>org.apache.taglibs.random.RandomStrg</variable-class>
<declare>true</declare>
<scope>AT_END</scope>
<description>
Name used to retrieve the random string later in the page.
</description>
<availability>1.0</availability>
<beanprop>
<name>random</name>
<get>Yes</get>
<set>No</set>
<description>
The variable length randomly generated string from the named
generator.
</description>
<availability>1.0</availability>
</beanprop>
</variable>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
<description>
Script variable for use with the standard <b>jsp:getProperty</b> tag.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>length</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The length of the random string. Defaults to a length of 8.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>map</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
Attribute name of a Bean or Script variable which is a Java HashMap
object. The random string generated will be a new unique key for use
as a key for the HashMap.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>charset</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The set of characters to use when creating the random string. The
following characters can be used as a charset a-zA-Z0-9
! @ # $ % ^ & * ( ) _ \- + = { } [ ] \\ | : ; \" ' < > , . ? /
The backslash, hyphen, and double quotes characters must be escaped
with a \: like this \\, \-, and \". Lowercase alpha characters can be
specified using a range like "a-z" or "f-r", the same can be done
with uppercase letters A-Z and digits 0-9. To use the entire
character set, set charset="all". Single characters must be separated
by a space. Charset defaults to a value of a-zA-Z0-9.
</description>
<availability>1.0</availability>
</attribute>
<!--
<attribute>
<name>algorithm</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The algorithm to be used if a SecureRandom object is going to be used to
generate the random string.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>provider</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The package to search for the desired algorithm that is to be used for a
SecureRandom object.
</description>
<availability>1.0</availability>
</attribute>
-->
<example>
<usage>
<comment>
Create a random string that is 8 characters long and that uses a
charser of all characters.
</comment>
<code>
<![CDATA[
<rand:string id="random1" charset="all"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random1" property="random"/>
]]>
</code>
<comment>
Create a random string that only uses uppercase letters.
</comment>
<code>
<![CDATA[
<rand:string id="random2" charset="A-Z"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random2" property="random"/>
]]>
</code>
<comment>
Create the same random string as above only make it 15 characters
long.
</comment>
<code>
<![CDATA[
<rand:string id="random3" charset="A-Z" length="15"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random3" property="random"/>
]]>
</code>
<comment>
Create a random string that uses the following charset
A-Z ! @ # \\ \- + ? & $
</comment>
<code>
<![CDATA[
<rand:string id="random4" charset="A-Z ! @ # \\ \- + ? & $"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random4" property="random"/>
]]>
</code>
<comment>
Create the default random string that uses a hashmap named
passkeys to make sure each randomly created string is unique.
This string defaults to a charset of a-zA-Z0-9.
</comment>
<code>
<![CDATA[
<rand:string id="random5" map="passkeys"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random5" property="random"/>
]]>
</code>
<!-- <comment>
Use the algorithm and provider attributes to use a SecureRandom
object instead of just a Random object when creating the random
string. Use the default settings for range and length of the string.
The algorithm is SHA1PRNG and the provider is SUN.
</comment>
<code>
<![CDATA[
<rand:string id="random6" algorithm="SHA1PRNG" provider="SUN"/>
]]>
</code>
<comment>
Get the random string that was set up above, with a
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random6" property="random"/>
]]>
</code>-->
</usage>
</example>
</tag>
<tag>
<name>number</name>
<tag-class>org.apache.taglibs.random.RandomNumTag</tag-class>
<tei-class>org.apache.taglibs.random.RandomNumTei</tei-class>
<body-content>Empty</body-content>
<display-name>number</display-name>
<description>
Set the properties of a random number generator. A new random number
will be generated each time the <b>jsp:getProperty</b> tag is used to
access the generator.
</description>
<summary>
Set the properties of a random number generator. A new random number
will be generated each time the <b>jsp:getProperty</b> tag is used to
access the generator .
</summary>
<availability>1.0</availability>
<restrictions>None</restrictions>
<variable>
<name-from-attribute>id</name-from-attribute>
<variable-class>org.apache.taglibs.random.RandomNum</variable-class>
<declare>true</declare>
<scope>AT_END</scope>
<description>
Name used to retrieve the random number later in the page.
</description>
<availability>1.0</availability>
<beanprop>
<name>random</name>
<get>Yes</get>
<set>No</set>
<description>
The variable length randomly generated number as a Java Number
object. In a JSP page the number is printed out as a string.
</description>
<availability>1.0</availability>
</beanprop>
</variable>
<attribute>
<name>id</name>
<required>yes</required>
<rtexprvalue>no</rtexprvalue>
<description>
Script variable for use with the standard <b>jsp:getProperty</b> tag.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>range</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
This parameter determines the lower and upper bound from which to
select the random number. If a range of 0-1 is selected, the tag will
automatically create a float value between 0 and 1. The default range
is the digits 0 to 100. Max size of the random number is limited by
the size of the primitive data type of long.
</description>
<availability>1.0</availability>
</attribute>
<!--
<attribute>
<name>algorithm</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The algorithm to be used if a SecureRandom object is going to be used to
generate the random string.
</description>
<availability>1.0</availability>
</attribute>
<attribute>
<name>provider</name>
<required>no</required>
<rtexprvalue>no</rtexprvalue>
<description>
The package to search for the desired algorithm that is to be used for a
SecureRandom object.
</description>
<availability>1.0</availability>
</attribute>
-->
<example>
<usage>
<comment>
Create a default random number in the range 10000000-99999999.
</comment>
<code>
<![CDATA[
<rand:number id="random1" range="10000000-99999999"/>
]]>
</code>
<comment>
Get the random number that was set up above, using the
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random1" property="random"/>
]]>
</code>
<comment>
Create a random number that is a float value by setting the range
to 0-1.
</comment>
<code>
<![CDATA[
<rand:number id="random2" range="0-1"/>
]]>
</code>
<comment>
Get the random number that was set up above, using the
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random2" property="random"/>
]]>
</code>
<!-- <comment>
Use the algorithm and provider attributes to use a SecureRandom
object instead of just a Random object when creating the random
string. Use the default settings for range of the number.
The algorithm is SHA1PRNG and the provider is SUN.
</comment>
<code>
<![CDATA[
<rand:number id="random3" algorithm="SHA1PRNG" provider="SUN"/>
]]>
</code>
<comment>
Get the random number that was set up above, using the
<b>jsp:getProperty</b> tag.
</comment>
<code>
<![CDATA[
<jsp:getProperty name="random3" property="random"/>
]]>
</code>-->
</usage>
</example>
</tag>
</tagtoc>
</taglib>
<revision release="Pre Beta" date="07/22/2001">
<description>
Clean up of tag library prior to performing a beta
release, moving toward an official release. Changing tag library over to
the new build.
</description>
</revision>
<revision release="Development" date="04/28/2001">
<description>
Initial version of tag library before Jakarta-Taglibs
had an official release policy for tag libraries.
</description>
</revision>
</document>