dbertoni 00/05/12 09:23:25
Modified: c/src/XPath XPathProcessorImpl.cpp
Log:
Fixed bug where whitespace strings were being added as tokens.
Revision Changes Path
1.10 +8 -5 xml-xalan/c/src/XPath/XPathProcessorImpl.cpp
Index: XPathProcessorImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathProcessorImpl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XPathProcessorImpl.cpp 2000/05/03 21:21:16 1.9
+++ XPathProcessorImpl.cpp 2000/05/12 16:23:24 1.10
@@ -255,7 +255,7 @@
startSubstring = i;
- for(i++; i < nChars && (c = charAt(pat, i)) !=
'\"'; i++);
+ for(++i; i < nChars && (c = charAt(pat, i)) !=
'\"'; ++i);
if(c == '\"')
{
@@ -289,7 +289,7 @@
startSubstring = i;
- for(i++; i < nChars && (c = charAt(pat, i)) !=
'\''; i++);
+ for(++i; i < nChars && (c = charAt(pat, i)) !=
'\''; ++i);
if(c == '\'')
{
@@ -336,7 +336,7 @@
{
if('-' == c)
{
- if(!(isNum || (startSubstring == -1)))
+ if(!(isNum || startSubstring == -1))
{
break;
}
@@ -418,11 +418,14 @@
case ':':
{
- if(posOfNSSep == (i - 1))
+ if(posOfNSSep == i - 1)
{
if(startSubstring != -1)
{
- addToTokenQueue(substring(pat,
startSubstring, i - 1));
+ if (startSubstring < i - 1)
+ {
+
addToTokenQueue(substring(pat, startSubstring, i - 1));
+ }
}
isNum = false;