changed the signature of the methods to accept a Node instead of a Document in the prefix extraction code