diff --git a/content/xslt/src/xpath/txExprLexer.cpp b/content/xslt/src/xpath/txExprLexer.cpp
index 6de4600a3a3d..229ce6cf65a1 100644
--- a/content/xslt/src/xpath/txExprLexer.cpp
+++ b/content/xslt/src/xpath/txExprLexer.cpp
@@ -25,13 +25,17 @@
* Bob Miller, Oblix Inc., kbob@oblix.com
* -- fixed bug with single quotes inside double quotes
*
- * $Id: txExprLexer.cpp,v 1.1 2005/11/02 07:33:40 kvisco%ziplink.net Exp $
+ * Marina Mechtcheriakova, mmarina@mindspring.com
+ * -- Fixed bug in parse method so that we make sure we check for
+ * axis identifier wild cards, such as ancestor::*
+ *
+ * $Id: txExprLexer.cpp,v 1.2 2005/11/02 07:33:41 kvisco%ziplink.net Exp $
*/
/**
* Lexical analyzer for XPath expressions
* @author Keith Visco
- * @version $Revision: 1.1 $ $Date: 2005/11/02 07:33:40 $
+ * @version $Revision: 1.2 $ $Date: 2005/11/02 07:33:41 $
**/
#include
@@ -640,6 +644,10 @@ void ExprLexer::parse(const String& pattern) {
case ASTERIX:
matchToken(tokenBuffer, ch);
switch ( prevToken->type ) {
+ //-- Fix: make sure check for axis identifier wild cards, such as
+ //-- ancestor::* - Marina M.
+ case Token::AXIS_IDENTIFIER :
+ //-- End Fix
case Token::PARENT_OP :
case Token::ANCESTOR_OP:
case Token::AT_SIGN :
diff --git a/content/xslt/src/xpath/txExprParser.cpp b/content/xslt/src/xpath/txExprParser.cpp
index 0c46172e7e3a..100a95623a15 100644
--- a/content/xslt/src/xpath/txExprParser.cpp
+++ b/content/xslt/src/xpath/txExprParser.cpp
@@ -21,10 +21,12 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
* Olivier Gerardin, ogerardin@vo.lu
- * -- fixed a bug in CreateExpr (@xxx=/yyy was parsed as
- * @xxx=@xxx/yyy)
+ * -- fixed a bug in CreateExpr (@xxx=/yyy was parsed as @xxx=@xxx/yyy)
+ * Marina Mechtcheriakova
+ * -- fixed bug in ::parsePredicates,
+ * made sure we continue looking for more predicates.
*
- * $Id: txExprParser.cpp,v 1.1 2005/11/02 07:33:25 kvisco%ziplink.net Exp $
+ * $Id: txExprParser.cpp,v 1.2 2005/11/02 07:33:26 kvisco%ziplink.net Exp $
*/
/**
@@ -32,7 +34,7 @@
* This class is used to parse XSL Expressions
* @author Keith Visco
* @see ExprLexer
- * @version $Revision: 1.1 $ $Date: 2005/11/02 07:33:25 $
+ * @version $Revision: 1.2 $ $Date: 2005/11/02 07:33:26 $
**/
#include "ExprParser.h"
@@ -811,8 +813,19 @@ String* ExprParser::parsePredicates(PredicateList* predicateList, ExprLexer& lex
}
if ( tok->type == Token::R_BRACKET) {
lexer.nextToken(); //-- eat ']'
- break;
+
+
+ //-- Fix: look ahead at next token for mulitple predicates - Marina M.
+ tok = lexer.peek();
+ if ((!tok) || ( tok->type != Token::L_BRACKET )) break;
+ //-- /Fix
}
+
+ //-- Fix: handle multiple predicates - Marina M.
+ if (tok->type == Token::L_BRACKET)
+ lexer.nextToken(); //-- swallow '['
+ //-- /Fix
+
Expr* expr = createExpr(lexer);
predicateList->add(expr);
}