Hi Donald,

this seems like a Jaxen problem to me.

I've updated the sources recently to use the latest jaxen release, so your problem could be solved by this. Also, the quote-problem you mention with the attributes values should also has been fixed with the current CVS sources.

Could you please verify if your problem still exists with the current CVS release ?

thanks,
Maarten

Donald Ball wrote:

Hey guys, I just finished tracking down an unhappy bug in dom4j... it seems that Node.selectNodes(String xpath) is unreliable - occasionally it returns no results when there actually are results.

I've got a decorator class which reads in an xhtml document containing a form and adds stuff to the inputs - default values, validation scripts, etc. Works like a charm, dom4j is my best friend. Unfortunately, it began to break recently when I added some very strict validation to the decorator itself. I want to refuse to process a form if it contains any inputs which I'm not expecting. So as I'm decorating, I compute a set of all known inputs, then at the end, I do something like this:

List foundInputs = formElement.selectNodes(".//h:input");

(the h namespace prefix has been mapped to the xhtml namespace, of course)

Sometimes, this method returns all of the input elements in the form. Sometimes, it returns an empty list. Er...?

I never have any trouble with my other, more complex xpath queries. Just this one. Help?

I'm running dom4j from cvs from 2004-02-01 with one small patch to XMLWriter (forcing apostrophe entities to be rendered as ' instead of ' inside attribute values - thanks, internet explorer. interested in a patch, btw?)

I'm going to try the latest cvs to see if it fixes the problem, but I wanted to touch base with y'all to see if anyone knows what might be up, and warn other developers to watch out for this problem. Cheers.

- donald


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to