jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv JstlBaseTLV.java JstlCoreTLV.java JstlFmtTLV.java JstlSqlTLV.java JstlXmlTLV.java
Date Fri, 19 Apr 2002 21:59:15 GMT
luehe       02/04/19 14:59:15

  Modified:    standard/src/org/apache/taglibs/standard/tlv
                        JstlBaseTLV.java JstlCoreTLV.java JstlFmtTLV.java
                        JstlSqlTLV.java JstlXmlTLV.java
  Log:
  Added TLV check for empty 'var', which is illegal according to Section 2.7 of the PFD
  
  Revision  Changes    Path
  1.9       +7 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlBaseTLV.java
  
  Index: JstlBaseTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlBaseTLV.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JstlBaseTLV.java	17 Apr 2002 17:59:23 -0000	1.8
  +++ JstlBaseTLV.java	19 Apr 2002 21:59:15 -0000	1.9
  @@ -285,6 +285,13 @@
           return true;
       }
   
  +    // returns true if the 'var' attribute is empty
  +    protected boolean hasEmptyVar(Attributes a) {
  +	if ("".equals(a.getValue(VAR)))
  +	    return true;
  +	return false;
  +    }
  +
       // returns true if the 'scope' attribute is present without 'var'
       protected boolean hasDanglingScope(Attributes a) {
   	return (a.getValue(SCOPE) != null && a.getValue(VAR) == null);
  
  
  
  1.18      +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java
  
  Index: JstlCoreTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JstlCoreTLV.java	18 Apr 2002 02:17:37 -0000	1.17
  +++ JstlCoreTLV.java	19 Apr 2002 21:59:15 -0000	1.18
  @@ -194,6 +194,8 @@
               if (qn.startsWith(prefix + ":") && !hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE))); 
  +	    if (qn.startsWith(prefix + ":") && hasEmptyVar(a))
  +		fail(Resources.getMessage("TLV_EMPTY_VAR", qn));
   	    if (qn.startsWith(prefix + ":") && hasDanglingScope(a))
   		fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
  
  
  
  1.19      +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlFmtTLV.java
  
  Index: JstlFmtTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlFmtTLV.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JstlFmtTLV.java	18 Apr 2002 22:26:59 -0000	1.18
  +++ JstlFmtTLV.java	19 Apr 2002 21:59:15 -0000	1.19
  @@ -190,6 +190,8 @@
               if (qn.startsWith(prefix + ":") && !hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE)));
  +	    if (qn.startsWith(prefix + ":") && hasEmptyVar(a))
  +		fail(Resources.getMessage("TLV_EMPTY_VAR", qn));
               if (qn.startsWith(prefix + ":")
                   && !isFmtTag(ns, ln, SETLOCALE) 
   		&& !isFmtTag(ns, ln, SETBUNDLE)
  
  
  
  1.7       +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlSqlTLV.java
  
  Index: JstlSqlTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlSqlTLV.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JstlSqlTLV.java	17 Apr 2002 17:59:23 -0000	1.6
  +++ JstlSqlTLV.java	19 Apr 2002 21:59:15 -0000	1.7
  @@ -153,6 +153,8 @@
               if (qn.startsWith(prefix + ":") && !hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE))); 
  +	    if (qn.startsWith(prefix + ":") && hasEmptyVar(a))
  +		fail(Resources.getMessage("TLV_EMPTY_VAR", qn));
   	    if (qn.startsWith(prefix + ":") && hasDanglingScope(a))
   		fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
  
  
  
  1.13      +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java
  
  Index: JstlXmlTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JstlXmlTLV.java	18 Apr 2002 02:17:37 -0000	1.12
  +++ JstlXmlTLV.java	19 Apr 2002 21:59:15 -0000	1.13
  @@ -188,6 +188,8 @@
               if (qn.startsWith(prefix + ":") && !hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE)));
  +	    if (qn.startsWith(prefix + ":") && hasEmptyVar(a))
  +		fail(Resources.getMessage("TLV_EMPTY_VAR", qn));
               if (qn.startsWith(prefix + ":") && hasDanglingScope(a))
                   fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message