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...@locus.apache.org on 2000/02/18 23:19:26 UTC
cvs commit: xml-xalan/c/src/XPath Function.hpp FunctionBoolean.hpp FunctionCeiling.hpp FunctionConcat.hpp FunctionContains.hpp FunctionCount.hpp FunctionDefaultStringArgument.hpp FunctionDoc.hpp FunctionFalse.hpp FunctionFloor.hpp FunctionID.hpp FunctionLang.hpp FunctionLast.hpp FunctionLocalName.hpp FunctionName.hpp FunctionNamespaceURI.hpp FunctionNormalize.hpp FunctionNot.hpp FunctionNumber.hpp FunctionPosition.hpp FunctionRound.hpp FunctionStartsWith.hpp FunctionString.hpp FunctionStringLength.hpp FunctionSubstring.hpp FunctionSubstringAfter.hpp FunctionSubstringBefore.hpp FunctionSum.hpp FunctionTranslate.hpp FunctionTrue.hpp NodeRefList.cpp NodeRefList.hpp QName.hpp SimpleNodeLocator.cpp SimpleNodeLocator.hpp XLocator.hpp
dbertoni 00/02/18 14:19:26
Modified: c/src/XPath Function.hpp FunctionBoolean.hpp
FunctionCeiling.hpp FunctionConcat.hpp
FunctionContains.hpp FunctionCount.hpp
FunctionDefaultStringArgument.hpp FunctionDoc.hpp
FunctionFalse.hpp FunctionFloor.hpp FunctionID.hpp
FunctionLang.hpp FunctionLast.hpp
FunctionLocalName.hpp FunctionName.hpp
FunctionNamespaceURI.hpp FunctionNormalize.hpp
FunctionNot.hpp FunctionNumber.hpp
FunctionPosition.hpp FunctionRound.hpp
FunctionStartsWith.hpp FunctionString.hpp
FunctionStringLength.hpp FunctionSubstring.hpp
FunctionSubstringAfter.hpp
FunctionSubstringBefore.hpp FunctionSum.hpp
FunctionTranslate.hpp FunctionTrue.hpp
NodeRefList.cpp NodeRefList.hpp QName.hpp
SimpleNodeLocator.cpp SimpleNodeLocator.hpp
XLocator.hpp
Log:
Added #ifdefs for compilers that don't support namespaces.
Revision Changes Path
1.2 +7 -1 xml-xalan/c/src/XPath/Function.hpp
Index: Function.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/Function.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Function.hpp 1999/12/18 19:47:54 1.1
+++ Function.hpp 2000/02/18 22:19:21 1.2
@@ -88,6 +88,12 @@
{
}
+#if defined(XALAN_NO_NAMESPACES)
+ typedef vector<XObject*> XObjectArgVectorType;
+#else
+ typedef std::vector<XObject*> XObjectArgVectorType;
+#endif
+
/**
* Execute an XPath function object. The function must return
* a valid object.
@@ -102,7 +108,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int opPos,
- const std::vector<XObject*>& args) = 0;
+ const XObjectArgVectorType& args) = 0;
virtual Function*
clone() const = 0;
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionBoolean.hpp
Index: FunctionBoolean.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionBoolean.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionBoolean.hpp 1999/12/18 19:47:54 1.1
+++ FunctionBoolean.hpp 2000/02/18 22:19:21 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 1)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionCeiling.hpp
Index: FunctionCeiling.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionCeiling.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionCeiling.hpp 1999/12/18 19:47:54 1.1
+++ FunctionCeiling.hpp 2000/02/18 22:19:21 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
1.2 +3 -3 xml-xalan/c/src/XPath/FunctionConcat.hpp
Index: FunctionConcat.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionConcat.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionConcat.hpp 1999/12/18 19:47:54 1.1
+++ FunctionConcat.hpp 2000/02/18 22:19:21 1.2
@@ -106,9 +106,9 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
- const std::vector<XObject*>::size_type theArgCount = args.size();
+ const XObjectArgVectorType::size_type theArgCount = args.size();
if (theArgCount < 2)
{
@@ -118,7 +118,7 @@
DOMString theResult;
- for(std::vector<XObject*>::size_type i = 0; i < theArgCount; i++)
+ for(XObjectArgVectorType::size_type i = 0; i < theArgCount; i++)
{
theResult += args[i]->str();
}
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionContains.hpp
Index: FunctionContains.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionContains.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionContains.hpp 1999/12/18 19:47:54 1.1
+++ FunctionContains.hpp 2000/02/18 22:19:21 1.2
@@ -106,7 +106,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 2)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionCount.hpp
Index: FunctionCount.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionCount.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionCount.hpp 1999/12/18 19:47:54 1.1
+++ FunctionCount.hpp 2000/02/18 22:19:21 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 1)
{
1.2 +3 -3 xml-xalan/c/src/XPath/FunctionDefaultStringArgument.hpp
Index: FunctionDefaultStringArgument.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionDefaultStringArgument.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionDefaultStringArgument.hpp 1999/12/18 19:47:54 1.1
+++ FunctionDefaultStringArgument.hpp 2000/02/18 22:19:21 1.2
@@ -101,8 +101,8 @@
execute(
XPathExecutionContext& executionContext,
const DOM_Node& context,
- int /* opPos */,
- const std::vector<XObject*>& args) = 0;
+ int opPos,
+ const XObjectArgVectorType& args) = 0;
virtual Function*
clone() const = 0;
@@ -125,7 +125,7 @@
// once we've converted the context node to an XObject.
// A vector for the args. The size will always be one.
- std::vector<XObject*> theNewArgs(1);
+ XObjectArgVectorType theNewArgs(1);
// A node set that contains the context node.
FactoryObjectAutoPointer<XObject> theArg(&executionContext.getXObjectFactory(),
1.2 +4 -3 xml-xalan/c/src/XPath/FunctionDoc.hpp
Index: FunctionDoc.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionDoc.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionDoc.hpp 1999/12/18 19:47:54 1.1
+++ FunctionDoc.hpp 2000/02/18 22:19:21 1.2
@@ -105,10 +105,11 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
- executionContext.error("Document() function implementation has been replaced by xslt/FunctionDocument!",
- context);
+ executionContext.error("Document() function implementation has been replaced by xslt/FunctionDocument!",
+ context);
+
return executionContext.getXObjectFactory().createNull();
}
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionFalse.hpp
Index: FunctionFalse.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionFalse.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionFalse.hpp 1999/12/18 19:47:54 1.1
+++ FunctionFalse.hpp 2000/02/18 22:19:22 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() > 0)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionFloor.hpp
Index: FunctionFloor.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionFloor.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionFloor.hpp 1999/12/18 19:47:54 1.1
+++ FunctionFloor.hpp 2000/02/18 22:19:22 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
1.3 +10 -4 xml-xalan/c/src/XPath/FunctionID.hpp
Index: FunctionID.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionID.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FunctionID.hpp 2000/02/17 20:29:50 1.2
+++ FunctionID.hpp 2000/02/18 22:19:22 1.3
@@ -126,7 +126,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
@@ -148,7 +148,7 @@
context.getOwnerDocument();
// This list will hold the nodes we find.
- MutableNodeRefList theNodeList;
+ MutableNodeRefList theNodeList(executionContext.createMutableNodeRefList());
// If there is no context, we cannot continue.
if(0 == theDocContext)
@@ -158,9 +158,15 @@
}
else if (length(m_resultString) > 0)
{
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::set;
+#endif
+
+ typedef set<DOMString> TokenSetType;
+
// This set will hold tokens that we've previously found, so
// we can avoid looking more than once.
- std::set<DOMString> thePreviousTokens;
+ TokenSetType thePreviousTokens;
StringTokenizer theTokenizer(m_resultString);
@@ -172,7 +178,7 @@
if (length(theToken) > 0)
{
// See if we've already seen this one...
- std::set<DOMString>::const_iterator i =
+ TokenSetType::const_iterator i =
thePreviousTokens.find(theToken);
if (i != thePreviousTokens.end())
1.2 +2 -2 xml-xalan/c/src/XPath/FunctionLang.hpp
Index: FunctionLang.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionLang.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionLang.hpp 1999/12/18 19:47:54 1.1
+++ FunctionLang.hpp 2000/02/18 22:19:22 1.2
@@ -110,7 +110,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
@@ -137,7 +137,7 @@
{
if(startsWith(toLowerCase(langVal), toLowerCase(lang)))
{
- int valLen = lang.length();
+ const unsigned int valLen = length(lang);
if(length(langVal) == valLen ||
charAt(langVal, valLen) == '-')
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionLast.hpp
Index: FunctionLast.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionLast.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionLast.hpp 1999/12/18 19:47:54 1.1
+++ FunctionLast.hpp 2000/02/18 22:19:22 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 0)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionLocalName.hpp
Index: FunctionLocalName.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionLocalName.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionLocalName.hpp 1999/12/18 19:47:54 1.1
+++ FunctionLocalName.hpp 2000/02/18 22:19:22 1.2
@@ -107,7 +107,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 1)
{
1.2 +2 -2 xml-xalan/c/src/XPath/FunctionName.hpp
Index: FunctionName.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionName.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionName.hpp 1999/12/18 19:47:54 1.1
+++ FunctionName.hpp 2000/02/18 22:19:22 1.2
@@ -113,9 +113,9 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
- const std::vector<XObject*>::size_type theSize = args.size();
+ const XObjectArgVectorType::size_type theSize = args.size();
DOMString theResult;
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionNamespaceURI.hpp
Index: FunctionNamespaceURI.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionNamespaceURI.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionNamespaceURI.hpp 1999/12/18 19:47:54 1.1
+++ FunctionNamespaceURI.hpp 2000/02/18 22:19:22 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
DOMString theNamespace;
1.2 +6 -2 xml-xalan/c/src/XPath/FunctionNormalize.hpp
Index: FunctionNormalize.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionNormalize.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionNormalize.hpp 1999/12/18 19:47:54 1.1
+++ FunctionNormalize.hpp 2000/02/18 22:19:22 1.2
@@ -101,7 +101,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int opPos,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
DOMString theSourceString;
@@ -127,7 +127,11 @@
// A vector to contain the new characters. We'll use it to construct
// the result string.
- std::vector<XMLCh> theVector;
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
+
+ vector<XMLCh> theVector;
// The result string can only be as large as the source string, so
// just reserve the space now. Also reserve a space for the
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionNot.hpp
Index: FunctionNot.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionNot.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionNot.hpp 1999/12/18 19:47:54 1.1
+++ FunctionNot.hpp 2000/02/18 22:19:22 1.2
@@ -106,7 +106,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 1)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionNumber.hpp
Index: FunctionNumber.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionNumber.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionNumber.hpp 1999/12/18 19:47:54 1.1
+++ FunctionNumber.hpp 2000/02/18 22:19:22 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
double theValue = 0.0L;
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionPosition.hpp
Index: FunctionPosition.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionPosition.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionPosition.hpp 1999/12/18 19:47:54 1.1
+++ FunctionPosition.hpp 2000/02/18 22:19:22 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 0)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionRound.hpp
Index: FunctionRound.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionRound.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionRound.hpp 1999/12/18 19:47:54 1.1
+++ FunctionRound.hpp 2000/02/18 22:19:22 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionStartsWith.hpp
Index: FunctionStartsWith.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionStartsWith.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionStartsWith.hpp 1999/12/18 19:47:54 1.1
+++ FunctionStartsWith.hpp 2000/02/18 22:19:22 1.2
@@ -106,7 +106,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 2)
{
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionString.hpp
Index: FunctionString.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionString.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionString.hpp 1999/12/18 19:47:54 1.1
+++ FunctionString.hpp 2000/02/18 22:19:22 1.2
@@ -106,7 +106,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() != 1)
{
1.2 +2 -2 xml-xalan/c/src/XPath/FunctionStringLength.hpp
Index: FunctionStringLength.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionStringLength.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionStringLength.hpp 1999/12/18 19:47:54 1.1
+++ FunctionStringLength.hpp 2000/02/18 22:19:22 1.2
@@ -103,9 +103,9 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int opPos,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
- const std::vector<XObject*>::size_type theSize = args.size();
+ const XObjectArgVectorType::size_type theSize = args.size();
DOMString theResult;
1.2 +7 -3 xml-xalan/c/src/XPath/FunctionSubstring.hpp
Index: FunctionSubstring.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstring.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionSubstring.hpp 1999/12/18 19:47:54 1.1
+++ FunctionSubstring.hpp 2000/02/18 22:19:23 1.2
@@ -106,9 +106,9 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
- const std::vector<XObject*>::size_type theArgCount =
+ const XObjectArgVectorType::size_type theArgCount =
args.size();
if (theArgCount < 2 || theArgCount > 3)
@@ -120,8 +120,12 @@
const DOMString theSourceString = args[0]->str();
const int theSourceStringLength = length(theSourceString);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
+
// This buffer will hold the output characters.
- std::vector<XMLCh> theBuffer;
+ vector<XMLCh> theBuffer;
if (theSourceStringLength > 0)
{
1.2 +6 -2 xml-xalan/c/src/XPath/FunctionSubstringAfter.hpp
Index: FunctionSubstringAfter.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstringAfter.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionSubstringAfter.hpp 1999/12/18 19:47:54 1.1
+++ FunctionSubstringAfter.hpp 2000/02/18 22:19:23 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 2)
{
@@ -116,8 +116,12 @@
const int theIndex = indexOf(theFirstString,
theSecondString);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
+
// This buffer will hold the output characters.
- std::vector<XMLCh> theBuffer;
+ vector<XMLCh> theBuffer;
if (theIndex != -1)
{
1.2 +6 -2 xml-xalan/c/src/XPath/FunctionSubstringBefore.hpp
Index: FunctionSubstringBefore.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstringBefore.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionSubstringBefore.hpp 1999/12/18 19:47:54 1.1
+++ FunctionSubstringBefore.hpp 2000/02/18 22:19:23 1.2
@@ -103,7 +103,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 2)
{
@@ -117,8 +117,12 @@
const int theIndex = indexOf(theFirstString,
theSecondString);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
+
// This buffer will hold the output characters.
- std::vector<XMLCh> theBuffer;
+ vector<XMLCh> theBuffer;
if (theIndex != -1)
{
1.3 +1 -1 xml-xalan/c/src/XPath/FunctionSum.hpp
Index: FunctionSum.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSum.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FunctionSum.hpp 2000/02/17 20:29:51 1.2
+++ FunctionSum.hpp 2000/02/18 22:19:23 1.3
@@ -107,7 +107,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 1)
{
1.2 +6 -2 xml-xalan/c/src/XPath/FunctionTranslate.hpp
Index: FunctionTranslate.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionTranslate.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionTranslate.hpp 1999/12/18 19:47:54 1.1
+++ FunctionTranslate.hpp 2000/02/18 22:19:23 1.2
@@ -106,7 +106,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if (args.size() != 3)
{
@@ -121,9 +121,13 @@
const int theFirstStringLength = length(theFirstString);
const int theThirdStringLength = length(theThirdString);
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
+
// A vector to contain the new characters. We'll use it to construct
// the result string.
- std::vector<XMLCh> theVector;
+ vector<XMLCh> theVector;
// The result string can only be as large as the first string, so
// just reserve the space now. Also reserve space for the
1.2 +1 -1 xml-xalan/c/src/XPath/FunctionTrue.hpp
Index: FunctionTrue.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionTrue.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FunctionTrue.hpp 1999/12/18 19:47:54 1.1
+++ FunctionTrue.hpp 2000/02/18 22:19:23 1.2
@@ -102,7 +102,7 @@
XPathExecutionContext& executionContext,
const DOM_Node& context,
int /* opPos */,
- const std::vector<XObject*>& args)
+ const XObjectArgVectorType& args)
{
if(args.size() > 0)
{
1.4 +3 -2 xml-xalan/c/src/XPath/NodeRefList.cpp
Index: NodeRefList.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/NodeRefList.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NodeRefList.cpp 2000/02/17 20:29:51 1.3
+++ NodeRefList.cpp 2000/02/18 22:19:23 1.4
@@ -162,11 +162,12 @@
unsigned int
NodeRefList::indexOf(const DOM_Node& theNode) const
{
- using std::vector;
+#if !defined(XALAN_NO_NAMESPACES)
using std::find;
+#endif
// Look for the node in the list.
- std::vector<DOM_Node>::const_iterator i =
+ NodeListVectorType::const_iterator i =
find(m_nodeList.begin(),
m_nodeList.end(),
theNode);
1.4 +7 -1 xml-xalan/c/src/XPath/NodeRefList.hpp
Index: NodeRefList.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/NodeRefList.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NodeRefList.hpp 2000/02/17 20:29:51 1.3
+++ NodeRefList.hpp 2000/02/18 22:19:23 1.4
@@ -122,7 +122,13 @@
protected:
- std::vector<DOM_Node> m_nodeList;
+#if defined(XALAN_NO_NAMESPACES)
+ typedef vector<DOM_Node> NodeListVectorType;
+#else
+ typedef std::vector<DOM_Node> NodeListVectorType;
+#endif
+
+ NodeListVectorType m_nodeList;
};
1.5 +7 -2 xml-xalan/c/src/XPath/QName.hpp
Index: QName.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/QName.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- QName.hpp 2000/02/17 20:29:52 1.4
+++ QName.hpp 2000/02/18 22:19:23 1.5
@@ -107,8 +107,13 @@
const DOMString& theNamespace = DOMString(),
const DOMString& theLocalPart = DOMString());
- typedef std::vector<NameSpace> NamespaceVectorType;
- typedef std::vector<NamespaceVectorType> NamespacesStackType;
+#if defined(XALAN_NO_NAMESPACES)
+ typedef vector<NameSpace> NamespaceVectorType;
+ typedef vector<NamespaceVectorType> NamespacesStackType;
+#else
+ typedef std::vector<NameSpace> NamespaceVectorType;
+ typedef std::vector<NamespaceVectorType> NamespacesStackType;
+#endif
/**
* Construct a QName from a string, resolving the prefix
1.4 +19 -10 xml-xalan/c/src/XPath/SimpleNodeLocator.cpp
Index: SimpleNodeLocator.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/SimpleNodeLocator.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleNodeLocator.cpp 2000/01/28 14:50:46 1.3
+++ SimpleNodeLocator.cpp 2000/02/18 22:19:23 1.4
@@ -105,11 +105,11 @@
XObject*
SimpleNodeLocator::connectToNodes(
- const XPath& xpath,
- XPathExecutionContext& executionContext,
- const DOM_Node& /* context */,
- int opPos,
- std::vector<XObject*> connectArgs)
+ const XPath& xpath,
+ XPathExecutionContext& executionContext,
+ const DOM_Node& /* context */,
+ int opPos,
+ const ConnectArgsVectorType& connectArgs)
{
assert(connectArgs.size() > 0 && connectArgs.size() < 3);
@@ -126,12 +126,16 @@
const DOMString filterSpec = connectArgs.size() > 1 ? connectArgs[0]->str() : "";
const int filterSpecLength = length(filterSpec);
+
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::vector;
+#endif
- DirectoryEnumeratorFunctor<std::vector<DOMString> > theEnumerator;
+ DirectoryEnumeratorFunctor<vector<DOMString> > theEnumerator;
- const std::vector<DOMString> theFiles = theEnumerator(theFileSpec);
+ const vector<DOMString> theFiles = theEnumerator(theFileSpec);
- const int nFiles = theFiles.size();
+ const int nFiles = theFiles.size();
if (nFiles > 0)
{
@@ -1623,9 +1627,14 @@
const int theLength = subQueryResults.getLength();
+#if defined(XALAN_NO_NAMESPACES)
+ typedef vector<int> FailedEntriesVectorType;
+#else
+ typedef std::vector<int> FailedEntriesVectorType;
+#endif
// We'll accumulate the entries that we want to remove
// here, then remove them all at once.
- std::vector<int> theFailedEntries;
+ FailedEntriesVectorType theFailedEntries;
// Might as well reserve some space now, although it's
// probably bad to reserve the entire size of the
@@ -1652,7 +1661,7 @@
// Erase from the back to the front, to preserve the validity
// of the indesing, and so that we don't end up moving entries
// that we would already be erasing...
- std::vector<int>::reverse_iterator theIterator =
+ FailedEntriesVectorType::reverse_iterator theIterator =
theFailedEntries.rbegin();
while(theIterator != theFailedEntries.rend())
1.4 +5 -5 xml-xalan/c/src/XPath/SimpleNodeLocator.hpp
Index: SimpleNodeLocator.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/SimpleNodeLocator.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleNodeLocator.hpp 2000/02/17 20:29:52 1.3
+++ SimpleNodeLocator.hpp 2000/02/18 22:19:23 1.4
@@ -99,11 +99,11 @@
virtual XObject*
connectToNodes(
- const XPath& xpath,
- XPathExecutionContext& executionContext,
- const DOM_Node& context,
- int opPos,
- std::vector<XObject*> connectArgs);
+ const XPath& xpath,
+ XPathExecutionContext& executionContext,
+ const DOM_Node& context,
+ int opPos,
+ const ConnectArgsVectorType& connectArgs);
/**
* Execute a location path. Normally, this method simply
1.3 +11 -5 xml-xalan/c/src/XPath/XLocator.hpp
Index: XLocator.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XLocator.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XLocator.hpp 2000/01/24 20:36:02 1.2
+++ XLocator.hpp 2000/02/18 22:19:23 1.3
@@ -85,13 +85,19 @@
virtual
~XLocator();
+#if defined(XALAN_NO_NAMESPACES)
+ typedef vector<XObject*> ConnectArgsVectorType;
+#else
+ typedef std::vector<XObject*> ConnectArgsVectorType;
+#endif
+
virtual XObject*
connectToNodes(
- const XPath& xpath,
- XPathExecutionContext& executionContext,
- const DOM_Node& context,
- int opPos,
- std::vector<XObject*> connectArgs) = 0;
+ const XPath& xpath,
+ XPathExecutionContext& executionContext,
+ const DOM_Node& context,
+ int opPos,
+ const ConnectArgsVectorType& connectArgs) = 0;
/**
* Execute a location path. Normally, this method simply