Make lxml smart strings functionality customizable