Thanks to both David and Jarno for examples which
work on the test file I provided. My problem now
is when I attempt (just changing element names) to
use this on the real file in question I get an
error message of:
java.lang.StringIndexOutOfBoundsException: String index out
of range: -1
I've increased the amount of memory I'm giving saxon to the
maximum possible for that machine, in case that is what the
problem is. The file in question isn't *huge* only about
a meg.
A Java exception like this (in the absence of extension functions or the
like) is prima facie evidence of a bug. Report it please on the Saxon list!
Michael Kay