jkesselm 01/05/11 09:12:29
Modified: java/src/org/apache/xml/dtm Tag: DTM_EXP
DTMDocumentImpl.java
Log:
Known issues:
Document's firstChild is being special-cased to equal root element's first
child rather than root element.
Almost certainly bug.
Last attr's nextSib is first non-attr child. That's correct at the level of
the internals,
incorrect in terms of the model we publish to outside. Reconcile.
Revision Changes Path
No revision
No revision
1.1.2.13 +15 -3
xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMDocumentImpl.java
Index: DTMDocumentImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/Attic/DTMDocumentImpl.java,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -r1.1.2.12 -r1.1.2.13
--- DTMDocumentImpl.java 2001/05/11 15:57:30 1.1.2.12
+++ DTMDocumentImpl.java 2001/05/11 16:12:26 1.1.2.13
@@ -914,6 +914,11 @@
short type = (short) (gotslot[0] & 0xFFFF);
// Check to see if Element or Document node
+ //
+ // %REVIEW% This says child of Document is child of
+ // root element. That's not DOM-like. How does it compare
+ // to XPath's model? (For DOM-like behavior, Doc.getFirstChild
+ // is always going to be nodeHandle 1 (if that node exists).
if ((type == ELEMENT_NODE) || (type == DOCUMENT_NODE) ||
(type == ENTITY_REFERENCE_NODE)) {
// In case when Document root is given
@@ -1036,12 +1041,19 @@
/**
* Given a node handle, advance to its next sibling.
- * %TBD% Remove - If not yet resolved, waits for more nodes to be
added to the document and
- * tries again.
+ *
+ * %TBD% This currently uses the DTM-internal definition of sibling;
+ * eg, the last attr's next sib is the first child. If we're rewriting
+ * for XPath emulation, that needs to be corrected.
+ *
+ * %TBD% CODE INTERACTION WITH COROUTINE PARSE - If not yet
+ * resolved, should wait for more nodes to be added to the document
+ * and tries again.
+ *
* @param nodeHandle int Handle of the node.
* @return int Node-number of next sibling,
* or DTM.NULL to indicate none exists.
- */
+ * */
public int getNextSibling(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
// Document root has no next sibling
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]