The expected behaviour for fn:substring is that an empty string should be returned when
length is less than 0 - i.e. the behaviour is the same as if the length were 0.
This issue has been fixed (for Saxon-CE Beta 0.2), but investigation is needed to understand why the substring tests in our test suite didn't highlight this.
Please register to edit this issue