*** src/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java 2002-12-30 13:03:46.000000000 +0100 --- diff/DTMDefaultBaseTraversers.java 2002-12-30 12:52:09.000000000 +0100 *************** public abstract class DTMDefaultBaseTrav *** 717,728 **** { int type = _type(current); // may call nextNode() ! if (!isDescendant(subtreeRootIdent, current)) { return NULL; ! } ! if (ATTRIBUTE_NODE != type && NAMESPACE_NODE != type) { ! return makeNodeHandle(current); // make handle. ! } } } --- 717,729 ---- { int type = _type(current); // may call nextNode() ! if (!isDescendant(subtreeRootIdent, current)) return NULL; ! ! if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type) ! continue; ! ! return makeNodeHandle(current); // make handle. } } *************** public abstract class DTMDefaultBaseTrav *** 755,763 **** if (!isDescendant(subtreeRootIdent, current)) return NULL; ! if (exptype == expandedTypeID) { ! return makeNodeHandle(current); // make handle. ! } } } } --- 756,765 ---- if (!isDescendant(subtreeRootIdent, current)) return NULL; ! if (exptype != expandedTypeID) ! continue; ! ! return makeNodeHandle(current); // make handle. } } } *************** public abstract class DTMDefaultBaseTrav *** 815,821 **** int subtreeRootIdent = makeNodeIdentity(context); ! for (current = makeNodeIdentity(current) + 1; ; ) { // Trickological code: _exptype() has the side-effect of // running nextNode until the specified node has been loaded, --- 817,823 ---- int subtreeRootIdent = makeNodeIdentity(context); ! for (current = makeNodeIdentity(current) + 1; ; current++) { // Trickological code: _exptype() has the side-effect of // running nextNode until the specified node has been loaded, *************** public abstract class DTMDefaultBaseTrav *** 943,954 **** // %REVIEW% Are we using handles or indexes? int type = _type(current); // may call nextNode() ! if (NULL == type) { return NULL; ! } ! if (ATTRIBUTE_NODE != type && NAMESPACE_NODE != type) { ! return makeNodeHandle(current); // make handle. ! } } } --- 945,957 ---- // %REVIEW% Are we using handles or indexes? int type = _type(current); // may call nextNode() ! if (NULL == type) return NULL; ! ! if (ATTRIBUTE_NODE == type || NAMESPACE_NODE == type) ! continue; ! ! return makeNodeHandle(current); // make handle. } } *************** public abstract class DTMDefaultBaseTrav *** 1513,1519 **** // Compute in ID space int subtreeRootIdent = makeNodeIdentity(context); ! for (current = makeNodeIdentity(current) + 1; ; ) { // Kluge test: Just make sure +1 yielded a real node int type = _type(current); // may call nextNode() --- 1516,1522 ---- // Compute in ID space int subtreeRootIdent = makeNodeIdentity(context); ! for (current = makeNodeIdentity(current) + 1; ; current++) { // Kluge test: Just make sure +1 yielded a real node int type = _type(current); // may call nextNode() *************** public abstract class DTMDefaultBaseTrav *** 1546,1554 **** if (exptype == NULL) return NULL; ! if (exptype == expandedTypeID) { ! return makeNodeHandle(current); // make handle. ! } } } } --- 1549,1558 ---- if (exptype == NULL) return NULL; ! if (exptype != expandedTypeID) ! continue; ! ! return makeNodeHandle(current); // make handle. } } }