Issue Saxon warning via logger (part of #975)

Also move isXPath2Expression.
Fix error message