You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/02/12 06:29:36 UTC

cvs commit: xml-xalan/c/src/xalanc/PlatformSupport XalanParsedURI.cpp

dbertoni    2004/02/11 21:29:36

  Modified:    c/src/xalanc/PlatformSupport XalanParsedURI.cpp
  Log:
  Use DOMStringHelper function for case-insensitive compare.
  
  Revision  Changes    Path
  1.5       +2 -22     xml-xalan/c/src/xalanc/PlatformSupport/XalanParsedURI.cpp
  
  Index: XalanParsedURI.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanParsedURI.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanParsedURI.cpp	6 Jan 2004 02:41:28 -0000	1.4
  +++ XalanParsedURI.cpp	12 Feb 2004 05:29:36 -0000	1.5
  @@ -61,6 +61,7 @@
   
   
   
  +#include "DOMStringHelper.hpp"
   #include "XalanUnicode.hpp"
   
   
  @@ -206,27 +207,6 @@
   	}
   }
   
  -/* Case insensitive comparison for URIs.  Limited to A-Za-z */
  -static int ci_equals(const XalanDOMString &s1, const XalanDOMString &s2)
  -{
  -	if (s1.length() != s2.length())
  -		return false;
  -
  -	const XalanDOMChar *p1 = s1.c_str(), *p2 = s2.c_str();
  -	for ( ; *p1 ; p1++, p2++)
  -	{
  -		XalanDOMChar c1 = *p1, c2 = *p2;
  -		if (c1 >= XalanUnicode::charLetter_A && c1 <= XalanUnicode::charLetter_Z)
  -			c1 = XalanUnicode::charLetter_a + (c1 - XalanUnicode::charLetter_A);
  -		if (c2 >= XalanUnicode::charLetter_A && c2 <= XalanUnicode::charLetter_Z)
  -			c2 = XalanUnicode::charLetter_a + (c2 - XalanUnicode::charLetter_A);
  -		if (c1 != c2)
  -			return false;
  -	}
  -
  -	return true;
  -}
  -
   /* Resolve this URI relative to another according to RFC2396, section 5.2 */
   void XalanParsedURI::resolve(
   	const XalanParsedURI &base
  @@ -258,7 +238,7 @@
   	// interpreted as a relative URI
   	if (!(m_defined & d_scheme) || ( 
   			(base.m_defined & d_scheme) && !(m_defined & d_authority) 
  -			&& ci_equals(m_scheme, base.m_scheme)))
  +			&& equalsIgnoreCaseASCII(m_scheme, base.m_scheme)))
   	{
   		// Inherit the base scheme
   		m_scheme = base.m_scheme;
  
  
  

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