factor xmlnsmap-from-node out of xmlnsmap-from-root-node so it can be used on non-root nodes