Re: Class casting an interface is bad

2009-06-02 Thread keshlam
> Thanks for the explanation although I am a bit confused as to why we > would bother to have an interface when we require a specific > implementation. Sorry, but this really is the way the W3C intends it to work. The interface standardizes most usages of the DOM. But for efficiency of implemen

Re: Class casting an interface is bad

2009-06-02 Thread Domenic Figliomeni
Hi Michael, Thanks for the explanation although I am a bit confused as to why we would bother to have an interface when we require a specific implementation. I guess the bottom line is that I can't rely on any implementation, xerces or otherwise to honor the contract the way I would expect. I ca

Re: Class casting an interface is bad

2009-05-31 Thread Michael Glavassevich
Hi, Sorry, but you can't add nodes from arbitrary implementations to the DOM. They must have been created by the same Document node (i.e. the same implementation) [1] as all the other nodes in the DOM, otherwise a DOMException(WRONG_DOCUMENT_ERR) is thrown. The only reason that it would be gettin