sboag 01/01/04 00:02:51
Modified: java/src/org/apache/xpath/axes WalkerFactory.java
Log:
Fix bug where ChildTestIterator was being created for "node()"
patterns, instead of ChildIterator.
Revision Changes Path
1.12 +5 -2
xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java
Index: WalkerFactory.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WalkerFactory.java 2000/12/27 22:24:11 1.11
+++ WalkerFactory.java 2001/01/04 08:02:51 1.12
@@ -178,7 +178,6 @@
Compiler compiler, int opPos)
throws javax.xml.transform.TransformerException
{
-
int firstStepPos = compiler.getFirstChildPos(opPos);
int analysis = analyze(compiler, firstStepPos, 0);
@@ -186,8 +185,12 @@
// Is the iteration exactly one child step?
if ((BIT_CHILD | 0x00000001) == (analysis & (BIT_CHILD | BITS_COUNT)))
{
+ // BIT_NODETEST_ANY: 1000000000000000000000000000000
+ // BIT_PREDICATE: 1000000000000
+ // new iterator: ChildIterator: 1000000000000010000000000000001,
node()
// Does the pattern specify *any* child with no predicate? (i.e.
select="child::node()".
- if (BIT_CHILD == (analysis & BIT_NODETEST_ANY) && !(BIT_PREDICATE ==
(analysis & BIT_PREDICATE)))
+ if ((BIT_NODETEST_ANY == (analysis & BIT_NODETEST_ANY)) &&
+ !(BIT_PREDICATE == (analysis & BIT_PREDICATE)))
{
if (DEBUG_ITERATOR_CREATION)
System.out.println("new iterator: ChildIterator: "