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/05/23 13:33:58 UTC
cvs commit: jakarta-taglibs/src/taglib-template/xml intro.xml taglib-template.xml
glenn 01/05/23 04:33:58
Added: src/taglib-template build.xml
src/taglib-template/doc/conf web.xml
src/taglib-template/doc/web changes.html
src/taglib-template/examples/conf web.xml
src/taglib-template/xml intro.xml taglib-template.xml
Log:
Implement new build/layout
Revision Changes Path
1.1 jakarta-taglibs/src/taglib-template/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<!-- Define and use the common.xml ant build file for building
your taglib -->
<!DOCTYPE project [
<!ENTITY common SYSTEM "file:../common.xml">
]>
<!-- Your main ant build declaration -->
<project name="<taglib-name>" default="main">
<!-- By default, common.xml adds servlet.jar to the classpath
ant uses when building your taglib. If you need to use
additional jar files you will have to override the ant
definition of the classpath by uncommenting the below
declarations and adding any required jar files to the
ant classpath. -->
<!-- Load in your local build properties which define jar
file locations.
<property file="../build.properties"/> -->
<!-- Define additional jar files to be used by ant when
building your taglib. The classpath value is a ":"
separated list of jar file property names from your
local build.properties file.
<property name="classpath" value="${servlet.jar}:${jakarta-oro.jar}"/> -->
<!-- common.xml defines a number of targets in its build process
which you can override in your local build.xml file. In this
case we want to override the ant target "checkRequirements.pre"
so that we can verify that the required jar files are present.
<property name="checkRequirements.pre" value="checkRequirements.pre"/> -->
<!-- Here is the ant target that overrides "checkRequirements.pre"
<target name="checkRequirements.pre">
<antcall target="checkRequiredFile">
<param name="file" value="${jakarta-oro.jar}"/>
<param name="fail.message" value="a jar file containing the jakarta-oro-2 classes is required to compile the regexp taglib. please define the property jakarta-oro-2.jar in your jakarta.properties file and ensure that the file exists"/>
</antcall>
</target> -->
<!-- Include the common.xml ant build declarations -->
&common;
</project>
1.1 jakarta-taglibs/src/taglib-template/doc/conf/web.xml
Index: web.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<description>
Documentation for the "<taglib-name>" custom tag library,
from the JAKARTA-TAGLIBS project.
</description>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
1.1 jakarta-taglibs/src/taglib-template/doc/web/changes.html
Index: changes.html
===================================================================
<HTML>
<HEAD>
<TITLE>Jakarta Project: <taglib-name> JSP Tag Library Revision History</TITLE>
</HEAD>
<BODY BGCOLOR="white">
<CENTER>
<H1>Jakarta Project: <taglib-name> JSP Tag Library Revision History</H1>
</CENTER>
<h3>Version 1.0 Milestone 2 released some date.</H3>
<li>Added the <b>foo</b> tag.</li>
<li>Added the <b>bar</b> tag.</li>
<h3>Version 1.0 Milestone 1 released some date.</H3>
</BODY>
</HTML>
1.1 jakarta-taglibs/src/taglib-template/examples/conf/web.xml
Index: web.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<description>
<tagilb-name> description.
</description>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/<taglib-name>-1.0</taglib-uri>
<taglib-location>/WEB-INF/<taglib-name>.tld</taglib-location>
</taglib>
</web-app>
1.1 jakarta-taglibs/src/taglib-template/xml/intro.xml
Index: intro.xml
===================================================================
<?xml version="1.0"?>
<document url="./intro.xml">
<properties>
<author>Your Name</author>
<title>The Jakarta-Taglibs Project</title>
</properties>
<body>
<section name="<taglib-name> Tag Library" href="Welcome">
<p>Overview of your tag library.</p>
</section>
<section name="DBTags News" href="News">
<news>
<newsitem date="MM/DD/YYYY">
Checkout the new <taglib-name> taglib!
</newsitem>
</news>
</section>
<section name="Documentation" href="Documentation">
<p>For more information about the <taglib-name> Tag Library,
look at the on-line documentation:</p>
<ul>
<li>View the <a href="http://jakarta.apache.org/taglibs/doc/<taglib-name>-doc/index.html"><taglib-name> Taglib Documentation</a></li>
</ul>
<p>For information on how to use the distributions,
look at the following documentation:</p>
<ul>
<li>Using the Jakarta-Taglibs <a href="http://jakarta.apache.org/taglibs/binarydist.html">Binary Distribution</a></li>
<li>Using the Jakarta-Taglibs <a href="http://jakarta.apache.org/taglibs/sourcedist.html">Source Distribution</a></li>
</ul>
</section>
<section name="Download" href="Download">
<p>A binary download of the <taglib-name> Tag Library is available</p>
<ul>
<li><strong>Download <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly/projects/<taglib-name>/"><taglib-name> Tag Library</a></strong></li>
</ul>
<p>The following distributions are also available for download:</p>
<ul>
<li>Download <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly/src/">Jakarta-Taglibs Source</a></li>
<li>Download entire <a href="http://jakarta.apache.org/builds/jakarta-taglibs/nightly">Jakarta-Taglibs Distribution</a></li>
</ul>
</section>
<section name="Contributors" href="Contributors">
<p>List of contributors:</p>
<ul>
<li>Your Name</li>
</ul>
</section>
</body>
</document>
1.1 jakarta-taglibs/src/taglib-template/xml/taglib-template.xml
Index: taglib-template.xml
===================================================================
<?xml version="1.0" ?>
<!-- Change the name of the XML file below to match the real file name. -->
<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 -->
<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. -->
<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>
<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>
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>
<!-- 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>
</beanprop>
<!-- 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. -->
<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>
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>
<![CDATA[<foo:bar attr1="<%= expr %>" attr2="val2" attr3="<%= expr2 %>" />]]>
</code>
</usage>
</tag>
</taglib>
</document>