Adopted for correct usage with Saxon 9.6