david_williams | e073de1 | 2007-04-28 04:01:44 +0000 | [diff] [blame] | 1 | |
| 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 | <!-- |
| 24 | This is the XML DTD for the JSP 1.2 Tag Library Descriptor. |
| 25 | All JSP 1.2 tag library descriptors must include a DOCTYPE |
| 26 | of 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 | <!-- |
| 35 | The taglib tag is the document root, it defines: |
| 36 | |
| 37 | tlib-version the version of the tag library implementation |
| 38 | |
| 39 | jsp-version the version of JSP the tag library depends upon |
| 40 | |
| 41 | short-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 | |
| 46 | uri a uri uniquely identifying this taglib |
| 47 | |
| 48 | display-name the display-name element contains a short name that |
| 49 | is intended to be displayed by tools |
| 50 | small-icon optional small-icon that can be used by tools |
| 51 | |
| 52 | large-icon optional large-icon that can be used by tools |
| 53 | |
| 54 | description a simple string describing the "use" of this taglib, |
| 55 | should be user discernable |
| 56 | |
| 57 | validator optional TagLibraryValidator information |
| 58 | |
| 59 | listener 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 | <!-- |
| 74 | Describes 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 | <!-- |
| 82 | Describes the JSP version (number) this taglibrary requires in |
| 83 | order to function (dewey decimal) |
| 84 | |
| 85 | The default is 1.2 |
| 86 | |
| 87 | #PCDATA ::= [0-9]*{ "."[0-9] }0..3 |
| 88 | --> |
| 89 | |
| 90 | <!ELEMENT jsp-version (#PCDATA) > |
| 91 | |
| 92 | <!-- |
| 93 | Defines a short (default) short-name to be used for tags and |
| 94 | variable names used/created by this tag library. Do not use |
| 95 | white space, and do not start with digits or underscore. |
| 96 | |
| 97 | #PCDATA ::= NMTOKEN |
| 98 | --> |
| 99 | |
| 100 | <!ELEMENT short-name (#PCDATA) > |
| 101 | |
| 102 | <!-- |
| 103 | Defines a public URI that uniquely identifies this version of |
| 104 | the taglibrary. Leave it empty if it does not apply. |
| 105 | --> |
| 106 | |
| 107 | <!ELEMENT uri (#PCDATA) > |
| 108 | |
| 109 | <!-- |
| 110 | Defines an arbitrary text string descirbing the tag library |
| 111 | --> |
| 112 | |
| 113 | <!ELEMENT description (#PCDATA) > |
| 114 | |
| 115 | <!-- |
| 116 | |
| 117 | Defines an optional validator that can be used to |
| 118 | validate 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 | |
| 126 | Defines the TagLibraryValidator class that can be used to |
| 127 | validate the conformance of a JSP page to using this tag library. |
| 128 | --> |
| 129 | |
| 130 | <!ELEMENT validator-class (#PCDATA) > |
| 131 | |
| 132 | |
| 133 | <!-- |
| 134 | |
| 135 | The init-param element contains a name/value pair as an |
| 136 | initialization param |
| 137 | --> |
| 138 | |
| 139 | <!ELEMENT init-param (param-name, param-value, description?)> |
| 140 | |
| 141 | <!-- |
| 142 | |
| 143 | The param-name element contains the name of a parameter. |
| 144 | --> |
| 145 | |
| 146 | <!ELEMENT param-name (#PCDATA)> |
| 147 | |
| 148 | <!-- |
| 149 | |
| 150 | The param-value element contains the value of a parameter. |
| 151 | --> |
| 152 | |
| 153 | <!ELEMENT param-value (#PCDATA)> |
| 154 | |
| 155 | |
| 156 | <!-- |
| 157 | |
| 158 | Defines an optional event listener object to be instantiated and |
| 159 | registered automatically. |
| 160 | --> |
| 161 | |
| 162 | <!ELEMENT listener (listener-class) > |
| 163 | |
| 164 | <!-- |
| 165 | |
| 166 | The listener-class element declares a class in the application that |
| 167 | must be registered as a web application listener bean. See the |
| 168 | Servlet 2.3 specification for details. |
| 169 | --> |
| 170 | |
| 171 | <!ELEMENT listener-class (#PCDATA) > |
| 172 | |
| 173 | |
| 174 | <!-- |
| 175 | The tag defines a unique tag in this tag library. It has one |
| 176 | attribute, id. |
| 177 | |
| 178 | The tag element may have several subelements defining: |
| 179 | |
| 180 | name The unique action name |
| 181 | |
| 182 | tag-class The tag handler class implementing |
| 183 | javax.servlet.jsp.tagext.Tag |
| 184 | |
| 185 | tei-class An optional subclass of |
| 186 | javax.servlet.jsp.tagext.TagExtraInfo |
| 187 | |
| 188 | body-content The body content type |
| 189 | |
| 190 | display-name A short name that is intended to be displayed |
| 191 | by tools |
| 192 | |
| 193 | small-icon Optional small-icon that can be used by tools |
| 194 | |
| 195 | large-icon Optional large-icon that can be used by tools |
| 196 | |
| 197 | description Optional tag-specific information |
| 198 | |
| 199 | variable Optional scripting variable information |
| 200 | |
| 201 | attribute All attributes of this action |
| 202 | |
| 203 | example 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 | <!-- |
| 213 | Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements |
| 214 | the request time semantics for this tag. (required) |
| 215 | |
| 216 | #PCDATA ::= fully qualified Java class name |
| 217 | --> |
| 218 | |
| 219 | <!ELEMENT tag-class (#PCDATA) > |
| 220 | |
| 221 | <!-- |
| 222 | Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo for |
| 223 | this tag. (optional) |
| 224 | |
| 225 | If 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 | <!-- |
| 233 | Provides a hint as to the content of the body of this tag. Primarily |
| 234 | intended for use by page composition tools. |
| 235 | |
| 236 | There are currently three values specified: |
| 237 | |
| 238 | tagdependent 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 | |
| 242 | JSP The body of the tag contains nested JSP syntax |
| 243 | |
| 244 | empty The body must be empty |
| 245 | |
| 246 | The default (if not defined) is JSP |
| 247 | |
| 248 | #PCDATA ::= tagdependent | JSP | empty |
| 249 | |
| 250 | --> |
| 251 | |
| 252 | <!ELEMENT body-content (#PCDATA) > |
| 253 | |
| 254 | <!-- |
| 255 | |
| 256 | The display-name element contains a short name that is intended |
| 257 | to be displayed by tools. |
| 258 | --> |
| 259 | |
| 260 | <!ELEMENT display-name (#PCDATA) > |
| 261 | |
| 262 | |
| 263 | <!-- |
| 264 | |
| 265 | The 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 |
| 267 | tag library. The image must be either in the JPEG or GIF format, and |
| 268 | the file name must end with the suffix ".jpg" or ".gif" respectively. |
| 269 | The icon can be used by tools. |
| 270 | --> |
| 271 | |
| 272 | <!ELEMENT large-icon (#PCDATA) > |
| 273 | |
| 274 | <!-- |
| 275 | |
| 276 | The 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 |
| 278 | tag library. The image must be either in the JPEG or GIF format, and |
| 279 | the file name must end with the suffix ".jpg" or ".gif" respectively. |
| 280 | The icon can be used by tools. |
| 281 | --> |
| 282 | |
| 283 | <!ELEMENT small-icon (#PCDATA) > |
| 284 | |
| 285 | <!-- |
| 286 | |
| 287 | The example element contains an informal description of an example |
| 288 | of the use of a tag. |
| 289 | --> |
| 290 | |
| 291 | <!ELEMENT example (#PCDATA) > |
| 292 | |
| 293 | <!-- |
| 294 | |
| 295 | The variable tag provides information on the scripting variables |
| 296 | defined by this tag. It is a (translation time) error for a tag |
| 297 | that has one or more variable subelements to have a TagExtraInfo |
| 298 | class that returns a non-null object. |
| 299 | |
| 300 | The subelements of variable are of the form: |
| 301 | |
| 302 | name-given The variable name as a constant |
| 303 | |
| 304 | name-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 | |
| 309 | variable-class Name of the class of the variable. |
| 310 | java.lang.String is default. |
| 311 | |
| 312 | declare Whether the variable is declared or not. |
| 313 | True is the default. |
| 314 | |
| 315 | scope The scope of the scripting varaible |
| 316 | defined. NESTED is default. |
| 317 | |
| 318 | description 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 | |
| 327 | The name for the scripting variable. One of name-given or |
| 328 | name-from-attribute is required. |
| 329 | --> |
| 330 | |
| 331 | <!ELEMENT name-given (#PCDATA) > |
| 332 | |
| 333 | <!-- |
| 334 | |
| 335 | The name of an attribute whose (translation-time) value will give |
| 336 | the name of the variable. One of name-given or name-from-attribute |
| 337 | is required. |
| 338 | --> |
| 339 | |
| 340 | <!ELEMENT name-from-attribute (#PCDATA) > |
| 341 | |
| 342 | <!-- |
| 343 | |
| 344 | The optional name of the class for the scripting variable. The |
| 345 | default is java.lang.String. |
| 346 | --> |
| 347 | |
| 348 | <!ELEMENT variable-class (#PCDATA) > |
| 349 | |
| 350 | <!-- |
| 351 | |
| 352 | Whether the scripting variable is to be defined or not. See |
| 353 | TagExtraInfo for details. This element is optional and "true" |
| 354 | is the default. |
| 355 | --> |
| 356 | |
| 357 | <!ELEMENT declare (#PCDATA) > |
| 358 | |
| 359 | <!-- |
| 360 | |
| 361 | The scope of the scripting variable. See TagExtraInfo for details. |
| 362 | The element is optional and "NESTED" is the default. Other legal |
| 363 | values are "AT_BEGIN" and "AT_END". |
| 364 | --> |
| 365 | |
| 366 | <!ELEMENT scope (#PCDATA) > |
| 367 | |
| 368 | <!-- |
| 369 | |
| 370 | The attribute tag defines an attribute for the nesting tag |
| 371 | |
| 372 | An 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 | <!-- |
| 385 | The attribute tag defines an attribute for the nesting tag |
| 386 | |
| 387 | An 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 | <!-- |
| 404 | Defines the canonical name of a tag or attribute being defined |
| 405 | |
| 406 | #PCDATA ::= NMTOKEN |
| 407 | --> |
| 408 | |
| 409 | <!ELEMENT name (#PCDATA) > |
| 410 | |
| 411 | <!-- |
| 412 | Defines if the nesting attribute is required or optional. |
| 413 | |
| 414 | #PCDATA ::= true | false | yes | no |
| 415 | |
| 416 | If not present then the default is "false", i.e the attribute |
| 417 | is optional. |
| 418 | --> |
| 419 | |
| 420 | <!ELEMENT required (#PCDATA) > |
| 421 | |
| 422 | <!-- |
| 423 | Defines if the nesting attribute can have scriptlet expressions as |
| 424 | a value, i.e the value of the attribute may be dynamically calculated |
| 425 | at request time, as opposed to a static value determined at translation |
| 426 | time. |
| 427 | |
| 428 | #PCDATA ::= true | false | yes | no |
| 429 | |
| 430 | If not present then the default is "false", i.e the attribute |
| 431 | has a static value |
| 432 | --> |
| 433 | |
| 434 | <!ELEMENT rtexprvalue (#PCDATA) > |
| 435 | |
| 436 | |
| 437 | <!-- |
| 438 | |
| 439 | Defines the Java type of the attributes value. For static values |
| 440 | (those determined at translation time) the type is always |
| 441 | java.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> |