You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by gl...@apache.org on 2001/06/25 15:24:51 UTC
cvs commit: jakarta-taglibs/src/taglib-template/xml taglib-template.xml
glenn 01/06/25 06:24:51
Modified: src/taglib-template/xml taglib-template.xml
Log:
Template updated for latest JSP1.2 PFD and new generated taglib documentation format
Revision Changes Path
1.2 +211 -105 jakarta-taglibs/src/taglib-template/xml/taglib-template.xml
Index: taglib-template.xml
===================================================================
RCS file: /home/cvs/jakarta-taglibs/src/taglib-template/xml/taglib-template.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- taglib-template.xml 2001/05/23 11:33:58 1.1
+++ taglib-template.xml 2001/06/25 13:24:48 1.2
@@ -1,136 +1,242 @@
<?xml version="1.0" ?>
-<!-- Change the name of the XML file below to match the real file name. -->
-<document url="./<taglib-name>.xml">
+<!-- Change all instances of {taglib-name} with the jakarta-taglib
+ name for this tag library.
+ Change all instances of {display-name} with the name to use
+ for things such as titles in the tag library documentation.
+
+ Change <prefix>foo</prefix> below to a short prefix for this
+ tag library.
+ -->
+
+<document url="./{taglib-name}.xml">
+
<!-- More properties can be added. Good place to stick loose
data needed elsewhere. -->
<properties>
-<!-- The title here is used in the HTML <title> tag -->
- <title>Jakarta Project: <taglib-name> JSP Tag Library</title>
-<!-- The name here is used in the HTML <meta name="author"...> tag -->
+ <!-- The title here overrides the title generated by the
+ stylesheet for the documentation HTML <title> tag
+ <title>Jakarta Project: {display-name} JSP Tag Library</title>
+ -->
+ <!-- The name here is used in the HTML <meta name="author"...> tag -->
<author>Your Name</author>
</properties>
-<!-- From here to the end of the file is based on the TLD. That skeletal
- structure must be maintained so that the TLD can be pulled from this
- file. Interspersed among the TLD elements can be anything you want,
- but see below for some suggested conventions. -->
+<!-- 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 next four elements are used in various places in
- the HTML doc too. -->
- <tlibversion>1.0</tlibversion>
- <jspversion>1.1</jspversion>
- <shortname><taglib-name></shortname>
- <uri>http://jakarta.apache.org/taglibs/<taglib-name>-1.0</uri>
-
- <!-- The taglib-location is used to fill in the web.xml configuration
- information in the HTML doc. -->
- <taglib-location>/WEB-INF/<taglib-name>.tld</taglib-location>
-
- <!-- The prefix is used to fill in the taglib directive
- configuration information in the HTML doc. -->
- <prefix>foo</prefix>
-
- <info><taglib-name> Tag library</info>
-
- <!-- Enter an overview here as straight XHTML paragraphs. Inside the
- paragraphs regular XHTML can be used (but an external CSS is
- encouraged). This overview is copied into the generated HTML doc,
- and the <p> elements are essential for that. -->
- <overview>
- <p>Your <taglib-name> description summary.</p>
+ <!-- The following elements are from the JSP 1.2 TLD DTD -->
+ <!-- Version number of this tagib -->
+ <tlibversion>1.0</tlibversion>
+ <!-- Minimum version of JSP spec required -->
+ <jspversion>1.1</jspversion>
+ <!-- jakarta-taglib name of this tag library -->
+ <shortname>{taglib-name}</shortname>
+ <!-- URI of taglib -->
+ <uri>http://jakarta.apache.org/taglibs/{taglib-name}-1.0</uri>
+ <!-- The name to use in titles, etc. for the taglib -->
+ <display-name>{display-name} Tag library</display-name>
+
+ <!-- JSP 1.2 tag library DTD only, not used for generating
+ documentation.
+
+ <large-icon></large-icon>
+ <small-icon></small-icon>
+ -->
+
+ <!-- Used for generating Overview section of HTML documentation
+ and for the description element for a JSP 1.2 TLD.
+ Enter information here as straight XHTML paragraphs. Inside the
+ paragraphs regular XHTML can be used (but an external CSS is
+ encouraged). The information is copied into the generated HTML doc,
+ and the <p> elements are essential for that. -->
+ <description>
+ <p>Your {taglib-name} description summary.</p>
<p>This JSP tag library can be used to ....
</p>
<p>etc....</p>
- </overview>
-
- <!-- This date must be straight text and is copied right into
- the "Requirements" section of the HTML doc. -->
- <requirements-info>
+ </description>
+
+ <!-- The following elements are for JSP 1.2 tag libraries only,
+ and are not used for generating documentation yet.
+
+ <validator>
+
+ </validator>
+ <listener>
+
+ </listener>
+ -->
+
+ <!-- The taglib-location is used to fill in the web.xml configuration
+ information in the HTML doc. -->
+ <taglib-location>/WEB-INF/{taglib-name}.tld</taglib-location>
+
+ <!-- The prefix is used to fill in the taglib directive
+ configuration information in the HTML doc. -->
+ <prefix>foo</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.
Plus any requirements for additional API packages.
- </requirements-info>
-
+ </requirements-info>
+
+ <!-- The toc element allows the addition of document sections to
+ the Table of Contents list after the Tag Reference entry.
+ 0 .. N sections can be added to the Table of Contents.
+
+ <toc href="test" name="Testing">
+ <p>This is a test of a TOC.</p>
+ </toc>
+ -->
+ <!-- The tagtoc element provides the ability to categorize the
+ tags in the tag library. There must be at least one tagtoc.
+ 1 .. N tags can be nested within a tagtoc.
+ -->
+
+ <tagtoc name="Foo Tags">
<!-- foo tag -->
<tag>
- <!-- The following are JSP 1.1 declarations -->
- <name>foo</name>
- <tagclass>org.apache.taglibs.foo.fooTag</tagclass>
- <bodycontent>jsp|empty|tagdependent</bodycontent>
- <info>Tag description</info>
-
- <attribute>
- <name>attrName</name>
- <required>[yes|no|true|false]</required>
- <rtexprvalue>[yes|no|true|false]</rtexprvalue>
- <!-- The following element is non-standard, but probably will be
- standard in final JSP 1.2. For now it is only used for the HTML
- doc. -->
- <info>Attribute description</info>
- </attribute>
-
- <!-- The next two non-standard elements are used to inform the relevant
- sections of the HTML doc. See, for example, the Application
- taglib docs for examples of the output. -->
- <script-variable>No</script-variable>
- <restrictions>None</restrictions>
-
- <!-- If the tag creates a script variable or attribute,
- the following declarations can be used to generate
- documentation for them. -->
- <beanprop>
- <name>fooProp</name>
- <get>Yes</get>
- <set>No</set>
- <info>What the property is for.</info>
+ <name>foo</name>
+ <tagclass>org.apache.taglibs.foo.fooTag</tagclass>
+ <!-- Optional TEI class
+ <teiclass>org.apache.taglibs.foo.fooTEI</teiclass>
+ -->
+ <bodycontent>jsp|empty|tagdependent</bodycontent>
+
+ <!-- JSP 1.2, display name of tag -->
+ <display-name>foo</display-name>
+
+ <!-- JSP 1.2 tag library DTD only, not used for generating
+ documentation.
+
+ <large-icon></large-icon>
+ <small-icon></small-icon>
+ -->
+ <!-- Complete description of this tag. Used for JSP 1.2 TLD
+ and for generating HTML documentation. -->
+ <description>Tag description</description>
+
+ <!-- The next three non-standard elements are used to inform the relevant
+ sections of the HTML doc. See, for example, the Regexp
+ taglib docs for examples of the output. -->
+ <!-- One line summary of what tag does for Tag Summary section -->
+ <summary>Foo does this.</summary>
+ <!-- Version of taglib when this tag became available,
+ deprecated is a possible value. -->
+ <availability>1.0</availability>
+ <!-- Any restrictions on use of the tag -->
+ <restrictions>None</restrictions>
+
+ <!-- Declaration of scripting variables created by tag.
+ Used for generating HTML documentation and for
+ JSP 1.2 DTD. -->
+ <variable>
+ <!-- name-given or name-from-attribute must be declared
+ <name-given>foo</name-given>
+ -->
+ <name-from-attribute>id</name-from-attribute>
+ <!-- Optional variable declarations -->
+ <!-- Package and class name of variable, default java.lang.String -->
+ <variable-class>org.apache.taglibs.foo.FooData</variable-class>
+ <!-- Usage for declare is not clear in JSP1.2PFD, default true -->
+ <declare>[yes|no|true|false]</declare>
+ <!-- scope of scripting variable, default NESTED -->
+ <scope>[NESTED|AT_BEGIN|AT_END]</scope>
+ <!-- description of scripting variable -->
+ <description>Foo Bean</description>
+
+ <!-- Used for the HTML documentation only.
+ Version of taglib when this script variable became available,
+ deprecated is a possible value. -->
+ <availability>1.0</availability>
+ <!-- If the tag creates a script variable or attribute which
+ is a bean, the following declarations can be used to generate
+ HTML documentation for 0 .. N properties. -->
+ <beanprop>
+ <name>fooProp</name>
+ <get>Yes</get>
+ <set>No</set>
+ <description>What the property is for.</description>
+ <!-- Used for the HTML documentation only.
+ Version of taglib when this property became available,
+ deprecated is a possible value. -->
+ <availability>1.0</availability>
</beanprop>
+ </variable>
- <!-- The entire usage section is for usage examples that you want to
- have added to the HTML doc under "Example" for each tag. The
- contents of these elements are rendered into a simple form of
- syntax highlighting by the XSL sheet. Multiple usage sections
- are allowed, and each will be numbered as a separate example
- in the resultant HTML. -->
+ <attribute>
+ <name>attrName</name>
+ <required>[yes|no|true|false]</required>
+ <rtexprvalue>[yes|no|true|false]</rtexprvalue>
+ <!-- Optional attribute type for JSP 1.2 rtexprvalue
+ <type>java.lang.String</type>
+ -->
+ <!-- Used for JSP 1.2 TLD and generating HTML docs -->
+ <description>Attribute description</description>
+ <!-- Used for the HTML documentation only.
+ Version of taglib when this attribute became available,
+ deprecated is a possible value. -->
+ <availability>1.0</availability>
+ </attribute>
+
+ <!-- The entire example section is for usage examples that you want to
+ have added to the HTML doc under "Example" for each tag. The
+ example section is also included with a JSP 1.2 TLD. The
+ contents of these elements are rendered into a simple form of
+ syntax highlighting by the XSL sheet. Multiple usage sections
+ are allowed, and each will be display as a separate example
+ in the resultant HTML. -->
+ <example>
<usage>
- <!--Enter a JSP comment without the opening and closing tags.
- Those will be added by the XSL. Put no HTML mark-up in here.
- Currently, only one comment per usage section is supported. -->
- <comment>
+ <!-- Enter a JSP comment without the opening and closing tags.
+ Those will be added by the XSL. Put no HTML mark-up in here.
+ Currently, only one comment per usage section is supported. -->
+ <comment>
Here is a comment.
- </comment>
-
- <!-- Enter scriptlet(s) without the opening or closing tags.
- For an expression, begin with an equals (=) sign. The
- opening and closing tags will be added by the XSL, as
- will color formatting. -->
- <scriptlet>
- File tempdir = (File)application.getAttribute
- ("javax.servlet.context.tempdir");
- </scriptlet>
- <scriptlet>
- String echoLog = tempdir+"/echoAppendLog.txt";</scriptlet>
- <scriptlet>
- String messageString =
- "Hello World. The time is: " +
- time+System.getProperty("line.separator");
- </scriptlet>
-
- <!-- The code element is for an example of using the tag. I
- normally put these in CDATA sections so that the XSL
- transform to HTML will turn the angle brackets into the
- appropriate < and > entities automatically. Only
- one code element per usage element is supported.
- The resultant HTML is formatted and colorized. -->
- <code>
+ </comment>
+
+ <!-- Enter scriptlet(s) without the opening or closing tags.
+ For an expression, begin with an equals (=) sign. The
+ opening and closing tags will be added by the XSL, as
+ will color formatting. -->
+ <scriptlet>
+ File tempdir = (File)application.getAttribute
+ ("javax.servlet.context.tempdir");
+ </scriptlet>
+ <scriptlet>
+ String echoLog = tempdir+"/echoAppendLog.txt";</scriptlet>
+ <scriptlet>
+ String messageString =
+ "Hello World. The time is: " +
+ time+System.getProperty("line.separator");
+ </scriptlet>
+
+ <!-- The code element is for an example of using the tag. I
+ normally put these in CDATA sections so that the XSL
+ transform to HTML will turn the angle brackets into the
+ appropriate < and > entities automatically. Only
+ one code element per usage element is supported.
+ The resultant HTML is formatted and colorized. -->
+ <code>
<![CDATA[<foo:bar attr1="<%= expr %>" attr2="val2" attr3="<%= expr2 %>" />]]>
- </code>
+ </code>
</usage>
+ </example>
</tag>
+ </tagtoc>
</taglib>