Fallback to JDK XPath when Saxon doesn't support encoding, close #2012