You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/06/17 22:37:28 UTC
[tomcat] 02/02: Add TLD schema for Jakarta EE 9
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b5492012c982de454cd10a2f45b5b18fdee448d1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jun 17 17:26:28 2020 +0100
Add TLD schema for Jakarta EE 9
Signed-off-by: Mark Thomas <ma...@apache.org>
---
LICENSE | 1 +
.../servlet/resources/web-jsptaglibrary_3_0.xsd | 1109 ++++++++++++++++++++
.../tomcat/util/descriptor/DigesterFactory.java | 1 +
.../tomcat/util/descriptor/XmlIdentifiers.java | 1 +
res/INSTALLLICENSE | 1 +
res/META-INF/servlet-api.jar.license | 1 +
res/maven/tomcat-servlet-api.pom | 1 +
res/rat/rat-excludes.txt | 3 +
test/org/apache/jasper/compiler/TestValidator.java | 1 +
test/webapp-5.0/WEB-INF/tags30.tld | 37 +
test/webapp-5.0/tld-versions.jsp | 2 +
11 files changed, 1158 insertions(+)
diff --git a/LICENSE b/LICENSE
index 4950641..a3cd18e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -219,6 +219,7 @@ following Jakarta EE Schemas:
- web-app_5_0.xsd
- web-commonn_5_0.xsd
- web-fragment_5_0.xsd
+- web-jsptaglibrary_3_0.xsd
Eclipse Public License - v 2.0
diff --git a/java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd b/java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd
new file mode 100644
index 0000000..30c3444
--- /dev/null
+++ b/java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd
@@ -0,0 +1,1109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="3.0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v. 2.0, which is available at
+ http://www.eclipse.org/legal/epl-2.0.
+
+ This Source Code may also be made available under the following Secondary
+ Licenses when the conditions for such availability set forth in the
+ Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ version 2 with the GNU Classpath Exception, which is available at
+ https://www.gnu.org/software/classpath/license.html.
+
+ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ This is the XML Schema for the JSP Taglibrary
+ descriptor. All Taglibrary descriptors must
+ indicate the tag library schema by using the Taglibrary
+ namespace:
+
+ https://jakarta.ee/xml/ns/jakartaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="3.0">
+ ...
+ </taglib>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for Jakarta EE namespace with the following location:
+
+ https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_0.xsd
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="jakartaee_9.xsd"/>
+
+
+<!-- **************************************************** -->
+
+ <xsd:element name="taglib"
+ type="jakartaee:tldTaglibType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib tag is the document root.
+ The definition of taglib is provided
+ by the tldTaglibType.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:unique name="tag-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib element contains, among other things, tag and
+ tag-file elements.
+ The name subelements of these elements must each be unique.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="jakartaee:tag|jakartaee:tag-file"/>
+ <xsd:field xpath="jakartaee:name"/>
+ </xsd:unique>
+ <xsd:unique name="function-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib element contains function elements.
+ The name subelements of these elements must each be unique.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="jakartaee:function"/>
+ <xsd:field xpath="jakartaee:name"/>
+ </xsd:unique>
+ </xsd:element>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="body-contentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Specifies the type of body that is valid for a tag.
+ This value is used by the JSP container to validate
+ that a tag invocation has the correct body syntax and
+ by page composition tools to assist the page author
+ in providing a valid tag body.
+
+ There are currently four values specified:
+
+ tagdependent The body of the tag is interpreted by the tag
+ implementation itself, and is most likely
+ in a different "language", e.g embedded SQL
+ statements.
+
+ JSP The body of the tag contains nested JSP
+ syntax.
+
+ empty The body must be empty
+
+ scriptless The body accepts only template text, EL
+ Expressions, and JSP action elements. No
+ scripting elements are allowed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="jakartaee:string">
+ <xsd:enumeration value="tagdependent"/>
+ <xsd:enumeration value="JSP"/>
+ <xsd:enumeration value="empty"/>
+ <xsd:enumeration value="scriptless"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-canonical-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the canonical name of a tag or attribute being
+ defined.
+
+ The name must conform to the lexical rules for an NMTOKEN.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="jakartaee:xsdNMTOKENType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="validatorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ A validator that can be used to validate
+ the conformance of a JSP page to using this tag library is
+ defined by a validatorType.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="jakartaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="validator-class"
+ type="jakartaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the TagLibraryValidator class that can be used
+ to validate the conformance of a JSP page to using this
+ tag library.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="init-param"
+ type="jakartaee:param-valueType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The init-param element contains a name/value pair as an
+ initialization param.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tagType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The tag defines a unique tag in this tag library. It has one
+ attribute, id.
+
+ The tag element may have several subelements defining:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name The unique action name
+
+ tag-class The tag handler class implementing
+ jakarta.servlet.jsp.tagext.JspTag
+
+ tei-class An optional subclass of
+ jakarta.servlet.jsp.tagext.TagExtraInfo
+
+ body-content The body content type
+
+ variable Optional scripting variable information
+
+ attribute All attributes of this action that are
+ evaluated prior to invocation.
+
+ dynamic-attributes Whether this tag supports additional
+ attributes with dynamic names. If
+ true, the tag-class must implement the
+ jakarta.servlet.jsp.tagext.DynamicAttributes
+ interface. Defaults to false.
+
+ example Optional informal description of an
+ example of a use of this tag
+
+ tag-extension Zero or more extensions that provide extra
+ information about this tag, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="jakartaee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="jakartaee:tld-canonical-nameType"/>
+ <xsd:element name="tag-class"
+ type="jakartaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the subclass of jakarta.serlvet.jsp.tagext.JspTag
+ that implements the request time semantics for
+ this tag. (required)
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="tei-class"
+ type="jakartaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the subclass of jakarta.servlet.jsp.tagext.TagExtraInfo
+ for this tag. (optional)
+
+ If this is not given, the class is not consulted at
+ translation time.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="body-content"
+ type="jakartaee:body-contentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Specifies the format for the body of this tag.
+ The default in JSP 1.2 was "JSP" but because this
+ is an invalid setting for simple tag handlers, there
+ is no longer a default in JSP 2.0. A reasonable
+ default for simple tag handlers is "scriptless" if
+ the tag can have a body.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="variable"
+ type="jakartaee:variableType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="jakartaee:tld-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="dynamic-attributes"
+ type="jakartaee:generic-booleanType"
+ minOccurs="0"/>
+ <xsd:element name="example"
+ type="jakartaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of a tag.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="tag-extension"
+ type="jakartaee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Tag extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tagFileType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines an action in this tag library that is implemented
+ as a .tag file.
+
+ The tag-file element has two required subelements:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name The unique action name
+
+ path Where to find the .tag file implementing this
+ action, relative to the root of the web
+ application or the root of the JAR file for a
+ tag library packaged in a JAR. This must
+ begin with /WEB-INF/tags if the .tag file
+ resides in the WAR, or /META-INF/tags if the
+ .tag file resides in a JAR.
+
+ example Optional informal description of an
+ example of a use of this tag
+
+ tag-extension Zero or more extensions that provide extra
+ information about this tag, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="jakartaee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="jakartaee:tld-canonical-nameType"/>
+ <xsd:element name="path"
+ type="jakartaee:pathType"/>
+ <xsd:element name="example"
+ type="jakartaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of a tag.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="tag-extension"
+ type="jakartaee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Tag extensions are for tool use only and must not affect
+ the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="functionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The function element is used to provide information on each
+ function in the tag library that is to be exposed to the EL.
+
+ The function element may have several subelements defining:
+
+ description Optional tag-specific information
+
+ display-name A short name that is intended to be
+ displayed by tools
+
+ icon Optional icon element that can be used
+ by tools
+
+ name A unique name for this function
+
+ function-class Provides the name of the Java class that
+ implements the function
+
+ function-signature Provides the signature, as in the Java
+ Language Specification, of the Java
+ method that is to be used to implement
+ the function.
+
+ example Optional informal description of an
+ example of a use of this function
+
+ function-extension Zero or more extensions that provide extra
+ information about this function, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="jakartaee:descriptionGroup"/>
+ <xsd:element name="name"
+ type="jakartaee:tld-canonical-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ A unique name for this function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="function-class"
+ type="jakartaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Provides the fully-qualified class name of the Java
+ class containing the static method that implements
+ the function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="function-signature"
+ type="jakartaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Provides the signature, of the static Java method that is
+ to be used to implement the function. The syntax of the
+ function-signature element is as follows:
+
+ FunctionSignature ::= ReturnType S MethodName S?
+ '(' S? Parameters? S? ')'
+
+ ReturnType ::= Type
+
+ MethodName ::= Identifier
+
+ Parameters ::= Parameter
+ | ( Parameter S? ',' S? Parameters )
+
+ Parameter ::= Type
+
+ Where:
+
+ * Type is a basic type or a fully qualified
+ Java class name (including package name),
+ as per the 'Type' production in the Java
+ Language Specification, Second Edition,
+ Chapter 18.
+
+ * Identifier is a Java identifier, as per
+ the 'Identifier' production in the Java
+ Language Specification, Second
+ Edition, Chapter 18.
+
+ Example:
+
+ java.lang.String nickName( java.lang.String, int )
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="example"
+ type="jakartaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The example element contains an informal description
+ of an example of the use of this function.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="function-extension"
+ type="jakartaee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Function extensions are for tool use only and must not
+ affect the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tldTaglibType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The taglib tag is the document root, it defines:
+
+ description a simple string describing the "use" of this
+ taglib, should be user discernable
+
+ display-name the display-name element contains a
+ short name that is intended to be displayed
+ by tools
+
+ icon optional icon that can be used by tools
+
+ tlib-version the version of the tag library implementation
+
+ short-name a simple default short name that could be
+ used by a JSP authoring tool to create
+ names with a mnemonic value; for example,
+ the it may be used as the prefered prefix
+ value in taglib directives
+
+ uri a uri uniquely identifying this taglib
+
+ validator optional TagLibraryValidator information
+
+ listener optional event listener specification
+
+ tag tags in this tag library
+
+ tag-file tag files in this tag library
+
+ function zero or more EL functions defined in this
+ tag library
+
+ taglib-extension zero or more extensions that provide extra
+ information about this taglib, for tool
+ consumption
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="jakartaee:descriptionGroup"/>
+ <xsd:element name="tlib-version"
+ type="jakartaee:dewey-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Describes this version (number) of the taglibrary.
+ It is described as a dewey decimal.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="short-name"
+ type="jakartaee:tld-canonical-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a simple default name that could be used by
+ a JSP authoring tool to create names with a
+ mnemonicvalue; for example, it may be used as the
+ preferred prefix value in taglib directives. Do
+ not use white space, and do not start with digits
+ or underscore.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="uri"
+ type="jakartaee:xsdAnyURIType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a public URI that uniquely identifies this
+ version of the taglibrary. Leave it empty if it
+ does not apply.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator"
+ type="jakartaee:validatorType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="listener"
+ type="jakartaee:listenerType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ <xsd:element name="tag"
+ type="jakartaee:tagType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="tag-file"
+ type="jakartaee:tagFileType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="function"
+ type="jakartaee:functionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="taglib-extension"
+ type="jakartaee:tld-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Taglib extensions are for tool use only and must not
+ affect the behavior of a container.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="version"
+ type="jakartaee:dewey-versionType"
+ fixed="3.0"
+ use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Describes the JSP version (number) this taglibrary
+ requires in order to function (dewey decimal)
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="variableType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The variableType provides information on the scripting
+ variables defined by using this tag. It is a (translation
+ time) error for a tag that has one or more variable
+ subelements to have a TagExtraInfo class that returns a
+ non-null value from a call to getVariableInfo().
+
+ The subelements of variableType are of the form:
+
+ description Optional description of this
+ variable
+
+ name-given The variable name as a constant
+
+ name-from-attribute The name of an attribute whose
+ (translation time) value will
+ give the name of the
+ variable. One of name-given or
+ name-from-attribute is required.
+
+ variable-class Name of the class of the variable.
+ java.lang.String is default.
+
+ declare Whether the variable is declared
+ or not. True is the default.
+
+ scope The scope of the scripting varaible
+ defined. NESTED is default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="jakartaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:choice>
+ <xsd:element name="name-given"
+ type="jakartaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name for the scripting variable.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="name-from-attribute"
+ type="jakartaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name of an attribute whose
+ (translation-time) value will give the name of
+ the variable.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:element name="variable-class"
+ type="jakartaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The optional name of the class for the scripting
+ variable. The default is java.lang.String.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="declare"
+ type="jakartaee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Whether the scripting variable is to be defined
+ or not. See TagExtraInfo for details. This
+ element is optional and "true" is the default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="scope"
+ type="jakartaee:variable-scopeType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The element is optional and "NESTED" is the default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="variable-scopeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type defines scope of the scripting variable. See
+ TagExtraInfo for details. The allowed values are,
+ "NESTED", "AT_BEGIN" and "AT_END".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="jakartaee:string">
+ <xsd:enumeration value="NESTED"/>
+ <xsd:enumeration value="AT_BEGIN"/>
+ <xsd:enumeration value="AT_END"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The attribute element defines an attribute for the nesting
+ tag. The attribute element may have several subelements
+ defining:
+
+ description a description of the attribute
+
+ name the name of the attribute
+
+ required whether the attribute is required or
+ optional
+
+ rtexprvalue whether the attribute is a runtime attribute
+
+ type the type of the attributes
+
+ fragment whether this attribute is a fragment
+
+ deferred-value present if this attribute is to be parsed as a
+ jakarta.el.ValueExpression
+
+ deferred-method present if this attribute is to be parsed as a
+ jakarta.el.MethodExpression
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="jakartaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="name"
+ type="jakartaee:java-identifierType"/>
+ <xsd:element name="required"
+ type="jakartaee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines if the nesting attribute is required or
+ optional.
+
+ If not present then the default is "false", i.e
+ the attribute is optional.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:sequence minOccurs="0">
+ <xsd:element name="rtexprvalue"
+ type="jakartaee:generic-booleanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines if the nesting attribute can have scriptlet
+ expressions as a value, i.e the value of the
+ attribute may be dynamically calculated at request
+ time, as opposed to a static value determined at
+ translation time.
+ If not present then the default is "false", i.e the
+ attribute has a static value
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="type"
+ type="jakartaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the Java type of the attributes value.
+ If this element is omitted, the expected type is
+ assumed to be "java.lang.Object".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:choice>
+ <xsd:element name="deferred-value"
+ type="jakartaee:tld-deferred-valueType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Present if the value for this attribute is to be
+ passed to the tag handler as a
+ jakarta.el.ValueExpression. This allows for deferred
+ evaluation of EL expressions. An optional subelement
+ will contain the expected type that the value will
+ be coerced to after evaluation of the expression.
+ The type defaults to Object if one is not provided.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="deferred-method"
+ type="jakartaee:tld-deferred-methodType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Present if the value for this attribute is to be
+ passed to the tag handler as a
+ jakarta.el.MethodExpression. This allows for deferred
+ evaluation of an EL expression that identifies a
+ method to be invoked on an Object. An optional
+ subelement will contain the expected method
+ signature. The signature defaults to "void method()"
+ if one is not provided.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:element name="fragment"
+ type="jakartaee:generic-booleanType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ "true" if this attribute is of type
+ jakarta.servlet.jsp.tagext.JspFragment, representing dynamic
+ content that can be re-evaluated as many times
+ as needed by the tag handler. If omitted or "false",
+ the default is still type="java.lang.String"
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-deferred-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines information about how to provide the value for a
+ tag handler attribute that accepts a jakarta.el.ValueExpression.
+
+ The deferred-value element has one optional subelement:
+
+ type the expected type of the attribute
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="type"
+ type="jakartaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The fully-qualified name of the Java type that is the
+ expected type for this deferred expression. If this
+ element is omitted, the expected type is assumed to be
+ "java.lang.Object".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-deferred-methodType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines information about how to provide the value for a
+ tag handler attribute that accepts a jakarta.el.MethodExpression.
+
+ The deferred-method element has one optional subelement:
+
+ method-signature Provides the signature, as in the Java
+ Language Specifies, that is expected for
+ the method being identified by the
+ expression.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="method-signature"
+ type="jakartaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Provides the expected signature of the method identified
+ by the jakarta.el.MethodExpression.
+
+ This disambiguates overloaded methods and ensures that
+ the return value is of the expected type.
+
+ The syntax of the method-signature element is identical
+ to that of the function-signature element. See the
+ documentation for function-signature for more details.
+
+ The name of the method is for documentation purposes only
+ and is ignored by the JSP container.
+
+ Example:
+
+ boolean validate(java.lang.String)
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="tld-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The tld-extensionType is used to indicate
+ extensions to a specific TLD element.
+
+ It is used by elements to designate an extension block
+ that is targeted to a specific extension designated by
+ a set of extension elements that are declared by a
+ namespace. The namespace identifies the extension to
+ the tool that processes the extension.
+
+ The type of the extension-element is abstract. Therefore,
+ a concrete type must be specified by the TLD using
+ xsi:type attribute for each extension-element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="extension-element"
+ type="jakartaee:extensibleType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="namespace"
+ use="required"
+ type="xsd:anyURI"/>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="extensibleType"
+ abstract="true">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The extensibleType is an abstract base type that is used to
+ define the type of extension-elements. Instance documents
+ must substitute a known type to define the extension by
+ using xsi:type attribute to define the actual type of
+ extension-elements.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
index 9413de5..046e768 100644
--- a/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
+++ b/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
@@ -128,6 +128,7 @@ public class DigesterFactory {
// from JakartaEE 9
add(systemIds, XmlIdentifiers.WEB_50_XSD, locationFor("web-app_5_0.xsd"));
add(systemIds, XmlIdentifiers.WEB_FRAGMENT_50_XSD, locationFor("web-fragment_5_0.xsd"));
+ add(systemIds, XmlIdentifiers.TLD_30_XSD, locationFor("web-jsptaglibrary_3_0.xsd"));
addSelf(systemIds, "web-common_5_0.xsd");
addSelf(systemIds, "jakartaee_9.xsd");
addSelf(systemIds, "jsp_3_0.xsd");
diff --git a/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java b/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
index 703a391..60327c9 100644
--- a/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
+++ b/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
@@ -82,6 +82,7 @@ public final class XmlIdentifiers {
public static final String JAKARTAEE_9_NS = "https://jakarta.ee/xml/ns/jakartaee";
public static final String WEB_50_XSD = JAKARTAEE_9_NS + "/web-app_5_0.xsd";
public static final String WEB_FRAGMENT_50_XSD = JAKARTAEE_9_NS + "/web-fragment_5_0.xsd";
+ public static final String TLD_30_XSD = JAKARTAEE_9_NS + "/web-jsptaglibrary_3_0.xsd";
public static final String WEBSERVICES_20_XSD = JAKARTAEE_9_NS + "/jakartaee_web_services_2_0.xsd";
private XmlIdentifiers() {
diff --git a/res/INSTALLLICENSE b/res/INSTALLLICENSE
index 4950641..a3cd18e 100644
--- a/res/INSTALLLICENSE
+++ b/res/INSTALLLICENSE
@@ -219,6 +219,7 @@ following Jakarta EE Schemas:
- web-app_5_0.xsd
- web-commonn_5_0.xsd
- web-fragment_5_0.xsd
+- web-jsptaglibrary_3_0.xsd
Eclipse Public License - v 2.0
diff --git a/res/META-INF/servlet-api.jar.license b/res/META-INF/servlet-api.jar.license
index c17f80b..66f8ecb 100644
--- a/res/META-INF/servlet-api.jar.license
+++ b/res/META-INF/servlet-api.jar.license
@@ -571,6 +571,7 @@ For the following Jakarta EE Schemas:
- web-app_5_0.xsd
- web-commonn_5_0.xsd
- web-fragment_5_0.xsd
+- web-jsptaglibrary_3_0.xsd
Eclipse Public License - v 2.0
diff --git a/res/maven/tomcat-servlet-api.pom b/res/maven/tomcat-servlet-api.pom
index 36edb14..6ec093c 100644
--- a/res/maven/tomcat-servlet-api.pom
+++ b/res/maven/tomcat-servlet-api.pom
@@ -69,6 +69,7 @@
web-app_5_0.xsd
web-commonn_5_0.xsd
web-fragment_5_0.xsd
+ web-jsptaglibrary_3_0.xsd
to which the EPLv2 applies.
</comments>
</license>
diff --git a/res/rat/rat-excludes.txt b/res/rat/rat-excludes.txt
index ba3eaca..65aceea 100644
--- a/res/rat/rat-excludes.txt
+++ b/res/rat/rat-excludes.txt
@@ -138,6 +138,7 @@ java/jakarta/servlet/resources/web-fragment_3_0.xsd
java/jakarta/servlet/resources/web-fragment_3_1.xsd
java/jakarta/servlet/resources/web-fragment_4_0.xsd
java/jakarta/servlet/resources/web-fragment_5_0.xsd
+java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd
output/classes/jakarta/servlet/resources/javaee_5.xsd
output/classes/jakarta/servlet/resources/javaee_6.xsd
output/classes/jakarta/servlet/resources/javaee_7.xsd
@@ -165,6 +166,7 @@ output/classes/jakarta/servlet/resources/web-fragment_3_0.xsd
output/classes/jakarta/servlet/resources/web-fragment_3_1.xsd
output/classes/jakarta/servlet/resources/web-fragment_4_0.xsd
output/classes/jakarta/servlet/resources/web-fragment_5_0.xsd
+output/classes/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd
output/dist/src/java/jakarta/servlet/resources/javaee_5.xsd
output/dist/src/java/jakarta/servlet/resources/javaee_6.xsd
output/dist/src/java/jakarta/servlet/resources/javaee_7.xsd
@@ -193,6 +195,7 @@ output/dist/src/java/jakarta/servlet/resources/web-fragment_3_0.xsd
output/dist/src/java/jakarta/servlet/resources/web-fragment_3_1.xsd
output/dist/src/java/jakarta/servlet/resources/web-fragment_4_0.xsd
output/dist/src/java/jakarta/servlet/resources/web-fragment_5_0.xsd
+output/dist/src/java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd
output/dist/src/res/checkstyle/header-al2.txt
res/checkstyle/header-al2.txt
diff --git a/test/org/apache/jasper/compiler/TestValidator.java b/test/org/apache/jasper/compiler/TestValidator.java
index 1cef422..fcb83ee 100644
--- a/test/org/apache/jasper/compiler/TestValidator.java
+++ b/test/org/apache/jasper/compiler/TestValidator.java
@@ -241,6 +241,7 @@ public class TestValidator extends TomcatBaseTest {
Assert.assertTrue(result.indexOf("<p>04-hello world</p>") > 0);
Assert.assertTrue(result.indexOf("<p>#{'05-hello world'}</p>") > 0);
Assert.assertTrue(result.indexOf("<p>06-hello world</p>") > 0);
+ Assert.assertTrue(result.indexOf("<p>07-hello world</p>") > 0);
}
public static class Echo extends TagSupport {
diff --git a/test/webapp-5.0/WEB-INF/tags30.tld b/test/webapp-5.0/WEB-INF/tags30.tld
new file mode 100644
index 0000000..76443f5
--- /dev/null
+++ b/test/webapp-5.0/WEB-INF/tags30.tld
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--><taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_3_0.xsd"
+ version="3.0">
+ <tlib-version>1.0</tlib-version>
+ <short-name>Tags30</short-name>
+ <uri>http://tomcat.apache.org/tags30</uri>
+
+ <tag>
+ <name>Echo</name>
+ <tag-class>org.apache.jasper.compiler.TestValidator$Echo</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <name>echo</name>
+ <required>yes</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+</taglib>
\ No newline at end of file
diff --git a/test/webapp-5.0/tld-versions.jsp b/test/webapp-5.0/tld-versions.jsp
index debf250..1d87b0b 100644
--- a/test/webapp-5.0/tld-versions.jsp
+++ b/test/webapp-5.0/tld-versions.jsp
@@ -19,6 +19,7 @@
<%@ taglib prefix="tags12" uri="http://tomcat.apache.org/tags12" %>
<%@ taglib prefix="tags20" uri="http://tomcat.apache.org/tags20" %>
<%@ taglib prefix="tags21" uri="http://tomcat.apache.org/tags21" %>
+<%@ taglib prefix="tags30" uri="http://tomcat.apache.org/tags30" %>
<tags11:Echo echo="${'00-hello world'}"/>
<tags11:Echo echo="#{'01-hello world'}"/>
<tags12:Echo echo="${'02-hello world'}"/>
@@ -26,4 +27,5 @@
<tags20:Echo echo="${'04-hello world'}"/>
<tags20:Echo echo="#{'05-hello world'}"/>
<tags21:Echo echo="${'06-hello world'}"/>
+<tags30:Echo echo="${'07-hello world'}"/>
</body></html>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org