You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2002/06/21 20:00:11 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
santiagopg 2002/06/21 11:00:11
Modified: java/src/org/apache/xalan/xsltc/dom MultiDOM.java
Log:
Fix for Bugzilla 9068.
Revision Changes Path
1.19 +16 -17 xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java
Index: MultiDOM.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/MultiDOM.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- MultiDOM.java 21 Jun 2002 15:36:01 -0000 1.18
+++ MultiDOM.java 21 Jun 2002 18:00:10 -0000 1.19
@@ -89,12 +89,11 @@
private Hashtable _documents = new Hashtable();
private final class AxisIterator implements NodeIterator {
- // constitutive data
private final int _axis;
private final int _type;
- // implementation mechanism
- private NodeIterator _source;
+
private int _mask;
+ private NodeIterator _source = null;
public AxisIterator(final int axis, final int type) {
_axis = axis;
@@ -116,16 +115,19 @@
_mask = node & SET;
int dom = node >>> 24;
- // consider caching these
- if (_type == NO_TYPE) {
- _source = _adapters[dom].getAxisIterator(_axis);
- }
- else if (_axis == Axis.CHILD && _type != ELEMENT) {
- _source = _adapters[dom].getTypedChildren(_type);
- }
- else {
- _source = _adapters[dom].getTypedAxisIterator(_axis, _type);
+ // Get a new source for the first time only
+ if (_source == null) {
+ if (_type == NO_TYPE) {
+ _source = _adapters[dom].getAxisIterator(_axis);
+ }
+ else if (_axis == Axis.CHILD && _type != ELEMENT) {
+ _source = _adapters[dom].getTypedChildren(_type);
+ }
+ else {
+ _source = _adapters[dom].getTypedAxisIterator(_axis, _type);
+ }
}
+
_source.setStartNode(node & CLR);
return this;
}
@@ -144,10 +146,7 @@
}
public boolean isReverse() {
- if (_source == null)
- return(false);
- else
- return _source.isReverse();
+ return (_source == null) ? false : _source.isReverse();
}
public void setMark() {
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org