}
public void testDescendantAxisWithNamespaceNodes() throws JaxenException {
BaseXPath xpath = new DOMXPath("/descendant::x/namespace::node()");
org.w3c.dom.Element a = doc.createElementNS("", "a");
org.w3c.dom.Element b = doc.createElementNS("", "b");
doc.appendChild(a);
org.w3c.dom.Element x1 = doc.createElementNS("", "x");
a.appendChild(x1);
a.appendChild(b);
org.w3c.dom.Element x2 = doc.createElementNS("", "x");
org.w3c.dom.Element x3 = doc.createElementNS("", "x");
org.w3c.dom.Element x4 = doc.createElementNS("", "x");
a.appendChild(x4);
b.appendChild(x2);
b.appendChild(x3);
Attr a1 = doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:a");
a1.setNodeValue("http://www.example.org/");
x1.setAttributeNode(a1);
Attr a2 = doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:b");
a2.setNodeValue("http://www.example.org/");
x2.setAttributeNode(a2);
Attr a3 = doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:c");
a3.setNodeValue("http://www.example.org/");
x3.setAttributeNode(a3);
Attr a4 = doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:d");
a4.setNodeValue("http://www.example.org/");
x4.setAttributeNode(a4);
List result = xpath.selectNodes(doc);
assertEquals(8, result.size());
Iterator iterator = result.iterator();
StringBuffer sb = new StringBuffer(4);
while (iterator.hasNext()) {
NamespaceNode ns = (NamespaceNode) iterator.next();