nasty hack to intercept core xquery functions before saxon sees them, so I can stub them
slightly more paranoid replaceAll()