while (keys.hasMoreElements()) {
String key = (String) keys.nextElement();
namespaces.put(key, nsMap.get(key));
}
NodeSet result;
if (name != null) {
result = col.queryDocument(queryLang, query, namespaces, name);
}
else {
result = col.queryCollection(queryLang, query, namespaces);
}
ResourceSetImpl rs = new ResourceSetImpl(this, null);
while (result.hasMoreNodes()) {
Node n = result.getNextNode();
if ( n instanceof DBNode ) {
( ( DBNode ) n ).expandSource();
}
String documentId = ((Element) n).getAttributeNS(QUERY_NS, "key");