blob: 602eb5c98e1757aa0e4c900d378161da412e47e7 [file] [log] [blame]
david_williamse073de12007-04-28 04:01:44 +00001
2<!--
3 Copyright 2002 Sun Microsystems, Inc. All rights reserved.
4 Use is subject to license terms.
5 -->
6
7<!--
8
9 This is the DTD defining the JavaServer Pages 1.2 Tag Library
10 descriptor (.tld) (XML) file format/syntax.
11
12 A Tag Library is a JAR file containing a valid instance of a Tag Library
13 Descriptor (taglib.tld) file in the META-INF subdirectory, along with the
14 appropriate implementing classes, and other resources required to
15 implement the tags defined therein.
16
17 Use is subject to license terms.
18 -->
19
20<!NOTATION WEB-JSPTAGLIB.1_2 PUBLIC
21 "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN">
22
23<!--
24This is the XML DTD for the JSP 1.2 Tag Library Descriptor.
25All JSP 1.2 tag library descriptors must include a DOCTYPE
26of the following form:
27
28 <!DOCTYPE taglib
29 PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
30 "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
31
32-->
33
34<!--
35The taglib tag is the document root, it defines:
36
37tlib-version the version of the tag library implementation
38
39jsp-version the version of JSP the tag library depends upon
40
41short-name a simple default short name that could be used by
42 a JSP authoring tool to create names with a mnemonic
43 value; for example, the it may be used as the prefered
44 prefix value in taglib directives
45
46uri a uri uniquely identifying this taglib
47
48display-name the display-name element contains a short name that
49 is intended to be displayed by tools
50small-icon optional small-icon that can be used by tools
51
52large-icon optional large-icon that can be used by tools
53
54description a simple string describing the "use" of this taglib,
55 should be user discernable
56
57validator optional TagLibraryValidator information
58
59listener optional event listener specification
60
61
62-->
63
64<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
65 display-name?, small-icon?, large-icon?, description?,
66 validator?, listener*, tag+) >
67
68<!ATTLIST taglib id ID #IMPLIED
69 xmlns CDATA #FIXED
70 "http://java.sun.com/JSP/TagLibraryDescriptor"
71>
72
73<!--
74Describes this version (number) of the taglibrary (dewey decimal)
75
76#PCDATA ::= [0-9]*{ "."[0-9] }0..3
77-->
78
79<!ELEMENT tlib-version (#PCDATA) >
80
81<!--
82Describes the JSP version (number) this taglibrary requires in
83order to function (dewey decimal)
84
85The default is 1.2
86
87#PCDATA ::= [0-9]*{ "."[0-9] }0..3
88-->
89
90<!ELEMENT jsp-version (#PCDATA) >
91
92<!--
93Defines a short (default) short-name to be used for tags and
94variable names used/created by this tag library. Do not use
95white space, and do not start with digits or underscore.
96
97#PCDATA ::= NMTOKEN
98-->
99
100<!ELEMENT short-name (#PCDATA) >
101
102<!--
103Defines a public URI that uniquely identifies this version of
104the taglibrary. Leave it empty if it does not apply.
105-->
106
107<!ELEMENT uri (#PCDATA) >
108
109<!--
110Defines an arbitrary text string descirbing the tag library
111-->
112
113<!ELEMENT description (#PCDATA) >
114
115<!--
116
117Defines an optional validator that can be used to
118validate the conformance of a JSP page to using this tag library.
119-->
120
121<!ELEMENT validator (validator-class, init-param*, description?) >
122
123
124<!--
125
126Defines the TagLibraryValidator class that can be used to
127validate the conformance of a JSP page to using this tag library.
128-->
129
130<!ELEMENT validator-class (#PCDATA) >
131
132
133<!--
134
135The init-param element contains a name/value pair as an
136initialization param
137-->
138
139<!ELEMENT init-param (param-name, param-value, description?)>
140
141<!--
142
143The param-name element contains the name of a parameter.
144-->
145
146<!ELEMENT param-name (#PCDATA)>
147
148<!--
149
150The param-value element contains the value of a parameter.
151-->
152
153<!ELEMENT param-value (#PCDATA)>
154
155
156<!--
157
158Defines an optional event listener object to be instantiated and
159registered automatically.
160-->
161
162<!ELEMENT listener (listener-class) >
163
164<!--
165
166The listener-class element declares a class in the application that
167must be registered as a web application listener bean. See the
168Servlet 2.3 specification for details.
169-->
170
171<!ELEMENT listener-class (#PCDATA) >
172
173
174<!--
175The tag defines a unique tag in this tag library. It has one
176attribute, id.
177
178The tag element may have several subelements defining:
179
180name The unique action name
181
182tag-class The tag handler class implementing
183 javax.servlet.jsp.tagext.Tag
184
185tei-class An optional subclass of
186 javax.servlet.jsp.tagext.TagExtraInfo
187
188body-content The body content type
189
190display-name A short name that is intended to be displayed
191 by tools
192
193small-icon Optional small-icon that can be used by tools
194
195large-icon Optional large-icon that can be used by tools
196
197description Optional tag-specific information
198
199variable Optional scripting variable information
200
201attribute All attributes of this action
202
203example Optional informal description of an example of a
204 use of this tag
205
206-->
207
208<!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?,
209 small-icon?, large-icon?, description?, variable*, attribute*,
210 example?) >
211
212<!--
213Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements
214the request time semantics for this tag. (required)
215
216#PCDATA ::= fully qualified Java class name
217-->
218
219<!ELEMENT tag-class (#PCDATA) >
220
221<!--
222Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo for
223this tag. (optional)
224
225If this is not given, the class is not consulted at translation time.
226
227#PCDATA ::= fully qualified Java class name
228-->
229
230<!ELEMENT tei-class (#PCDATA) >
231
232<!--
233Provides a hint as to the content of the body of this tag. Primarily
234intended for use by page composition tools.
235
236There are currently three values specified:
237
238tagdependent The body of the tag is interpreted by the tag
239 implementation itself, and is most likely in a
240 different "langage", e.g embedded SQL statements.
241
242JSP The body of the tag contains nested JSP syntax
243
244empty The body must be empty
245
246The default (if not defined) is JSP
247
248#PCDATA ::= tagdependent | JSP | empty
249
250-->
251
252<!ELEMENT body-content (#PCDATA) >
253
254<!--
255
256The display-name element contains a short name that is intended
257to be displayed by tools.
258-->
259
260<!ELEMENT display-name (#PCDATA) >
261
262
263<!--
264
265The large-icon element contains the name of a file containing a large
266(32 x 32) icon image. The file name is a relative path within the
267tag library. The image must be either in the JPEG or GIF format, and
268the file name must end with the suffix ".jpg" or ".gif" respectively.
269The icon can be used by tools.
270-->
271
272<!ELEMENT large-icon (#PCDATA) >
273
274<!--
275
276The small-icon element contains the name of a file containing a large
277(32 x 32) icon image. The file name is a relative path within the
278tag library. The image must be either in the JPEG or GIF format, and
279the file name must end with the suffix ".jpg" or ".gif" respectively.
280The icon can be used by tools.
281-->
282
283<!ELEMENT small-icon (#PCDATA) >
284
285<!--
286
287The example element contains an informal description of an example
288of the use of a tag.
289-->
290
291<!ELEMENT example (#PCDATA) >
292
293<!--
294
295The variable tag provides information on the scripting variables
296defined by this tag. It is a (translation time) error for a tag
297that has one or more variable subelements to have a TagExtraInfo
298class that returns a non-null object.
299
300The subelements of variable are of the form:
301
302name-given The variable name as a constant
303
304name-from-attribute The name of an attribute whose (translation
305 time) value will give the name of the
306 variable. One of name-given or
307 name-from-attribute is required.
308
309variable-class Name of the class of the variable.
310 java.lang.String is default.
311
312declare Whether the variable is declared or not.
313 True is the default.
314
315scope The scope of the scripting varaible
316 defined. NESTED is default.
317
318description Optional description of this variable
319
320-->
321
322<!ELEMENT variable ( (name-given | name-from-attribute), variable-class?,
323 declare?, scope?, description?) >
324
325<!--
326
327The name for the scripting variable. One of name-given or
328name-from-attribute is required.
329-->
330
331<!ELEMENT name-given (#PCDATA) >
332
333<!--
334
335The name of an attribute whose (translation-time) value will give
336the name of the variable. One of name-given or name-from-attribute
337is required.
338-->
339
340<!ELEMENT name-from-attribute (#PCDATA) >
341
342<!--
343
344The optional name of the class for the scripting variable. The
345default is java.lang.String.
346-->
347
348<!ELEMENT variable-class (#PCDATA) >
349
350<!--
351
352Whether the scripting variable is to be defined or not. See
353TagExtraInfo for details. This element is optional and "true"
354is the default.
355-->
356
357<!ELEMENT declare (#PCDATA) >
358
359<!--
360
361The scope of the scripting variable. See TagExtraInfo for details.
362The element is optional and "NESTED" is the default. Other legal
363values are "AT_BEGIN" and "AT_END".
364-->
365
366<!ELEMENT scope (#PCDATA) >
367
368<!--
369
370The attribute tag defines an attribute for the nesting tag
371
372An attribute definition is composed of:
373
374- the attributes name (required)
375- if the attribute is required or optional (optional)
376- if the attributes value may be dynamically calculated at runtime
377 by a scriptlet expression (optional)
378- the type of the attributes value (optional)
379- an informal description of the meaning of the attribute (optional)
380
381-->
382
383
384<!--
385The attribute tag defines an attribute for the nesting tag
386
387An attribute definition is composed of:
388
389- the attributes name (required)
390
391- if the attribute is required or optional (optional)
392
393- if the attributes value may be dynamically calculated at runtime
394 by a scriptlet expression (optional)
395
396- the type of the attributes value (optional)
397
398- an informal description of the meaning of the attribute (optional)
399-->
400
401<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) >
402
403<!--
404Defines the canonical name of a tag or attribute being defined
405
406#PCDATA ::= NMTOKEN
407-->
408
409<!ELEMENT name (#PCDATA) >
410
411<!--
412Defines if the nesting attribute is required or optional.
413
414#PCDATA ::= true | false | yes | no
415
416If not present then the default is "false", i.e the attribute
417is optional.
418-->
419
420<!ELEMENT required (#PCDATA) >
421
422<!--
423Defines if the nesting attribute can have scriptlet expressions as
424a value, i.e the value of the attribute may be dynamically calculated
425at request time, as opposed to a static value determined at translation
426time.
427
428#PCDATA ::= true | false | yes | no
429
430If not present then the default is "false", i.e the attribute
431has a static value
432-->
433
434<!ELEMENT rtexprvalue (#PCDATA) >
435
436
437<!--
438
439Defines the Java type of the attributes value. For static values
440(those determined at translation time) the type is always
441java.lang.String.
442-->
443
444<!ELEMENT type (#PCDATA) >
445
446
447<!-- ID attributes -->
448
449<!ATTLIST tlib-version id ID #IMPLIED>
450<!ATTLIST jsp-version id ID #IMPLIED>
451<!ATTLIST short-name id ID #IMPLIED>
452<!ATTLIST uri id ID #IMPLIED>
453<!ATTLIST description id ID #IMPLIED>
454<!ATTLIST example id ID #IMPLIED>
455<!ATTLIST tag id ID #IMPLIED>
456<!ATTLIST tag-class id ID #IMPLIED>
457<!ATTLIST tei-class id ID #IMPLIED>
458<!ATTLIST body-content id ID #IMPLIED>
459<!ATTLIST attribute id ID #IMPLIED>
460<!ATTLIST name id ID #IMPLIED>
461<!ATTLIST required id ID #IMPLIED>
462<!ATTLIST rtexprvalue id ID #IMPLIED>
463
464
465<!ATTLIST param-name id ID #IMPLIED>
466<!ATTLIST param-value id ID #IMPLIED>
467<!ATTLIST listener id ID #IMPLIED>
468<!ATTLIST listener-class id ID #IMPLIED>