1
<?xml version="1.0" encoding="UTF-8"?>
3
targetNamespace="http://java.sun.com/xml/ns/j2ee"
4
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
5
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
6
xmlns:xml="http://www.w3.org/XML/1998/namespace"
7
elementFormDefault="qualified"
8
attributeFormDefault="unqualified"
19
Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
20
Road, Palo Alto, California 94303, U.S.A. All rights
23
Sun Microsystems, Inc. has intellectual property rights
24
relating to technology described in this document. In
25
particular, and without limitation, these intellectual
26
property rights may include one or more of the U.S. patents
27
listed at http://www.sun.com/patents and one or more
28
additional patents or pending patent applications in the
29
U.S. and other countries.
31
This document and the technology which it describes are
32
distributed under licenses restricting their use, copying,
33
distribution, and decompilation. No part of this document
34
may be reproduced in any form by any means without prior
35
written authorization of Sun and its licensors, if any.
37
Third-party software, including font technology, is
38
copyrighted and licensed from Sun suppliers.
40
Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
41
JavaServer Pages, Enterprise JavaBeans and the Java Coffee
42
Cup logo are trademarks or registered trademarks of Sun
43
Microsystems, Inc. in the U.S. and other countries.
45
Federal Acquisitions: Commercial Software - Government Users
46
Subject to Standard License Terms and Conditions.
55
This is the XML Schema for the JSP Taglibrary
56
descriptor. All Taglibrary descriptors must
57
indicate the tag library schema by using the Taglibrary
60
http://java.sun.com/xml/ns/j2ee
62
and by indicating the version of the schema by
63
using the version element as shown below:
65
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
66
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
67
xsi:schemaLocation="..."
72
The instance documents may indicate the published
73
version of the schema using xsi:schemaLocation attribute
74
for J2EE namespace with the following location:
76
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
82
<xsd:include schemaLocation="j2ee_1_4.xsd"/>
85
<!-- **************************************************** -->
88
<xsd:element name="taglib" type="j2ee:tldTaglibType">
92
The taglib tag is the document root.
93
The definition of taglib is provided
98
<xsd:unique name="tag-name-uniqueness">
102
The taglib element contains, among other things, tag and
104
The name subelements of these elements must each be unique.
108
<xsd:selector xpath="j2ee:tag|j2ee:tag-file"/>
109
<xsd:field xpath="j2ee:name"/>
112
<xsd:unique name="function-name-uniqueness">
116
The taglib element contains function elements.
117
The name subelements of these elements must each be unique.
121
<xsd:selector xpath="j2ee:function"/>
122
<xsd:field xpath="j2ee:name"/>
128
<!-- **************************************************** -->
130
<xsd:complexType name="body-contentType">
134
Specifies the type of body that is valid for a tag.
135
This value is used by the JSP container to validate
136
that a tag invocation has the correct body syntax and
137
by page composition tools to assist the page author
138
in providing a valid tag body.
140
There are currently four values specified:
142
tagdependent The body of the tag is interpreted by the tag
143
implementation itself, and is most likely
144
in a different "language", e.g embedded SQL
147
JSP The body of the tag contains nested JSP
150
empty The body must be empty
152
scriptless The body accepts only template text, EL
153
Expressions, and JSP action elements. No
154
scripting elements are allowed.
160
<xsd:restriction base="j2ee:string">
161
<xsd:enumeration value="tagdependent"/>
162
<xsd:enumeration value="JSP"/>
163
<xsd:enumeration value="empty"/>
164
<xsd:enumeration value="scriptless"/>
169
<!-- **************************************************** -->
171
<xsd:complexType name="extensibleType" abstract="true">
175
The extensibleType is an abstract base type that is used to
176
define the type of extension-elements. Instance documents
177
must substitute a known type to define the extension by
178
using xsi:type attribute to define the actual type of
183
<xsd:attribute name="id" type="xsd:ID"/>
186
<!-- **************************************************** -->
188
<xsd:complexType name="functionType">
192
The function element is used to provide information on each
193
function in the tag library that is to be exposed to the EL.
195
The function element may have several subelements defining:
197
description Optional tag-specific information
199
display-name A short name that is intended to be
202
icon Optional icon element that can be used
205
name A unique name for this function
207
function-class Provides the name of the Java class that
208
implements the function
210
function-signature Provides the signature, as in the Java
211
Language Specification, of the Java
212
method that is to be used to implement
215
example Optional informal description of an
216
example of a use of this function
218
function-extension Zero or more extensions that provide extra
219
information about this function, for tool
226
<xsd:group ref="j2ee:descriptionGroup"/>
227
<xsd:element name="name"
228
type="j2ee:tld-canonical-nameType">
232
A unique name for this function.
237
<xsd:element name="function-class"
238
type="j2ee:fully-qualified-classType">
242
Provides the fully-qualified class name of the Java
243
class containing the static method that implements
250
<xsd:element name="function-signature"
255
Provides the signature, of the static Java method that is
256
to be used to implement the function. The syntax of the
257
function-signature element is as follows:
259
FunctionSignature ::= ReturnType S MethodName S?
260
'(' S? Parameters? S? ')'
264
MethodName ::= Identifier
266
Parameters ::= Parameter
267
| ( Parameter S? ',' S? Parameters )
273
* Type is a basic type or a fully qualified Java class name
274
(including package name), as per the 'Type' production
275
in the Java Language Specification, Second Edition,
278
* Identifier is a Java identifier, as per the 'Identifier'
279
production in the Java Language Specification, Second
284
java.lang.String nickName( java.lang.String, int )
290
<xsd:element name="example"
291
type="j2ee:xsdStringType"
296
The example element contains an informal description
297
of an example of the use of this function.
303
<xsd:element name="function-extension"
304
type="j2ee:tld-extensionType"
306
maxOccurs="unbounded">
310
Function extensions are for tool use only and must not affect
311
the behavior of a container.
317
<xsd:attribute name="id" type="xsd:ID"/>
320
<!-- **************************************************** -->
322
<xsd:complexType name="tagFileType">
326
Defines an action in this tag library that is implemented
329
The tag-file element has two required subelements:
331
description Optional tag-specific information
333
display-name A short name that is intended to be
336
icon Optional icon element that can be used
339
name The unique action name
341
path Where to find the .tag file implementing this
342
action, relative to the root of the web
343
application or the root of the JAR file for a
344
tag library packaged in a JAR. This must
345
begin with /WEB-INF/tags if the .tag file
346
resides in the WAR, or /META-INF/tags if the
347
.tag file resides in a JAR.
349
example Optional informal description of an
350
example of a use of this tag
352
tag-extension Zero or more extensions that provide extra
353
information about this tag, for tool
360
<xsd:group ref="j2ee:descriptionGroup"/>
361
<xsd:element name="name"
362
type="j2ee:tld-canonical-nameType"/>
363
<xsd:element name="path"
364
type="j2ee:pathType"/>
365
<xsd:element name="example"
366
type="j2ee:xsdStringType"
371
The example element contains an informal description
372
of an example of the use of a tag.
378
<xsd:element name="tag-extension"
379
type="j2ee:tld-extensionType"
381
maxOccurs="unbounded">
385
Tag extensions are for tool use only and must not affect
386
the behavior of a container.
392
<xsd:attribute name="id" type="xsd:ID"/>
395
<!-- **************************************************** -->
397
<xsd:complexType name="tagType">
401
The tag defines a unique tag in this tag library. It has one
404
The tag element may have several subelements defining:
406
description Optional tag-specific information
408
display-name A short name that is intended to be
411
icon Optional icon element that can be used
414
name The unique action name
416
tag-class The tag handler class implementing
417
javax.servlet.jsp.tagext.JspTag
419
tei-class An optional subclass of
420
javax.servlet.jsp.tagext.TagExtraInfo
422
body-content The body content type
424
variable Optional scripting variable information
426
attribute All attributes of this action that are
427
evaluated prior to invocation.
429
dynamic-attributes Whether this tag supports additional
430
attributes with dynamic names. If
431
true, the tag-class must implement the
432
javax.servlet.jsp.tagext.DynamicAttributes
433
interface. Defaults to false.
435
example Optional informal description of an
436
example of a use of this tag
438
tag-extension Zero or more extensions that provide extra
439
information about this tag, for tool
446
<xsd:group ref="j2ee:descriptionGroup"/>
447
<xsd:element name="name"
448
type="j2ee:tld-canonical-nameType"/>
449
<xsd:element name="tag-class"
450
type="j2ee:fully-qualified-classType">
454
Defines the subclass of javax.serlvet.jsp.tagext.JspTag
455
that implements the request time semantics for
462
<xsd:element name="tei-class"
463
type="j2ee:fully-qualified-classType"
468
Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo
469
for this tag. (optional)
471
If this is not given, the class is not consulted at
477
<xsd:element name="body-content"
478
type="j2ee:body-contentType">
482
Specifies the format for the body of this tag.
483
The default in JSP 1.2 was "JSP" but because this
484
is an invalid setting for simple tag handlers, there
485
is no longer a default in JSP 2.0. A reasonable
486
default for simple tag handlers is "scriptless" if
487
the tag can have a body.
492
<xsd:element name="variable"
493
type="j2ee:variableType"
494
minOccurs="0" maxOccurs="unbounded"/>
495
<xsd:element name="attribute"
496
type="j2ee:tld-attributeType"
497
minOccurs="0" maxOccurs="unbounded"/>
498
<xsd:element name="dynamic-attributes"
499
type="j2ee:generic-booleanType"
501
<xsd:element name="example"
502
type="j2ee:xsdStringType"
507
The example element contains an informal description
508
of an example of the use of a tag.
514
<xsd:element name="tag-extension"
515
type="j2ee:tld-extensionType"
517
maxOccurs="unbounded">
521
Tag extensions are for tool use only and must not affect
522
the behavior of a container.
528
<xsd:attribute name="id" type="xsd:ID"/>
531
<!-- **************************************************** -->
533
<xsd:complexType name="tld-attributeType">
537
The attribute element defines an attribute for the nesting
538
tag. The attributre element may have several subelements
541
description a description of the attribute
543
name the name of the attribute
545
required whether the attribute is required or
548
rtexprvalue whether the attribute is a runtime attribute
550
type the type of the attributes
552
fragment whether this attribute is a fragment
557
<xsd:element name="description"
558
type="j2ee:descriptionType"
559
minOccurs="0" maxOccurs="unbounded"/>
560
<xsd:element name="name"
561
type="j2ee:java-identifierType"/>
562
<xsd:element name="required"
563
type="j2ee:generic-booleanType"
568
Defines if the nesting attribute is required or
571
If not present then the default is "false", i.e
572
the attribute is optional.
580
<xsd:element name="rtexprvalue"
581
type="j2ee:generic-booleanType"
586
Defines if the nesting attribute can have scriptlet
587
expressions as a value, i.e the value of the
588
attribute may be dynamically calculated at request
589
time, as opposed to a static value determined at
592
If not present then the default is "false", i.e the
593
attribute has a static value
599
<xsd:element name="type"
600
type="j2ee:fully-qualified-classType"
605
Defines the Java type of the attributes value. For
606
static values (those determined at translation time)
607
the type is always java.lang.String.
613
<xsd:element name="fragment"
614
type="j2ee:generic-booleanType"
619
"true" if this attribute is of type
620
javax.jsp.tagext.JspFragment, representing dynamic
621
content that can be re-evaluated as many times
622
as needed by the tag handler. If omitted or "false",
623
the default is still type="java.lang.String"
630
<xsd:attribute name="id" type="xsd:ID"/>
633
<!-- **************************************************** -->
635
<xsd:complexType name="tld-canonical-nameType">
640
Defines the canonical name of a tag or attribute being
643
The name must conform to the lexical rules for an NMTOKEN.
649
<xsd:restriction base="j2ee:xsdNMTOKENType"/>
653
<!-- **************************************************** -->
655
<xsd:complexType name="tld-extensionType">
659
The tld-extensionType is used to indicate
660
extensions to a specific TLD element.
662
It is used by elements to designate an extension block
663
that is targeted to a specific extension designated by
664
a set of extension elements that are declared by a
665
namespace. The namespace identifies the extension to
666
the tool that processes the extension.
668
The type of the extension-element is abstract. Therefore,
669
a concrete type must be specified by the TLD using
670
xsi:type attribute for each extension-element.
676
<xsd:element name="extension-element"
677
type="j2ee:extensibleType"
678
maxOccurs="unbounded"/>
681
<xsd:attribute name="namespace"
684
<xsd:attribute name="id" type="xsd:ID"/>
688
<!-- **************************************************** -->
690
<xsd:complexType name="tldTaglibType">
694
The taglib tag is the document root, it defines:
696
description a simple string describing the "use" of this taglib,
697
should be user discernable
699
display-name the display-name element contains a
700
short name that is intended to be displayed
703
icon optional icon that can be used by tools
705
tlib-version the version of the tag library implementation
707
short-name a simple default short name that could be
708
used by a JSP authoring tool to create
709
names with a mnemonic value; for example,
710
the it may be used as the prefered prefix
711
value in taglib directives
713
uri a uri uniquely identifying this taglib
715
validator optional TagLibraryValidator information
717
listener optional event listener specification
719
tag tags in this tag library
721
tag-file tag files in this tag library
723
function zero or more EL functions defined in this
726
taglib-extension zero or more extensions that provide extra
727
information about this taglib, for tool
733
<xsd:group ref="j2ee:descriptionGroup"/>
734
<xsd:element name="tlib-version"
735
type="j2ee:dewey-versionType">
739
Describes this version (number) of the taglibrary.
740
It is described as a dewey decimal.
747
<xsd:element name="short-name"
748
type="j2ee:tld-canonical-nameType">
752
Defines a simple default name that could be used by
753
a JSP authoring tool to create names with a
754
mnemonicvalue; for example, it may be used as the
755
preferred prefix value in taglib directives. Do
756
not use white space, and do not start with digits
763
<xsd:element name="uri"
764
type="j2ee:xsdAnyURIType"
769
Defines a public URI that uniquely identifies this
770
version of the taglibrary. Leave it empty if it
777
<xsd:element name="validator"
778
type="j2ee:validatorType"
781
<xsd:element name="listener"
782
type="j2ee:listenerType"
783
minOccurs="0" maxOccurs="unbounded">
785
<xsd:element name="tag"
788
maxOccurs="unbounded"/>
789
<xsd:element name="tag-file"
790
type="j2ee:tagFileType"
792
maxOccurs="unbounded"/>
793
<xsd:element name="function"
794
type="j2ee:functionType"
796
maxOccurs="unbounded"/>
797
<xsd:element name="taglib-extension"
798
type="j2ee:tld-extensionType"
800
maxOccurs="unbounded">
804
Taglib extensions are for tool use only and must not affect
805
the behavior of a container.
811
<xsd:attribute name="version"
812
type="j2ee:dewey-versionType"
818
Describes the JSP version (number) this taglibrary
819
requires in order to function (dewey decimal)
825
<xsd:attribute name="id" type="xsd:ID"/>
828
<!-- **************************************************** -->
830
<xsd:complexType name="validatorType">
834
A validator that can be used to validate
835
the conformance of a JSP page to using this tag library is
836
defined by a validatorType.
842
<xsd:element name="description"
843
type="j2ee:descriptionType"
845
maxOccurs="unbounded"/>
846
<xsd:element name="validator-class"
847
type="j2ee:fully-qualified-classType">
851
Defines the TagLibraryValidator class that can be used
852
to validate the conformance of a JSP page to using this
858
<xsd:element name="init-param"
859
type="j2ee:param-valueType"
860
minOccurs="0" maxOccurs="unbounded">
864
The init-param element contains a name/value pair as an
865
initialization param.
873
<xsd:attribute name="id" type="xsd:ID"/>
876
<!-- **************************************************** -->
878
<xsd:complexType name="variable-scopeType">
882
This type defines scope of the scripting variable. See
883
TagExtraInfo for details. The allowed values are,
884
"NESTED", "AT_BEGIN" and "AT_END".
890
<xsd:restriction base="j2ee:string">
891
<xsd:enumeration value="NESTED"/>
892
<xsd:enumeration value="AT_BEGIN"/>
893
<xsd:enumeration value="AT_END"/>
898
<!-- **************************************************** -->
900
<xsd:complexType name="variableType">
904
The variableType provides information on the scripting
905
variables defined by using this tag. It is a (translation
906
time) error for a tag that has one or more variable
907
subelements to have a TagExtraInfo class that returns a
908
non-null value from a call to getVariableInfo().
910
The subelements of variableType are of the form:
912
description Optional description of this
915
name-given The variable name as a constant
917
name-from-attribute The name of an attribute whose
918
(translation time) value will
920
variable. One of name-given or
921
name-from-attribute is required.
923
variable-class Name of the class of the variable.
924
java.lang.String is default.
926
declare Whether the variable is declared
927
or not. True is the default.
929
scope The scope of the scripting varaible
930
defined. NESTED is default.
936
<xsd:element name="description"
937
type="j2ee:descriptionType"
938
minOccurs="0" maxOccurs="unbounded"/>
940
<xsd:element name="name-given"
941
type="j2ee:java-identifierType">
945
The name for the scripting variable.
951
<xsd:element name="name-from-attribute"
952
type="j2ee:java-identifierType">
956
The name of an attribute whose
957
(translation-time) value will give the name of
964
<xsd:element name="variable-class"
965
type="j2ee:fully-qualified-classType"
970
The optional name of the class for the scripting
971
variable. The default is java.lang.String.
978
<xsd:element name="declare"
979
type="j2ee:generic-booleanType"
985
Whether the scripting variable is to be defined
986
or not. See TagExtraInfo for details. This
987
element is optional and "true" is the default.
992
<xsd:element name="scope"
993
type="j2ee:variable-scopeType"
998
The element is optional and "NESTED" is the default.
1000
</xsd:documentation>
1004
<xsd:attribute name="id" type="xsd:ID"/>