mmidy 02/04/18 14:01:42
Modified: java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM
SAXImpl.java
java/src/org/apache/xml/dtm/ref Tag: XSLTC_DTM
DTMDefaultBaseIterators.java
java/src/org/apache/xpath/compiler Tag: XSLTC_DTM
XPathParser.java
Log:
Misc fixes
Revision Changes Path
No revision
No revision
1.1.2.2 +12 -12
xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java
Index: SAXImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- SAXImpl.java 17 Apr 2002 18:13:44 -0000 1.1.2.1
+++ SAXImpl.java 18 Apr 2002 21:01:42 -0000 1.1.2.2
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: SAXImpl.java,v 1.1.2.1 2002/04/17 18:13:44 mmidy Exp $
+ * @(#)$Id: SAXImpl.java,v 1.1.2.2 2002/04/18 21:01:42 mmidy Exp $
*
* The Apache Software License, Version 1.1
*
@@ -3616,9 +3616,9 @@
*/
private void storeTextRef(final int node)
{
- final int length = _currentOffset - _baseOffset;
- _offsetOrChild[node] = maybeReuseText(length);
- _lengthOrAttr[node] = length;
+ // final int length = _currentOffset - _baseOffset;
+ // _offsetOrChild[node] = maybeReuseText(length);
+ // _lengthOrAttr[node] = length;
}
/**
@@ -3879,12 +3879,12 @@
//linkChildren(node);
linkParent(node);
- _lengthOrAttr[node] = DTM.NULL;
+ // _lengthOrAttr[node] = DTM.NULL;
final int count = attributes.getLength();
// Append any namespace nodes
- if (_nextNamespace != DTM.NULL)
+ /* if (_nextNamespace != DTM.NULL)
{
_lengthOrAttr[node] = _nextNamespace;
/* while (_nextNamespace != DTM.NULL)
@@ -3895,15 +3895,15 @@
// Chain last namespace node to following attribute node(s)
if ((_nextNamespace == DTM.NULL) && (count > 0))
_nextSibling2[tail] = _currentAttributeNode;
- } */
- }
+ }
+ }*/
// Append any attribute nodes
if (count > 0)
{
int attr = _currentAttributeNode;
- if (_lengthOrAttr[node] == DTM.NULL)
- _lengthOrAttr[node] = attr;
+ //if (_lengthOrAttr[node] == DTM.NULL)
+ // _lengthOrAttr[node] = attr;
for (int i = 0; i<count; i++)
{
attr = makeAttributeNode(node, attributes, i);
@@ -4101,7 +4101,7 @@
{
if ((length < newSize) && (newSize == _currentNode))
length = _currentNode;
-
+/*
// Resize the '_type' array
//final short[] newType = new short[newSize];
// System.arraycopy(_type, 0, newType, 0, length);
@@ -4126,7 +4126,7 @@
final int[] newLengthOrAttr = new int[newSize];
System.arraycopy(_lengthOrAttr, 0, newLengthOrAttr, 0, length);
_lengthOrAttr = newLengthOrAttr;
-
+*/
// Resize the '_whitespace' array (a BitArray instance)
_whitespace.resize(newSize);
No revision
No revision
1.12.2.2 +22 -1
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java
Index: DTMDefaultBaseIterators.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -r1.12.2.1 -r1.12.2.2
--- DTMDefaultBaseIterators.java 17 Apr 2002 18:13:48 -0000 1.12.2.1
+++ DTMDefaultBaseIterators.java 18 Apr 2002 21:01:42 -0000 1.12.2.2
@@ -643,7 +643,7 @@
for (node = _currentNode; node != END; node =
getNextNamespaceNode(_startNode, node, true))
{
- if (getExpandedTypeID(node) == _nodeType || getNodeType(node) ==
_nodeType
+ if (getExpandedTypeID(node) == _nodeType || getNodeType(node) ==
_nodeType
|| getNamespaceType(node) == _nodeType)
{
_currentNode = node;
@@ -1714,6 +1714,8 @@
*/
protected boolean isDescendant(int identity)
{
+ if (_startNode == DTM.NULL)
+ return false;
return (_startNode == identity) || _parent(identity) >= _startNode;
}
@@ -1742,6 +1744,25 @@
return returnNode(makeNodeHandle(node)); // make handle.
}
}
+
+ /**
+ * Reset.
+ *
+ */
+ public DTMAxisIterator reset()
+ {
+
+ final boolean temp = _isRestartable;
+
+ _isRestartable = true;
+
+ setStartNode(makeNodeHandle(_startNode));
+
+ _isRestartable = temp;
+
+ return this;
+ }
+
} // end of DescendantIterator
/**
No revision
No revision
1.19.2.1 +2 -2
xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java
Index: XPathParser.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- XPathParser.java 17 Apr 2002 13:13:45 -0000 1.19
+++ XPathParser.java 18 Apr 2002 21:01:42 -0000 1.19.2.1
@@ -535,7 +535,7 @@
// Patch for Christina's gripe. She wants her errorHandler to return
from
// this error and continue trying to parse, rather than throwing an
exception.
// Without the patch, that put us into an endless loop.
- throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR);;
+ throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR);
}
}
@@ -564,7 +564,7 @@
// Patch for Christina's gripe. She wants her errorHandler to return
from
// this error and continue trying to parse, rather than throwing an
exception.
// Without the patch, that put us into an endless loop.
- throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR);;
+ throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]