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 2001/08/14 18:22:02 UTC
cvs commit: xml-xalan/c/src/XSLT ElemPI.cpp NamespacesHandler.cpp StylesheetHandler.cpp XSLTEngineImpl.cpp
dbertoni 01/08/14 09:22:02
Modified: c/src/PlatformSupport DOMStringHelper.cpp
DOMStringHelper.hpp XalanTranscodingServices.cpp
c/src/XMLSupport FormatterToHTML.cpp
c/src/XSLT ElemPI.cpp NamespacesHandler.cpp
StylesheetHandler.cpp XSLTEngineImpl.cpp
Log:
Removed compareIgnoreCase() and equalsIgnoreCase().
Revision Changes Path
1.60 +0 -32 xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp
Index: DOMStringHelper.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- DOMStringHelper.cpp 2001/08/10 15:48:58 1.59
+++ DOMStringHelper.cpp 2001/08/14 16:22:01 1.60
@@ -930,23 +930,6 @@
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
-compareIgnoreCase(
- const XalanDOMChar* theLHS,
- unsigned int theLHSLength,
- const XalanDOMChar* theRHS,
- unsigned int theRHSLength)
-{
- return doCompare(
- theLHS,
- theLHSLength,
- theRHS,
- theRHSLength,
- towupper);
-}
-
-
-
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
compareIgnoreCaseASCII(
const XalanDOMChar* theLHS,
unsigned int theLHSLength,
@@ -1072,21 +1055,6 @@
theRHS,
theLength,
makeXalanDOMCharIdentityTransform());
-}
-
-
-
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
-equalsIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- unsigned int theLength)
-{
- return doEqualsIgnoreCase(
- theLHS,
- theRHS,
- theLength,
- towupper);
}
1.49 +1 -249 xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp
Index: DOMStringHelper.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- DOMStringHelper.hpp 2001/08/10 15:48:58 1.48
+++ DOMStringHelper.hpp 2001/08/14 16:22:01 1.49
@@ -1476,116 +1476,6 @@
/**
- * Compare the contents of two strings, in a case insensitive
- * manner.
- *
- * THIS FUNCTION DOES NOT COMPARE STRINGS LIKE strcmp() OR ANY
- * OTHER "COLLATION" ALGORITHM.
- *
- * @param theLHS first string to compare
- * @param theLHSLength the length of the first array
- * @param theRHS second string to compare
- * @param theRHSLength the length of the second array
- * @return Returns 0 for equal strings, less than 0 if theLHS is less
- * than theRHS, or greater than 0 if theRHS is greater than theLHS.
- */
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
-compareIgnoreCase(
- const XalanDOMChar* theLHS,
- unsigned int theLHSLength,
- const XalanDOMChar* theRHS,
- unsigned int theRHSLength);
-
-
-
-/**
- * Compare the contents of two strings, in a case insensitive
- * manner.
- *
- * THIS FUNCTION DOES NOT COMPARE STRINGS LIKE strcmp() OR ANY
- * OTHER "COLLATION" ALGORITHM.
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return Returns 0 for equal strings, less than 0 if theLHS is less
- * than theRHS, or greater than 0 if theRHS is greater than theLHS.
- */
-inline int
-compareIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS)
-{
- return compareIgnoreCase(theLHS, length(theLHS), theRHS, length(theRHS));
-}
-
-
-
-/**
- * Compare the contents of two strings, in a case insensitive
- * manner
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return Returns 0 for equal strings, less than 0 if theLHS is less
- * than theRHS, or greater than 0 if theRHS is greater than theLHS.
- * @see operator<
- * @see collationCompare
- */
-inline int
-compareIgnoreCase(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS)
-{
- return compareIgnoreCase(toCharArray(theLHS), length(theLHS), toCharArray(theRHS), length(theRHS));
-}
-
-
-
-/**
- * Compare the contents of two strings, in a case insensitive
- * manner
- *
- * THIS FUNCTION DOES NOT COMPARE STRINGS LIKE strcmp() OR ANY
- * OTHER "COLLATION" ALGORITHM.
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return Returns 0 for equal strings, less than 0 if theLHS is less
- * than theRHS, or greater than 0 if theRHS is greater than theLHS.
- */
-inline int
-compareIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMString& theRHS)
-{
- return compareIgnoreCase(theLHS, length(theLHS), toCharArray(theRHS), length(theRHS));
-}
-
-
-
-/**
- * Compare the contents of two strings, in a case insensitive
- * manner
- *
- * THIS FUNCTION DOES NOT COMPARE STRINGS LIKE strcmp() OR ANY
- * OTHER "COLLATION" ALGORITHM.
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return Returns 0 for equal strings, less than 0 if theLHS is less
- * than theRHS, or greater than 0 if theRHS is greater than theLHS.
- */
-inline int
-compareIgnoreCase(
- const XalanDOMString& theLHS,
- const XalanDOMChar* theRHS)
-{
- return compareIgnoreCase(toCharArray(theLHS), length(theLHS), theRHS, length(theRHS));
-}
-
-
-
-/**
* Compare the contents of two arrays in a case insensitive
* manner. Only the characters a-z and A-Z are considered as
* characters with "case".
@@ -1965,98 +1855,6 @@
/**
- * Compare the contents of two arrays for equality, without regard for case
- *
- * @param theLHS first array to compare
- * @param theRHS second array to compare
- * @param theLength the length of the arrays
- * @return true if the contents of both arrays are identical
- */
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(bool)
-equalsIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- unsigned int theLength);
-
-
-
-/**
- * Compare the contents of two strings for equality, without regard for case
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the case-insensitive contents of both strings are identical
- */
-inline bool
-equalsIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS)
-{
- const unsigned int theLength = length(theLHS);
-
- return theLength != length(theRHS) ? false : equalsIgnoreCase(theLHS, theRHS, theLength);
-}
-
-
-
-/**
- * Compare the contents of two strings for equality, without regard for case
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the case-insensitive contents of both strings are identical
- */
-inline bool
-equalsIgnoreCase(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS)
-{
- const unsigned int theLHSLength = length(theLHS);
-
- return theLHSLength != length(theRHS) ? false :
- equalsIgnoreCase(toCharArray(theLHS), toCharArray(theRHS), theLHSLength);
-}
-
-
-
-/**
- * Compare the contents of two strings for equality, without regard for case
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the case-insensitive contents of both strings are identical
- */
-inline bool
-equalsIgnoreCase(
- const XalanDOMChar* theLHS,
- const XalanDOMString& theRHS)
-{
- const unsigned int theRHSLength = length(theRHS);
-
- return theRHSLength != length(theLHS) ? false :
- equalsIgnoreCase(theLHS, toCharArray(theRHS), theRHSLength);
-}
-
-
-
-/**
- * Compare the contents of two strings for equality, without regard for case
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the case-insensitive contents of both strings are identical
- */
-inline bool
-equalsIgnoreCase(
- const XalanDOMString& theLHS,
- const XalanDOMChar* theRHS)
-{
- return equalsIgnoreCase(theRHS, theLHS);
-}
-
-
-
-/**
* Compare the contents of two arrays for equality, without regard for case.
* Only the characters a-z and A-Z are considered characters with "case".
*
@@ -2571,29 +2369,6 @@
/**
- * Case-insensitive equals functor for DOMStrings
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the contents of both strings are equal, without respect to case
- */
-#if defined(XALAN_NO_NAMESPACES)
-struct DOMStringEqualsIgnoreCaseFunction : public binary_function<const XalanDOMString&, const XalanDOMString&, bool>
-#else
-struct DOMStringEqualsIgnoreCaseFunction : public std::binary_function<const XalanDOMString&, const XalanDOMString&, bool>
-#endif
-{
- result_type
- operator() (first_argument_type theLHS,
- second_argument_type theRHS) const
- {
- return equalsIgnoreCase(theLHS, theRHS);
- }
-};
-
-
-
-/**
* Not equals functor for DOMStrings
*
* @param theLHS first string to compare
@@ -2640,29 +2415,6 @@
/**
- * Less than functor for DOMStrings which ignores case
- *
- * @param theLHS first string to compare
- * @param theRHS second string to compare
- * @return true if the theLHS is less than theRHS, without respect to case.
- */
-#if defined(XALAN_NO_NAMESPACES)
-struct DOMStringLessThanIgnoreCaseFunction : public binary_function<const XalanDOMString&, const XalanDOMString&, bool>
-#else
-struct DOMStringLessThanIgnoreCaseFunction : public std::binary_function<const XalanDOMString&, const XalanDOMString&, bool>
-#endif
-{
- result_type
- operator() (first_argument_type theLHS,
- second_argument_type theRHS) const
- {
- return compareIgnoreCase(theLHS, theRHS) < 0 ? true : false;
- }
-};
-
-
-
-/**
* Less than functor for DOMStrings which ignores case for the characters a-z and A-Z
*
* @param theLHS first string to compare
@@ -2679,7 +2431,7 @@
operator() (first_argument_type theLHS,
second_argument_type theRHS) const
{
- return compareIgnoreCase(theLHS, theRHS) < 0 ? true : false;
+ return compareIgnoreCaseASCII(theLHS, theRHS) < 0 ? true : false;
}
};
1.9 +4 -4 xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.cpp
Index: XalanTranscodingServices.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XalanTranscodingServices.cpp 2001/08/10 17:50:54 1.8
+++ XalanTranscodingServices.cpp 2001/08/14 16:22:01 1.9
@@ -254,7 +254,7 @@
bool
XalanTranscodingServices::encodingIsUTF8(const XalanDOMChar* theEncodingName)
{
- return compareIgnoreCase(c_wstr(theEncodingName), s_utf8String) == 0 ? true : false;
+ return compareIgnoreCaseASCII(c_wstr(theEncodingName), s_utf8String) == 0 ? true : false;
}
@@ -269,7 +269,7 @@
bool
XalanTranscodingServices::encodingIsUTF16(const XalanDOMChar* theEncodingName)
{
- return compareIgnoreCase(c_wstr(theEncodingName), s_utf16String) == 0 ? true : false;
+ return compareIgnoreCaseASCII(c_wstr(theEncodingName), s_utf16String) == 0 ? true : false;
}
@@ -284,13 +284,13 @@
const XalanTranscodingServices::XalanXMLByte*
XalanTranscodingServices::getStreamProlog(const XalanDOMString& theEncodingName)
{
- if (compareIgnoreCase(c_wstr(theEncodingName), s_utf16String) == 0)
+ if (compareIgnoreCaseASCII(c_wstr(theEncodingName), s_utf16String) == 0)
{
return s_UTF16ByteOrderMark;
}
#if 0
// We won't do this for now...
- else if (compareIgnoreCase(c_wstr(theEncodingName), s_utf8String) == 0)
+ else if (compareIgnoreCaseASCII(c_wstr(theEncodingName), s_utf8String) == 0)
{
return s_UTF8ByteOrderMark;
}
1.60 +1 -1 xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp
Index: FormatterToHTML.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToHTML.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- FormatterToHTML.cpp 2001/07/08 18:16:13 1.59
+++ FormatterToHTML.cpp 2001/08/14 16:22:01 1.60
@@ -801,7 +801,7 @@
{
accumContent(XalanUnicode::charSpace);
- if((length(value) == 0 || equalsIgnoreCase(name, value)) &&
+ if((length(value) == 0 || equalsIgnoreCaseASCII(name, value)) &&
elemDesc.isAttrFlagSet(name, ElemDesc::ATTREMPTY) == true)
{
accumName(name);
1.18 +1 -1 xml-xalan/c/src/XSLT/ElemPI.cpp
Index: ElemPI.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemPI.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ElemPI.cpp 2001/07/18 04:33:15 1.17
+++ ElemPI.cpp 2001/08/14 16:22:01 1.18
@@ -145,7 +145,7 @@
m_nameAVT->evaluate(piName, sourceNode, *this, executionContext);
- if(equalsIgnoreCase(piName, Constants::ATTRVAL_OUTPUT_METHOD_XML))
+ if(equalsIgnoreCaseASCII(piName, Constants::ATTRVAL_OUTPUT_METHOD_XML))
{
executionContext.error("processing-instruction name can not be 'xml'", 0, this);
}
1.12 +2 -2 xml-xalan/c/src/XSLT/NamespacesHandler.cpp
Index: NamespacesHandler.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/NamespacesHandler.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NamespacesHandler.cpp 2001/08/13 17:08:53 1.11
+++ NamespacesHandler.cpp 2001/08/14 16:22:01 1.12
@@ -241,7 +241,7 @@
{
XalanDOMString thePrefix = tokenizer.nextToken();
- if(equalsIgnoreCase(thePrefix, Constants::ATTRVAL_DEFAULT_PREFIX) == true)
+ if(equalsIgnoreCaseASCII(thePrefix, Constants::ATTRVAL_DEFAULT_PREFIX) == true)
{
::clear(thePrefix);
}
@@ -278,7 +278,7 @@
{
XalanDOMString thePrefix = tokenizer.nextToken();
- if(equalsIgnoreCase(thePrefix, Constants::ATTRVAL_DEFAULT_PREFIX) == true)
+ if(equalsIgnoreCaseASCII(thePrefix, Constants::ATTRVAL_DEFAULT_PREFIX) == true)
{
::clear(thePrefix);
}
1.68 +2 -2 xml-xalan/c/src/XSLT/StylesheetHandler.cpp
Index: StylesheetHandler.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetHandler.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- StylesheetHandler.cpp 2001/07/27 05:37:26 1.67
+++ StylesheetHandler.cpp 2001/08/14 16:22:01 1.68
@@ -798,7 +798,7 @@
// This attempts to optimize for a literal result element with
// the name HTML, so we don't have to switch on-the-fly.
- if(equalsIgnoreCase(name, Constants::ELEMNAME_HTML_STRING) == true)
+ if(equalsIgnoreCaseASCII(name, Constants::ELEMNAME_HTML_STRING) == true)
{
// If there's a default namespace, then we must output XML.
// Otherwise, we'll set the output method to HTML.
@@ -881,7 +881,7 @@
break;
case Constants::ELEMNAME_EXTENSION:
- if(!equalsIgnoreCase(ns, m_constructionContext.getXalanXSLNameSpaceURL()))
+ if(!equalsIgnoreCaseASCII(ns, m_constructionContext.getXalanXSLNameSpaceURL()))
{
m_constructionContext.warn("Old syntax: the functions instruction should use a url of " + m_constructionContext.getXalanXSLNameSpaceURL());
}
1.112 +1 -1 xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp
Index: XSLTEngineImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- XSLTEngineImpl.cpp 2001/08/13 17:08:54 1.111
+++ XSLTEngineImpl.cpp 2001/08/14 16:22:01 1.112
@@ -1709,7 +1709,7 @@
if (m_stylesheetRoot->isOutputMethodSet() == false)
{
- if (equalsIgnoreCase(getPendingElementName(),
+ if (equalsIgnoreCaseASCII(getPendingElementName(),
Constants::ELEMNAME_HTML_STRING) == true &&
pendingAttributesHasDefaultNS() == false)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org