> I think you misunderstand what I'm saying. I'm saying that if the > context node from either of your examples is the node named 'root'(or > 'test:root'), for an XPath expression 'child', that the default > namespace for the XPath expression would be "urn:blah.com:blah" instead > of "" and that it would return the child, since in both cases, the > namespace for the child node should be "urn:blah.com:blah". Right now > with Jaxen, your XPath MUST be 'blah:child' assuming you have "blah" > mapped to "urn:blah.com:blah". This seems especially unnecessary when > the XPath is searching through only one namespace.
Sorry about the misunderstanding. I am not too sure about this solution, it doesn't seem to be very transparent. It might work in 99% of the cases but it just doesn't seem right to implement a specific case for a default namespaces on a root-node. > The example of what I'd be breaking is that 'child' would not have any > results against the following case(Right now the child node WOULD be > returned by Jaxen because non-specified namespaces are ALWAYS assumed to > be "", which is just weird). Note that right now this situation could > occur by changing the namespace of the root element programatically from > "" to "urn:blah.com:blah". > > <root xmlns="urn:blah.com:blah"> > <child xmlns="">text</child> > </root> The 'child' element in this case is not in the default namespace, actually it is in no namespace, this is what xmlns="" does, I am not sure what you find to be weird about this? Regards, Edwin -- http://www.edankert.com/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user