You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ho...@apache.org on 2001/03/22 02:26:54 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/conf tld_12.dtd

horwat      01/03/21 17:26:53

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        TagLibraryInfoImpl.java
               jasper/src/share/org/apache/jasper/resources
                        web-jsptaglib_1_2.dtd
               catalina/src/conf tld_12.dtd
  Log:
  Implementation of JSP 1.2 specification changes. These changes are
  a subset of spec bug 4401127.
  
  (1) Converting TLD into a useful end-user document
  
      Add the following optional elements:
  
      * <description>? at the end of <variable>
      * <description>? at the end of <attribute>
      * <description>? at the end of <validator>
      * <example>? at the end of <tag>
  
  (2) Add comment to DTD for TLD indicating that a DOCTYPE is needed and
      what its value is.  No changes to the value.
  
  (3) Change the name space "claimed" in the TLD to be
      "http://java.sun.com/JSP/TagLibraryDescriptor"
  
  (4) Make jsp-version element (child of <taglib>) mandatory
  
  Revision  Changes    Path
  1.22      +14 -3     jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TagLibraryInfoImpl.java	2001/03/21 00:08:52	1.21
  +++ TagLibraryInfoImpl.java	2001/03/22 01:26:44	1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.21 2001/03/21 00:08:52 remm Exp $
  - * $Revision: 1.21 $
  - * $Date: 2001/03/21 00:08:52 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v 1.22 2001/03/22 01:26:44 horwat Exp $
  + * $Revision: 1.22 $
  + * $Date: 2001/03/22 01:26:44 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -364,6 +364,9 @@
                   variableVector.addElement(createVariable(element));
               } else if ("attribute".equals(tname))
                   attributeVector.addElement(createAttribute(element));
  +            else if ("example".equals(tname) ||   // Ignored elements
  +		     false)
  +                ;
               else {
                   Constants.message("jsp.warning.unknown.element.in.tag", 
                                     new Object[] {tname},
  @@ -443,6 +446,9 @@
                       rtexprvalue = JspUtil.booleanValue(s);
               } else if ("type".equals(tname))
                   type = element.getBody();
  +            else if ("description".equals(tname) ||    // Ignored elements
  +		     false ) 
  +	      ;
               else {
                   Constants.message("jsp.warning.unknown.element.in.attribute", 
                                     new Object[] {tname},
  @@ -488,6 +494,9 @@
   			scope = VariableInfo.AT_END;
   		    }
   		}
  +	    }
  +            else if ("description".equals(tname) ||    // Ignored elements
  +		     false ) {
               } else {
                   Constants.message("jsp.warning.unknown.element.in.variable",
                                     new Object[] {tname},
  @@ -511,6 +520,8 @@
               else if ("init-param".equals(tname)) {
   		String[] initParam = createInitParam(element);
   		initParams.put(initParam[0], initParam[1]);
  +            } else if ("description".equals(tname) ||    // Ignored elements
  +		     false ) {
               } else {
                   Constants.message("jsp.warning.unknown.element.in.validator", //@@@ add in properties
                                     new Object[] {tname},
  
  
  
  1.3       +36 -6     jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web-jsptaglib_1_2.dtd
  
  Index: web-jsptaglib_1_2.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web-jsptaglib_1_2.dtd,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web-jsptaglib_1_2.dtd	2000/10/29 05:10:35	1.2
  +++ web-jsptaglib_1_2.dtd	2001/03/22 01:26:49	1.3
  @@ -15,6 +15,17 @@
             "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN">
   
   <!--
  +This is the XML DTD for the JSP 1.2 Tag Library Descriptor.
  +All JSP 1.2 tag library descriptors must include a DOCTYPE
  +of the following form:
  +
  +  <!DOCTYPE taglib
  +        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  +	"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
  +
  +-->
  +
  +<!--
   The taglib tag is the document root, it defines:
   
   tlib-version	the version of the tag library implementation
  @@ -44,13 +55,13 @@
   
   -->
   
  -<!ELEMENT taglib (tlib-version, jsp-version?, short-name, uri?,
  +<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
                     display-name?, small-icon?, large-icon?, description?,
                     validator?, listener*, tag+) >
   
   <!ATTLIST taglib id ID #IMPLIED
   	  xmlns CDATA #FIXED
  -		"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"
  +		"http://java.sun.com/JSP/TagLibraryDescriptor"
   >
   
   <!--
  @@ -101,7 +112,7 @@
   validate the conformance of a JSP page to using this tag library.
   -->
   
  -<!ELEMENT validator (validator-class, init-param*) >
  +<!ELEMENT validator (validator-class, init-param*, description?) >
   
   
   <!--
  @@ -183,10 +194,14 @@
   
   attribute         All attributes of this action
   
  +example           Optional informal description of an example of a
  +                  use of this tag
  +
   -->
   
   <!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?,
  -               small-icon?, large-icon?, description?, variable*, attribute*) >
  +               small-icon?, large-icon?, description?, variable*, attribute*,
  +               example?) >
   
   <!--
   Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements
  @@ -263,6 +278,14 @@
   
   <!--
   
  +The example element contains an informal description of an example
  +of the use of a tag.
  +-->
  +
  +<!ELEMENT example (#PCDATA) >
  +
  +<!--
  +
   The variable tag provides information on the scripting variables
   defined by this tag.  It is a (translation time) error for a tag
   that has one or more variable subelements to have a TagExtraInfo
  @@ -285,10 +308,13 @@
   
   scope                    The scope of the scripting varaible
                            defined.  NESTED is default.
  +
  +description              Optional description of this variable
  +
   -->
   
   <!ELEMENT variable ( (name-given | name-from-attribute), variable-class?,
  -                    declare?, scope?) >
  +                    declare?, scope?, description?) >
   
   <!--
   
  @@ -344,6 +370,7 @@
   - if the attributes value may be dynamically calculated at runtime
     by a scriptlet expression (optional)
   - the type of the attributes value (optional)
  +- an informal description of the meaning of the attribute (optional)
   
   -->
   
  @@ -361,9 +388,11 @@
     by a scriptlet expression (optional)
   
   - the type of the attributes value (optional)
  +
  +- an informal description of the meaning of the attribute (optional)
   -->
   
  -<!ELEMENT attribute (name, required? , rtexprvalue?, type?) >
  +<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) >
   
   <!--
   Defines the canonical name of a tag or attribute being defined
  @@ -416,6 +445,7 @@
   <!ATTLIST short-name id ID #IMPLIED>
   <!ATTLIST uri id ID #IMPLIED>
   <!ATTLIST description id ID #IMPLIED>
  +<!ATTLIST example id ID #IMPLIED>
   <!ATTLIST tag id ID #IMPLIED>
   <!ATTLIST tag-class id ID #IMPLIED>
   <!ATTLIST tei-class id ID #IMPLIED>
  
  
  
  1.4       +36 -6     jakarta-tomcat-4.0/catalina/src/conf/tld_12.dtd
  
  Index: tld_12.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/tld_12.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tld_12.dtd	2000/10/29 05:33:02	1.3
  +++ tld_12.dtd	2001/03/22 01:26:51	1.4
  @@ -15,6 +15,17 @@
             "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN">
   
   <!--
  +This is the XML DTD for the JSP 1.2 Tag Library Descriptor.
  +All JSP 1.2 tag library descriptors must include a DOCTYPE
  +of the following form:
  +
  +  <!DOCTYPE taglib
  +        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  +	"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
  +
  +-->
  +
  +<!--
   The taglib tag is the document root, it defines:
   
   tlib-version	the version of the tag library implementation
  @@ -44,13 +55,13 @@
   
   -->
   
  -<!ELEMENT taglib (tlib-version, jsp-version?, short-name, uri?,
  +<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
                     display-name?, small-icon?, large-icon?, description?,
                     validator?, listener*, tag+) >
   
   <!ATTLIST taglib id ID #IMPLIED
   	  xmlns CDATA #FIXED
  -		"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"
  +		"http://java.sun.com/JSP/TagLibraryDescriptor"
   >
   
   <!--
  @@ -101,7 +112,7 @@
   validate the conformance of a JSP page to using this tag library.
   -->
   
  -<!ELEMENT validator (validator-class, init-param*) >
  +<!ELEMENT validator (validator-class, init-param*, description?) >
   
   
   <!--
  @@ -183,10 +194,14 @@
   
   attribute         All attributes of this action
   
  +example           Optional informal description of an example of a
  +                  use of this tag
  +
   -->
   
   <!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?,
  -               small-icon?, large-icon?, description?, variable*, attribute*) >
  +               small-icon?, large-icon?, description?, variable*, attribute*,
  +               example?) >
   
   <!--
   Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements
  @@ -263,6 +278,14 @@
   
   <!--
   
  +The example element contains an informal description of an example
  +of the use of a tag.
  +-->
  +
  +<!ELEMENT example (#PCDATA) >
  +
  +<!--
  +
   The variable tag provides information on the scripting variables
   defined by this tag.  It is a (translation time) error for a tag
   that has one or more variable subelements to have a TagExtraInfo
  @@ -285,10 +308,13 @@
   
   scope                    The scope of the scripting varaible
                            defined.  NESTED is default.
  +
  +description              Optional description of this variable
  +
   -->
   
   <!ELEMENT variable ( (name-given | name-from-attribute), variable-class?,
  -                    declare?, scope?) >
  +                    declare?, scope?, description?) >
   
   <!--
   
  @@ -344,6 +370,7 @@
   - if the attributes value may be dynamically calculated at runtime
     by a scriptlet expression (optional)
   - the type of the attributes value (optional)
  +- an informal description of the meaning of the attribute (optional)
   
   -->
   
  @@ -361,9 +388,11 @@
     by a scriptlet expression (optional)
   
   - the type of the attributes value (optional)
  +
  +- an informal description of the meaning of the attribute (optional)
   -->
   
  -<!ELEMENT attribute (name, required? , rtexprvalue?, type?) >
  +<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) >
   
   <!--
   Defines the canonical name of a tag or attribute being defined
  @@ -416,6 +445,7 @@
   <!ATTLIST short-name id ID #IMPLIED>
   <!ATTLIST uri id ID #IMPLIED>
   <!ATTLIST description id ID #IMPLIED>
  +<!ATTLIST example id ID #IMPLIED>
   <!ATTLIST tag id ID #IMPLIED>
   <!ATTLIST tag-class id ID #IMPLIED>
   <!ATTLIST tei-class id ID #IMPLIED>