> Ian Roberts wrote:
>
> On Fri, 13 Jul 2001, Carsten Ziegeler wrote:
>
> > Hi,
> >
> > I am currently wondering if the implementation of the importNode method
> > of the DocumentImpl is correct.
> >
> > When a node is imported from let's say document B into document A,
> > the document B is queried if it is dom level 2. If so, the nodes
> > imported into document a are level 2 if not they are level 1.
> >
> > Shouldn't be the document A queried to what dom level it complies
> > to create new element/attribute nodes?
>
> We already know that the Xerces DocumentImpl (document A) is DOM level 2
> compatible. The reason for checking document B is presumably that if we
> try and call DOM level 2 methods on a level 1 document implementation, the
> Java VM will throw a NoSuchMethodError.
>
But if document A is DOM level 2 and document B not, then the DOM level 1
methods are used on document A although it is DOM level 1 and this is not
according to the DOM spec not allowed. You get a dom which has dom level 1
and dom level 2 nodes.
Carsten
> Ian
>
> --
> Ian Roberts, Software Engineer DecisionSoft Ltd.
> Telephone: +44-1865-203192 http://www.decisionsoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]