Carsten --
I'm not claiming that it is -not- a bug in XalanJ2. I'm just suggesting
that if the DOM stuff gets cleaned up and the bug is still there, we'll
look for it.
Gary
Carsten Ziegeler wrote:
>
> Hi Gary,
>
> sorry for blaming Xalan-J again for a not existing bug. Our developers
> should really read the DOM spec first...(our should do it...)
>
> But thank you for this hint, we are currently rewriting our applications
> and will test it over the next days.
>
> Regards
>
> Carsten
>
> > -----Ursprungliche Nachricht-----
> > Von: Gary L Peskin [mailto:[EMAIL PROTECTED]]
> > Gesendet: Dienstag, 10. Juli 2001 20:49
> > An: [EMAIL PROTECTED]
> > Betreff: Re: AW: [Xalan-J 2.2.0D6]: Strange problems with DOM and XPath
> >
> >
> > Carsten --
> >
> > I deserialized your attachment and noticed that it mixes DOM Level 1
> > nodes (ElementImpl) with Level 2 nodes (ElementNSImpl). Since things
> > work when you serialize and then reparse, I suspect that DOM2DTM is not
> > handling this situation as you expect. The DOM spec does say "mixing
> > both sets of methods can lead to unpredictable results" and it seems
> > like that is what's happening.
> >
> > If possible, try to rewrite your application so that you are using only
> > the NS forms of the various DOM APIs and then see if you can reproduce
> > your problem.
> >
> > Gary
> >
> > Carsten Ziegeler wrote:
> > >
> > > Hi,
> > >
> > > I know that it is hard to find but I have absolutely no clue how
> > > to build a test case.
> > >
> > > I know do the following: If the XPathAPI throws this NPE, I catch
> > > the exception, serialize the complete document to a string and
> > > then reparse it, creating a clean DOM and invoke then the
> > > XPathAPI again. And this works.
> > >
> > > I serialized the document and attached it to the mail. I hope
> > > this helps you.
> > >
> > > (I didn't test if it is reproducable by deserialization).
> > >
> > > Regards,
> > >
> > > Carsten
> > >
> > > Open Source Group sunShine - b:Integrated
> > > ================================================================
> > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > www.sundn.de mailto: [EMAIL PROTECTED]
> > > ================================================================
> > >
> > > > -----Ursprungliche Nachricht-----
> > > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Gesendet: Freitag, 6. Juli 2001 15:31
> > > > An: [EMAIL PROTECTED]
> > > > Betreff: Re: [Xalan-J 2.2.0D6]: Strange problems with DOM and XPath
> > > >
> > > >
> > > >
> > > > The problem is happening during incremental construction of
> > the DTM model.
> > > > It's trying to retrieve information which has not yet been stored,
> > > > specifically, the expanded type information for a node which
> > hasn't yet
> > > > been written into the tables. But unless we can provoke it under a
> > > > debugger, I really can't tell whether this is because it's
> > referencing a
> > > > node that hasn't yet been created, or a node which has been
> > > > created but not
> > > > initialized properly. Neither, of course, should be happening.
> > > >
> > > > I've got one off-the-cuff guess... The DOM permits using
> > > > namespaces without
> > > > ever declaring them. It's possible that you're creating this
> > > > situation, and
> > > > that our DOM2DTM code isn't handling it properly. We could try a few
> > > > examples and see if we can reproduce the problem that way...
> > > >
> > > > ... but if there's any way you can come up with a reliably
> > reproducable
> > > > testcase -- maybe add code to catch that exception and
> > serialize out the
> > > > DOM which is provoking it, though serializing might wind up
> > masking the
> > > > problem? -- that'd be tremendously helpful.
> > > >