sboag 01/06/22 07:55:02
Modified: java/src/org/apache/xml/dtm/ref Tag: Bxalan-j_2_2L
DTMManagerDefault.java
Log:
In LocPathIterator#setCacheNodes, don't replace the current m_cachedNodes if
it is non-null. This fixes a bug with the NodeIterator/NodeSet
adapters.
In getDTMHandleFromNode, if a DTM has to be created, create
it from the ownerDocument instead of the node argument. I think
this will avoid a lot of problems with node identity coming from
extensions and the XPath API.
Revision Changes Path
No revision
No revision
1.8.2.1 +6 -3
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java
Index: DTMManagerDefault.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- DTMManagerDefault.java 2001/06/20 14:02:30 1.8
+++ DTMManagerDefault.java 2001/06/22 14:55:00 1.8.2.1
@@ -446,12 +446,15 @@
}
// Fallback: Not found in one we know how to search.
- // Current solution: Generate a new DOM2DTM with this node as root.
+ // Current solution: Generate a new DOM2DTM.
// %REVIEW% Maybe the best I can do??
- DTM dtm = getDTM(new javax.xml.transform.dom.DOMSource(node), false,
+ Node root = node.getOwnerDocument();
+ if(null == root)
+ root = node;
+ DTM dtm = getDTM(new javax.xml.transform.dom.DOMSource(root), false,
null, true, true);
- return dtm.getDocument();
+ return ((DOM2DTM)dtm).getHandleOfNode(node);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]