[jdom-interest] Element.getDocument() ?

Joerg joerg at freiheit.com
Thu Aug 31 02:36:38 PDT 2000


Can you explain it to me, what is the problem in the XPath implementation where you need
the method? A recursive getParent() seems also not to be very efficient. Maybe it is
possible to keep the owner Document somewhere in the XPath classes or keep track of it,
by passing it seperately to the necessary functions.

Joerg

bob wrote:

> Probably just recursively getParent() until isRootElement(),
> and hold a reference to the Document there.  Maybe.
>
>         -bob
>
> On Thu, 31 Aug 2000, Joerg wrote:
>
> > How do you want to do that? Do you want to put a referencce to a Document in every
> > Element? When you do it like this, you have to update all Elemets when you copy a
> > subtree from one Document to another. This would be the same "ownerDocument" -
> > "cloneNode" problem like in DOM.
> >
> > Joerg
> >
> >
> > bob wrote:
> >
> > > > > Currently, there appears to be no way to obtain the Document
> > > > > which owns a particular Element.
> > > >
> > > > I'm OK with this, but I don't have the time to make the changes. There
> > > > would need to be changes in Element.java, PartialList.java, and
> > > > Document.java, as far as I can tell.
> > > >
> > > > Wanna do them, Bob?
> > >
> > > Sure.  Though, I'm offline until next Wednesday.  So, I'll submit
> > > a patch mid-to-late next week.
> > >
> > >         -bob
> > >
> > > _______________________________________________
> > > To control your jdom-interest membership:
> > > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> >
> >






More information about the jdom-interest mailing list