xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mm...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncReplace.java
Date Tue, 27 Aug 2002 16:43:30 GMT
mmidy       2002/08/27 09:43:30

  Modified:    java/src/org/apache/xpath/functions Tag: xslt20
                        FuncReplace.java
  Log:
  Fix problem with recognizing variable at begining of string
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +3 -3      xml-xalan/java/src/org/apache/xpath/functions/Attic/FuncReplace.java
  
  Index: FuncReplace.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/Attic/FuncReplace.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- FuncReplace.java	19 Aug 2002 22:44:13 -0000	1.1.2.2
  +++ FuncReplace.java	27 Aug 2002 16:43:29 -0000	1.1.2.3
  @@ -94,8 +94,8 @@
     	int groups = regex.getNumberOfGroups();
     	Token tokenTree = regex.getTokenTree();
     	int indexVar;
  -  	if (groups > 1 && (indexVar = replace.indexOf("$")) > 0 && 
  -  	                  replace.charAt(indexVar - 1) != '\\')
  +  	if (groups > 1 && (((indexVar = replace.indexOf("$")) > 0 && 
  +  	                  replace.charAt(indexVar - 1) != '\\') || indexVar==0))
     	{
     		
     		Token child;
  @@ -136,7 +136,7 @@
       		if (indexVar >= 0)
       		{
       		repVars = repVars+ replace.substring(start, indexVar);
  -    		if (indexVar >0 && replace.charAt(indexVar-1) == '\\')
  +    		if (indexVar >0 && replace.charAt(indexVar-1) == '\\') 
       		{
       		repVars = repVars.replace('\\', '$');
       		start = indexVar + 1;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message