santiagopg 02/05/17 09:54:56
Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
Log:
Fix bug in Attr iterator.
Revision Changes Path
1.73 +7 -2 xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
Index: DOMImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- DOMImpl.java 11 May 2002 22:06:30 -0000 1.72
+++ DOMImpl.java 17 May 2002 16:54:55 -0000 1.73
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: DOMImpl.java,v 1.72 2002/05/11 22:06:30 santiagopg Exp $
+ * @(#)$Id: DOMImpl.java,v 1.73 2002/05/17 16:54:55 santiagopg Exp $
*
* The Apache Software License, Version 1.1
*
@@ -1008,9 +1008,14 @@
_nodeType = nodeType;
}
- // assumes caller will pass element nodes
public NodeIterator setStartNode(int node) {
if (_isRestartable) {
+ // If not an element node, then set iterator at END
+ if (!isElement(node)) {
+ _attribute = END;
+ return resetPosition();
+ }
+
for (node = _lengthOrAttr[_startNode = node];
node != NULL && _type[node] != _nodeType;
node = _nextSibling[node]);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]