Details
Description
Jaxen is failing this test:
org.w3c.dom.Element root = doc.createElement("root");
doc.appendChild(root);
Element child = doc.createElementNS("http://www.example.org", "foo:child");
root.appendChild(child);
XPath xpath = new DOMXPath("//namespace::node()");
List result = xpath.selectNodes(doc);
assertEquals(3, result.size());
This query on this document should find three nodes: a namespace node for the xml prefix on the root, a namespace node for the xml prefix on the child, and a namespace node for the foo prefix on the child. It only finds the first two. (I've inspected this with the debugger.) For some reason it misses the foo prefix.
I haven't fully tracked this down yet. It might be a problem in the DOM navigator. It might be a problem in Jaxen itself.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Elliotte Rusty Harold [ elharo ] |
| Component/s | core [ 11383 ] |
| Comment | [ It occurs to me that an inconsistent DOM still has namespace nodes that Jaxen should find all of with a query such as //namespace::node(). I'm writing a test for that now to see if that's what we already do. ] |
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |