And that would break legitimate users of the DOM Level 1 methods and make Xerces non-conformant to JAXP. We cannot do that.
It would be more appropriate to add a check for DOM Level 1 usage to a static analysis tool such as Findbugs [1] and have it produce a warning with guidance to use the DOM Level 2 methods instead. Thanks. [1] http://findbugs.sourceforge.net/ Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org Gaël Lalire <gael.lal...@bull.net> wrote on 01/20/2012 06:01:35 AM: > Hello, > > Thanks for your answers. > Now I avoid mixing level 1 and 2 of DOM. > > However if you think that the validation fail is not a bug because > it is not sane to mix level of DOM, then you should override > following methods > > org.apache.xerces.dom.ElementNSImpl.setAttribute > org.apache.xerces.dom.ElementNSImpl.setAttributeNode > > to throw an exception with a clear message like > > throw new XercesException("Please use setAttributeNS") > throw new XercesException("Please use setAttributeNodeNS") > > So people like me could correct their code and avoid spending time > to determine why the validation behavior differs and where is the real issue. > > Regards, > Gael Lalire > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org