lmartin 2003/03/25 12:49:14
Modified: java/src/org/apache/xerces/dom
CoreDOMImplementationImpl.java
Log:
added support for ordering disconnected nodes - needed for compareDocumentPosition
Revision Changes Path
1.24 +16 -1
xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java
Index: CoreDOMImplementationImpl.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- CoreDOMImplementationImpl.java 25 Mar 2003 17:15:11 -0000 1.23
+++ CoreDOMImplementationImpl.java 25 Mar 2003 20:49:14 -0000 1.24
@@ -99,6 +99,11 @@
private int freeValidatorIndex = -1;
private int currentSize = SIZE;
+ // Document and doctype counter. Used to assign order to documents and
+ // doctypes without owners, on an demand basis. Used for
+ // compareDocumentPosition
+ private int docAndDoctypeCounter = 0;
+
// static
/** Dom implementation singleton. */
static CoreDOMImplementationImpl singleton =
@@ -352,5 +357,15 @@
}
validators[freeValidatorIndex]=validator;
}
+
+ /** NON-DOM: increment document/doctype counter */
+ protected synchronized int assignDocumentNumber() {
+ return ++docAndDoctypeCounter;
+ }
+ /** NON-DOM: increment document/doctype counter */
+ protected synchronized int assignDocTypeNumber() {
+ return ++docAndDoctypeCounter;
+ }
+
} // class DOMImplementationImpl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]