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 2003/08/11 22:31:29 UTC
cvs commit: xml-xalan/c/src/xalanc/XSLT ElemForEach.cpp NodeSortKey.cpp NodeSortKey.hpp NodeSorter.cpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp
dbertoni 2003/08/11 13:31:29
Modified: c/src/xalanc/ICUBridge ICUBridgeCollationCompareFunctor.cpp
ICUBridgeCollationCompareFunctor.hpp
ICUBridgeCollationCompareFunctorImpl.cpp
ICUBridgeCollationCompareFunctorImpl.hpp
c/src/xalanc/XSLT ElemForEach.cpp NodeSortKey.cpp
NodeSortKey.hpp NodeSorter.cpp
StylesheetExecutionContext.hpp
StylesheetExecutionContextDefault.cpp
StylesheetExecutionContextDefault.hpp
Added: c/src/xalanc/PlatformSupport XalanCollationServices.hpp
Log:
Separated out collation interface into a new class.
Revision Changes Path
1.2 +7 -7 xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp
Index: ICUBridgeCollationCompareFunctor.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ICUBridgeCollationCompareFunctor.cpp 29 Jun 2003 03:57:54 -0000 1.1
+++ ICUBridgeCollationCompareFunctor.cpp 11 Aug 2003 20:31:29 -0000 1.2
@@ -84,9 +84,9 @@
int
ICUBridgeCollationCompareFunctor::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
return (*m_impl)(theLHS, theRHS, theCaseOrder);
}
@@ -95,10 +95,10 @@
int
ICUBridgeCollationCompareFunctor::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
return (*m_impl)(theLHS, theRHS, theLocale, theCaseOrder);
}
1.2 +6 -9 xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.hpp
Index: ICUBridgeCollationCompareFunctor.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ICUBridgeCollationCompareFunctor.hpp 29 Jun 2003 03:57:54 -0000 1.1
+++ ICUBridgeCollationCompareFunctor.hpp 11 Aug 2003 20:31:29 -0000 1.2
@@ -64,7 +64,7 @@
-#include <xalanc/XSLT/StylesheetExecutionContextDefault.hpp>
+#include <xalanc/PlatformSupport/XalanCollationServices.hpp>
@@ -76,13 +76,10 @@
-class XALAN_ICUBRIDGE_EXPORT ICUBridgeCollationCompareFunctor : public StylesheetExecutionContextDefault::CollationCompareFunctor
+class XALAN_ICUBRIDGE_EXPORT ICUBridgeCollationCompareFunctor : public XalanCollationServices::CollationCompareFunctor
{
public:
- typedef StylesheetExecutionContextDefault::eCaseOrder eCaseOrder;
-
-
/**
* Constructor.
*
@@ -95,16 +92,16 @@
virtual int
operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = StylesheetExecutionContextDefault::eDefault) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
virtual int
operator()(
const XalanDOMChar* theLHS,
const XalanDOMChar* theRHS,
const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = StylesheetExecutionContextDefault::eDefault) const;
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
private:
ICUBridgeCollationCompareFunctorImpl* const m_impl;
1.2 +26 -26 xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
Index: ICUBridgeCollationCompareFunctorImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ICUBridgeCollationCompareFunctorImpl.cpp 29 Jun 2003 03:57:54 -0000 1.1
+++ ICUBridgeCollationCompareFunctorImpl.cpp 11 Aug 2003 20:31:29 -0000 1.2
@@ -193,19 +193,19 @@
inline UColAttributeValue
-caseOrderConvert(ICUBridgeCollationCompareFunctorImpl::eCaseOrder theCaseOrder)
+caseOrderConvert(XalanCollationServices::eCaseOrder theCaseOrder)
{
switch(theCaseOrder)
{
- case StylesheetExecutionContext::eLowerFirst:
+ case XalanCollationServices::eLowerFirst:
return UCOL_LOWER_FIRST;
break;
- case StylesheetExecutionContext::eUpperFirst:
+ case XalanCollationServices::eUpperFirst:
return UCOL_UPPER_FIRST;
break;
- case StylesheetExecutionContext::eDefault:
+ case XalanCollationServices::eDefault:
break;
default:
@@ -225,7 +225,7 @@
{
if (isValid() == false)
{
- return s_defaultFunctor(theLHS, theRHS, StylesheetExecutionContext::eDefault);
+ return s_defaultFunctor(theLHS, theRHS, XalanCollationServices::eDefault);
}
else
{
@@ -280,10 +280,10 @@
int
ICUBridgeCollationCompareFunctorImpl::doCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
UErrorCode theStatus = U_ZERO_ERROR;
@@ -309,10 +309,10 @@
int
ICUBridgeCollationCompareFunctorImpl::doCompareCached(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
CollatorType* theCollator = getCachedCollator(theLocale);
@@ -354,10 +354,10 @@
int
ICUBridgeCollationCompareFunctorImpl::doCompare(
- CollatorType& theCollator,
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder) const
+ CollatorType& theCollator,
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
UErrorCode theStatus = U_ZERO_ERROR;
@@ -385,11 +385,11 @@
int
ICUBridgeCollationCompareFunctorImpl::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
- if (theCaseOrder == StylesheetExecutionContext::eDefault)
+ if (theCaseOrder == XalanCollationServices::eDefault)
{
return doDefaultCompare(theLHS, theRHS);
}
@@ -407,12 +407,12 @@
int
ICUBridgeCollationCompareFunctorImpl::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
- if (theCaseOrder == StylesheetExecutionContext::eDefault &&
+ if (theCaseOrder == XalanCollationServices::eDefault &&
XalanDOMString::equals(m_defaultCollatorLocaleName, theLocale) == true)
{
return doDefaultCompare(theLHS, theRHS);
1.2 +20 -23 xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.hpp
Index: ICUBridgeCollationCompareFunctorImpl.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ICUBridgeCollationCompareFunctorImpl.hpp 29 Jun 2003 03:57:54 -0000 1.1
+++ ICUBridgeCollationCompareFunctorImpl.hpp 11 Aug 2003 20:31:29 -0000 1.2
@@ -81,13 +81,10 @@
-class XALAN_ICUBRIDGE_EXPORT ICUBridgeCollationCompareFunctorImpl : public StylesheetExecutionContextDefault::CollationCompareFunctor
+class XALAN_ICUBRIDGE_EXPORT ICUBridgeCollationCompareFunctorImpl : public XalanCollationServices::CollationCompareFunctor
{
public:
- typedef StylesheetExecutionContextDefault::eCaseOrder eCaseOrder;
-
-
/**
* Constructor.
*
@@ -99,16 +96,16 @@
int
operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = StylesheetExecutionContextDefault::eDefault) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
int
operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = StylesheetExecutionContextDefault::eDefault) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
bool
isValid() const
@@ -211,17 +208,17 @@
int
doCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const;
int
doCompareCached(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder) const;
int
doCompare(
@@ -231,10 +228,10 @@
int
doCompare(
- CollatorType& theCollator,
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder) const;
+ CollatorType& theCollator,
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder) const;
CollatorType*
getCachedCollator(const XalanDOMChar* theLocale) const;
1.1 xml-xalan/c/src/xalanc/PlatformSupport/XalanCollationServices.hpp
Index: XalanCollationServices.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#if !defined(XALANCOLLATIONSERVICES_HEADER_GUARD_1357924680)
#define XALANCOLLATIONSERVICES_HEADER_GUARD_1357924680
// Base include file. Must be first.
#include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
#include <xalanc/XalanDOM/XalanDOMString.hpp>
XALAN_CPP_NAMESPACE_BEGIN
class XALAN_PLATFORMSUPPORT_EXPORT XalanCollationServices
{
public:
enum eCaseOrder { eDefault, eLowerFirst, eUpperFirst };
class XALAN_PLATFORMSUPPORT_EXPORT CollationCompareFunctor
{
public:
CollationCompareFunctor()
{
}
virtual
~CollationCompareFunctor()
{
}
// Const version is suitable for use by
// multiple threads.
virtual int
operator()(
const XalanDOMChar* theLHS,
const XalanDOMChar* theRHS,
eCaseOrder theCaseOrder = eDefault) const = 0;
// Const version is suitable for use by
// multiple threads.
virtual int
operator()(
const XalanDOMChar* theLHS,
const XalanDOMChar* theRHS,
const XalanDOMChar* theLocale,
eCaseOrder theCaseOrder = eDefault) const = 0;
};
};
XALAN_CPP_NAMESPACE_END
#endif // XALANCOLLATIONSERVICES_HEADER_GUARD_1357924680
1.4 +3 -3 xml-xalan/c/src/xalanc/XSLT/ElemForEach.cpp
Index: ElemForEach.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemForEach.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ElemForEach.cpp 2 Aug 2003 01:07:48 -0000 1.3
+++ ElemForEach.cpp 11 Aug 2003 20:31:29 -0000 1.4
@@ -354,17 +354,17 @@
avt->evaluate(scratchString, *this, executionContext);
}
- NodeSortKey::eCaseOrder caseOrder = NodeSortKey::eDefault;
+ XalanCollationServices::eCaseOrder caseOrder = XalanCollationServices::eDefault;
if (isEmpty(scratchString) == false)
{
if (equals(scratchString, Constants::ATTRVAL_CASEORDER_UPPER) == true)
{
- caseOrder = NodeSortKey::eUpperFirst;
+ caseOrder = XalanCollationServices::eUpperFirst;
}
else if (equals(scratchString, Constants::ATTRVAL_CASEORDER_LOWER) == true)
{
- caseOrder = NodeSortKey::eLowerFirst;
+ caseOrder = XalanCollationServices::eLowerFirst;
}
else
{
1.3 +8 -8 xml-xalan/c/src/xalanc/XSLT/NodeSortKey.cpp
Index: NodeSortKey.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/NodeSortKey.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NodeSortKey.cpp 9 Jul 2003 23:44:12 -0000 1.2
+++ NodeSortKey.cpp 11 Aug 2003 20:31:29 -0000 1.3
@@ -75,13 +75,13 @@
NodeSortKey::NodeSortKey(
- ExecutionContext& executionContext,
- const XPath* selectPat,
- bool treatAsNumbers,
- bool descending,
- eCaseOrder caseOrder,
- const XalanDOMString& langValue,
- const PrefixResolver& resolver) :
+ ExecutionContext& executionContext,
+ const XPath* selectPat,
+ bool treatAsNumbers,
+ bool descending,
+ XalanCollationServices::eCaseOrder caseOrder,
+ const XalanDOMString& langValue,
+ const PrefixResolver& resolver) :
m_executionContext(&executionContext),
m_selectPat(selectPat),
m_treatAsNumbers(treatAsNumbers),
@@ -99,7 +99,7 @@
m_selectPat(0),
m_treatAsNumbers(false),
m_descending(false),
- m_caseOrder(eDefault),
+ m_caseOrder(XalanCollationServices::eDefault),
m_prefixResolver(0),
m_languageString(&s_emptyString)
{
1.3 +19 -17 xml-xalan/c/src/xalanc/XSLT/NodeSortKey.hpp
Index: NodeSortKey.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/NodeSortKey.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NodeSortKey.hpp 9 Jul 2003 23:44:12 -0000 1.2
+++ NodeSortKey.hpp 11 Aug 2003 20:31:29 -0000 1.3
@@ -79,6 +79,10 @@
+#include <xalanc/PlatformSupport/XalanCollationServices.hpp>
+
+
+
XALAN_CPP_NAMESPACE_BEGIN
@@ -96,8 +100,6 @@
{
public:
- enum eCaseOrder { eDefault, eLowerFirst, eUpperFirst };
-
/**
* Construct a node sort key.
*
@@ -110,13 +112,13 @@
* @param resolver resolver for namespace resolution
*/
NodeSortKey(
- ExecutionContext& executionContext,
- const XPath* selectPat,
- bool treatAsNumbers,
- bool descending,
- eCaseOrder caseOrder,
- const XalanDOMString& langValue,
- const PrefixResolver& resolver);
+ ExecutionContext& executionContext,
+ const XPath* selectPat,
+ bool treatAsNumbers,
+ bool descending,
+ XalanCollationServices::eCaseOrder caseOrder,
+ const XalanDOMString& langValue,
+ const PrefixResolver& resolver);
NodeSortKey();
@@ -165,7 +167,7 @@
*
* @return sort upper case before lower case if true
*/
- eCaseOrder
+ XalanCollationServices::eCaseOrder
getCaseOrder() const
{
return m_caseOrder;
@@ -190,18 +192,18 @@
private:
- ExecutionContext* m_executionContext; // needed for error reporting.
+ ExecutionContext* m_executionContext; // needed for error reporting.
- const XPath* m_selectPat;
+ const XPath* m_selectPat;
- bool m_treatAsNumbers;
- bool m_descending;
+ bool m_treatAsNumbers;
+ bool m_descending;
- eCaseOrder m_caseOrder;
+ XalanCollationServices::eCaseOrder m_caseOrder;
- const PrefixResolver* m_prefixResolver;
+ const PrefixResolver* m_prefixResolver;
- const XalanDOMString* m_languageString;
+ const XalanDOMString* m_languageString;
};
1.3 +7 -33 xml-xalan/c/src/xalanc/XSLT/NodeSorter.cpp
Index: NodeSorter.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/NodeSorter.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NodeSorter.cpp 9 Jul 2003 23:44:12 -0000 1.2
+++ NodeSorter.cpp 11 Aug 2003 20:31:29 -0000 1.3
@@ -170,46 +170,20 @@
-inline StylesheetExecutionContext::eCaseOrder
-caseOrderConvert(NodeSortKey::eCaseOrder theCaseOrder)
-{
- switch(theCaseOrder)
- {
- case NodeSortKey::eLowerFirst:
- return StylesheetExecutionContext::eLowerFirst;
- break;
-
- case NodeSortKey::eUpperFirst:
- return StylesheetExecutionContext::eUpperFirst;
- break;
-
- case NodeSortKey::eDefault:
- break;
-
- default:
- assert(false);
- break;
- }
-
- return StylesheetExecutionContext::eDefault;
-}
-
-
-
static inline int
doCollationCompare(
- StylesheetExecutionContext& executionContext,
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- const XalanDOMString& theLanguage,
- NodeSortKey::eCaseOrder theCaseOrder)
+ StylesheetExecutionContext& executionContext,
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ const XalanDOMString& theLanguage,
+ XalanCollationServices::eCaseOrder theCaseOrder)
{
if (length(theLanguage) == 0)
{
return executionContext.collationCompare(
theLHS,
theRHS,
- caseOrderConvert(theCaseOrder));
+ theCaseOrder);
}
else
{
@@ -217,7 +191,7 @@
theLHS,
theRHS,
theLanguage,
- caseOrderConvert(theCaseOrder));
+ theCaseOrder);
}
}
1.8 +15 -16 xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp
Index: StylesheetExecutionContext.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- StylesheetExecutionContext.hpp 4 Aug 2003 07:04:30 -0000 1.7
+++ StylesheetExecutionContext.hpp 11 Aug 2003 20:31:29 -0000 1.8
@@ -97,6 +97,7 @@
#include <xalanc/PlatformSupport/AttributeListImpl.hpp>
+#include <xalanc/PlatformSupport/XalanCollationServices.hpp>
@@ -1610,8 +1611,6 @@
const NodeRefListBase& nl,
const XPath* xpath) = 0;
- enum eCaseOrder { eDefault, eLowerFirst, eUpperFirst };
-
/**
* Compare two strings using the collation of the
* current locale.
@@ -1623,9 +1622,9 @@
*/
virtual int
collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- eCaseOrder theCaseOrder = eDefault) = 0;
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) = 0;
/**
* Compare two strings using the collation of the
@@ -1639,10 +1638,10 @@
*/
virtual int
collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- const XalanDOMString& theLocale,
- eCaseOrder theCaseOrder = eDefault) = 0;
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ const XalanDOMString& theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) = 0;
/**
* Compare two strings using the collation of the
@@ -1655,9 +1654,9 @@
*/
virtual int
collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = eDefault) = 0;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) = 0;
/**
* Compare two strings using the collation of the
@@ -1671,10 +1670,10 @@
*/
virtual int
collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = eDefault) = 0;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) = 0;
/**
* Determine if a KeyDeclaration is being constructed.
1.8 +21 -33 xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- StylesheetExecutionContextDefault.cpp 4 Aug 2003 06:35:33 -0000 1.7
+++ StylesheetExecutionContextDefault.cpp 11 Aug 2003 20:31:29 -0000 1.8
@@ -1504,9 +1504,9 @@
int
StylesheetExecutionContextDefault::collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- eCaseOrder theCaseOrder)
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder)
{
if (m_collationCompareFunctor == 0)
{
@@ -1522,10 +1522,10 @@
int
StylesheetExecutionContextDefault::collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- const XalanDOMString& theLocale,
- eCaseOrder theCaseOrder)
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ const XalanDOMString& theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder)
{
if (m_collationCompareFunctor == 0)
{
@@ -1541,9 +1541,9 @@
int
StylesheetExecutionContextDefault::collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder)
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder)
{
assert(theLHS != 0 && theRHS != 0);
@@ -1561,10 +1561,10 @@
int
StylesheetExecutionContextDefault::collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder)
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder)
{
assert(theLHS != 0 && theRHS != 0);
@@ -1580,18 +1580,6 @@
-StylesheetExecutionContextDefault::CollationCompareFunctor::CollationCompareFunctor()
-{
-}
-
-
-
-StylesheetExecutionContextDefault::CollationCompareFunctor::~CollationCompareFunctor()
-{
-}
-
-
-
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::DefaultCollationCompareFunctor()
{
}
@@ -1606,9 +1594,9 @@
int
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder /* theCaseOrder */) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder /* theCaseOrder */) const
{
return XALAN_CPP_NAMESPACE :: collationCompare(theLHS, theRHS);
}
@@ -1617,10 +1605,10 @@
int
StylesheetExecutionContextDefault::DefaultCollationCompareFunctor::operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* /* theLocale */,
- eCaseOrder theCaseOrder) const
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* /* theLocale */,
+ XalanCollationServices::eCaseOrder theCaseOrder) const
{
return (*this)(theLHS, theRHS, theCaseOrder);
}
1.7 +22 -47 xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
Index: StylesheetExecutionContextDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StylesheetExecutionContextDefault.hpp 4 Aug 2003 06:35:33 -0000 1.6
+++ StylesheetExecutionContextDefault.hpp 11 Aug 2003 20:31:29 -0000 1.7
@@ -716,56 +716,31 @@
virtual int
collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- eCaseOrder theCaseOrder = eDefault);
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault);
virtual int
collationCompare(
- const XalanDOMString& theLHS,
- const XalanDOMString& theRHS,
- const XalanDOMString& theLocale,
- eCaseOrder theCaseOrder = eDefault);
+ const XalanDOMString& theLHS,
+ const XalanDOMString& theRHS,
+ const XalanDOMString& theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault);
virtual int
collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = eDefault);
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault);
virtual int
collationCompare(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = eDefault);
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault);
- class XALAN_XSLT_EXPORT CollationCompareFunctor
- {
- public:
-
- CollationCompareFunctor();
-
- virtual
- ~CollationCompareFunctor();
-
- // Const version is suitable for use by
- // multiple threads.
- virtual int
- operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = eDefault) const = 0;
-
- // Const version is suitable for use by
- // multiple threads.
- virtual int
- operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = eDefault) const = 0;
- };
+ typedef XalanCollationServices::CollationCompareFunctor CollationCompareFunctor;
class XALAN_XSLT_EXPORT DefaultCollationCompareFunctor : public CollationCompareFunctor
{
@@ -778,16 +753,16 @@
virtual int
operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- eCaseOrder theCaseOrder = eDefault) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
virtual int
operator()(
- const XalanDOMChar* theLHS,
- const XalanDOMChar* theRHS,
- const XalanDOMChar* theLocale,
- eCaseOrder theCaseOrder = eDefault) const;
+ const XalanDOMChar* theLHS,
+ const XalanDOMChar* theRHS,
+ const XalanDOMChar* theLocale,
+ XalanCollationServices::eCaseOrder theCaseOrder = XalanCollationServices::eDefault) const;
};
const CollationCompareFunctor*
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org