cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xslt XSLTProcessor.java
Date Tue, 22 May 2001 23:10:18 GMT
balld       01/05/22 16:10:18

  Modified:    src/org/apache/cocoon/processor/xslt XSLTProcessor.java
  Log:
  another piece of pal's patch
  
  Revision  Changes    Path
  1.34      +24 -24    xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- XSLTProcessor.java	2001/05/22 23:05:54	1.33
  +++ XSLTProcessor.java	2001/05/22 23:10:14	1.34
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSLTProcessor.java,v 1.33 2001/05/22 23:05:54 balld Exp $ --
  +/*-- $Id: XSLTProcessor.java,v 1.34 2001/05/22 23:10:14 balld Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -75,7 +75,7 @@
    * This class implements an XSLT processor.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.33 $ $Date: 2001/05/22 23:05:54 $
  + * @version $Revision: 1.34 $ $Date: 2001/05/22 23:10:14 $
    */
   
   public class XSLTProcessor implements Actor, Processor, Status, Defaults, Cacheable {
  @@ -160,28 +160,28 @@
       }
   
       private boolean isValidName (String name) {
  -				StringCharacterIterator iter = new StringCharacterIterator(name);
  -				boolean valid_name = true;
  -				char c = iter.first();
  -				
  -				if (!(Character.isLetter(c) || c == '_')) {
  -					valid_name = false;
  -				} else {
  -					c = iter.next();
  -				}
  -				
  -				while (valid_name && c != iter.DONE) {
  -					if (!(Character.isLetterOrDigit(c) ||
  -						c == '-' ||
  -						c == '_' ||
  -						c == '.')) {
  -						valid_name = false;
  -					} else {
  -						c = iter.next();
  -					}
  -				}
  -
  -                                return valid_name;				
  +        if (!name) { 
  +            return false;
  +        }
  +	StringCharacterIterator iter = new StringCharacterIterator(name);
  +	boolean valid_name = true;
  +	char c = iter.first();
  +	if (!(Character.isLetter(c) || c == '_')) {
  +		valid_name = false;
  +	} else {
  +		c = iter.next();
  +	}
  +	while (valid_name && c != iter.DONE) {
  +		if (!(Character.isLetterOrDigit(c) ||
  +			c == '-' ||
  +			c == '_' ||
  +			c == '.')) {
  +			valid_name = false;
  +		} else {
  +			c = iter.next();
  +		}
  +	}
  +        return valid_name;				
       }
       
       private Object getResource(ServletContext context, HttpServletRequest request, 
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message