xpathservice.setNamespace("h", "http://example.net/person");
ResourceSet resultSet = xpathservice.query(query);
assertEquals(1, resultSet.getSize());
XMLResource resource = (XMLResource) resultSet.getResource(0);
Node node = resource.getContentAsDOM();
String retrieved = TextWriter.toString(node);
assertFalse("Namespace definitions imported deep in: " + retrieved, -1 == retrieved.indexOf("<p:first>"));
// ensure that the resource has the correct doc id.
assertEquals("doc3", resource.getDocumentId());
// add source node information to the compared xml as it's added by
// the query processor. Note, this should work using without the
// prefixes in the control document using the default namespace,
// (i.e. xmlns='http://example.net/person') but I couldn't get it to work