You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/09/25 21:40:31 UTC
cvs commit: xml-xalan/src/org/apache/xalan/xpath/dtm DTMLiaison.java
mmidy 00/09/25 12:40:31
Modified: src/org/apache/xalan/xpath FuncGenerateId.java
MutableNodeListImpl.java XPathSupport.java
XPathSupportDefault.java
src/org/apache/xalan/xpath/dtm DTMLiaison.java
Log:
Checking if liaison supports node number is not enough. Also make sure the node is a DTMProxy.
Revision Changes Path
1.8 +1 -1 xml-xalan/src/org/apache/xalan/xpath/FuncGenerateId.java
Index: FuncGenerateId.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/FuncGenerateId.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FuncGenerateId.java 2000/09/07 22:21:01 1.7
+++ FuncGenerateId.java 2000/09/25 19:40:27 1.8
@@ -97,7 +97,7 @@
// toHexString instead of toString.
// Patch from Costin Manolache
- if( execContext.supportsNodeNumber() )
+ if( execContext.supportsNodeNumber(context) )
{
int nodeN=execContext.getNodeNumber(context);
return new XString((null == context)
1.14 +2 -2 xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java
Index: MutableNodeListImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- MutableNodeListImpl.java 2000/09/07 22:21:01 1.13
+++ MutableNodeListImpl.java 2000/09/25 19:40:28 1.14
@@ -343,7 +343,7 @@
int insertIndex = -1;
if(test)
{
- if( support.supportsNodeNumber() )
+ if( support.supportsNodeNumber(node) )
{
int index1 = support.getNodeNumber(node);
@@ -470,7 +470,7 @@
{
// Assume first that the nodes are DTM nodes, since discovering node
// order is massivly faster for the DTM.
- if( support.supportsNodeNumber() )
+ if( support.supportsNodeNumber(node1) )
{
int index1 = support.getNodeNumber(node1);
int index2 = support.getNodeNumber(node2);
1.14 +1 -1 xml-xalan/src/org/apache/xalan/xpath/XPathSupport.java
Index: XPathSupport.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPathSupport.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- XPathSupport.java 2000/09/07 22:21:01 1.13
+++ XPathSupport.java 2000/09/25 19:40:28 1.14
@@ -361,7 +361,7 @@
// Patch from Costin Manolache
// Support for extra functionality from the parser
- public boolean supportsNodeNumber();
+ public boolean supportsNodeNumber(Node n);
public int getNodeNumber( Node n );
}
1.22 +1 -1 xml-xalan/src/org/apache/xalan/xpath/XPathSupportDefault.java
Index: XPathSupportDefault.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPathSupportDefault.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- XPathSupportDefault.java 2000/09/07 22:21:04 1.21
+++ XPathSupportDefault.java 2000/09/25 19:40:28 1.22
@@ -821,7 +821,7 @@
// Patch from Costin Manolache
// Support special functionality
- public boolean supportsNodeNumber()
+ public boolean supportsNodeNumber(Node n)
{
return false;
}
1.21 +5 -2 xml-xalan/src/org/apache/xalan/xpath/dtm/DTMLiaison.java
Index: DTMLiaison.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/dtm/DTMLiaison.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DTMLiaison.java 2000/09/07 22:21:07 1.20
+++ DTMLiaison.java 2000/09/25 19:40:30 1.21
@@ -452,9 +452,12 @@
}
//Patch from Costin Manolache
- public boolean supportsNodeNumber()
+ public boolean supportsNodeNumber(Node n)
{
- return true;
+ if (n instanceof DTMProxy)
+ return true;
+ else
+ return false;
}
public int getNodeNumber( Node node )