Short maintenance. We will be observing a scheduled maintenance window this Sunday, October 30th 2016 from 9:00 until 11:00 UTC to perform important software updates that require a consistent data state. Planio may be unavailable for a few minutes at a time during the maintenance window.
NullPointerException after optimizing saxon:stream()
Execution of the following query fails with a NullPointerException:
let $x := saxon:stream(doc('temp/test.xml')/*/*) return $x
The reason is that in the course of optimizing the expression to remove the redundant variable, the saxon:stream() expression is copied, and in the course of copying it loses its reference to the "container" of the expression which holds location and context information; a subsequent reference to this container results in the NPE.
A patch to StreamingCopy.copy() is being committed.