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