// If we found an XPath selector we need to execute the commands,
// but we can not execute xupdate variables again.
// all variables start with a '$'
if (selector != null && !selector.startsWith("$")) {
NodeSet ns = col.queryCollection("XPath", selector, nsMap);
while (ns != null && ns.hasMoreNodes()) {
DBNode node = (DBNode) ns.getNextNode();
Document doc = node.getOwnerDocument();
NodeSource source = node.getSource();
if (docsUpdated.containsKey(source.getKey())) {
continue; // We only have to process it once