__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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to