You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Dmitri Plotnikov <dm...@apache.org> on 2003/11/03 00:17:44 UTC

Re: [JXPath] behaviour of getNode for DOM attributes?

This is now fixed. Thank you for reporting the problem.

- Dmitri

----- Original Message ----- 
From: "joern turner" <jo...@web.de>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Friday, October 31, 2003 7:53 AM
Subject: Re: [JXPath] behaviour of getNode for DOM attributes?


> __matthewHawthorne wrote:
>
> > I just ran a quick test and noticed the same thing.  I'm not involved
> > with [jxpath], but this may be a bug.  I would wait for a response from
> > one of the team members for a few days, and then think about filing a
> > bugzilla issue.
> thanks for the reply - i think its quite obvious a bug, but i just
> wanted to check if someone else already came across this or maybe that
> this might be an JXPath restriction for some reason.
>
> on the other hand (as you state) it would be very easy to fix and also
> doesn't seem to give much chance for side effects.
> >
> > I took a quick glance at the code, and the object is question is
> > org.apache.commons.jxpath.ri.model.dom.DomAttributePointer.  Calling
> > getNode() eventually get to the getImmediateNode() method, which either
> > returns null or the attribute value.  It has the attribute object stored
> > internally, so an easy fix could be just to return the attrib itself
> > instead of the value.
> >
> > I could make this fix myself, but I want to wait for someone who knows
> > the codebase a little better to comment.
> sure.
>
> i would very much welcome if this would be fixed in the JXPath code
> cause we don't want to patch the original files ourselves. but this
> problem causes significant workarounds in our source.
>
> Joern
> >
> >
> >
> >
> > joern turner wrote:
> >
> >> Hello,
> >>
> >> can anybody explain why JXPath returns the value of an attribute
> >> instead of the attribute node when using JXPAth pointer.getNode() with
> >> a DOM object model?
> >>
> >> this seems to be rather inconsistent with the behaviour when accessing
> >> an DOM element - here the DOM element is returned as expected. Is
> >> there a specific reasons why this is so? did i miss something?
> >>
> >> Joern
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org