I am performing some overdue cleanup of xap Element and Document. Removing unused methods.
Changing null checks to other checks where appropriate. (This is a bit tricky because in something like setAttribute() a value of "" is fine but will pass !value) Cleaning up ownerDocument and getOwnerDocument. The W3C ownerDocument is strange in that if you simply create a node from a document the document is that node's ownerDocument - but how can you tell if the node is currently part of the document? You can't without a traversal. getOwnerDocument() is called a lot right now. In our case we really don't care too much what document the node was created from, what we want to know is if the node is currently part of a document and if so which one? So I've changed it so that when a node is added to something in a document the ownerDocument is set. When it is removed from something in a document the ownerDocument is cleared. An element has an ownerDocument IFF the element is currently part of that document. We were already doing work when nodes were added/removed from documents so the change is pretty minor. James Margaris
