/** NON-DOM Get the number associated with this doctype. */ protected int getNodeNumber() { // If the doctype has a document owner, get the node number // relative to the owner doc if (getOwnerDocument()!=null) return super.getNodeNumber(); // The doctype is disconnected and not associated with any document. // Assign the doctype a number relative to the implementation. if (doctypeNumber==0) { CoreDOMImplementationImpl cd = (CoreDOMImplementationImpl)CoreDOMImplementationImpl.getDOMImplementation(); doctypeNumber = cd.assignDocTypeNumber(); } return doctypeNumber; }