Presumably you mean you want to know if the current item
matches the group-starting-with pattern? As in
I tend to use the above style (repeating the test) if it's
a simple pattern, or I might use
They're not quite the same thing, of course, in that the
first item in the first group doesn't necessarily match the
I'd say my view on this is: you have a point, but it would
need a strong argument to justify adding an extra function to the spec or an
extension function to Saxon.
I have used the <xsl:for-each-group> element quite a lot. One
feature that I miss is a function that would allow me to know if the current
group matches the group-starting-with or group-ending-with criteria without
having to repeat the test on the nodes in the current group (all over again).
The main reason would be to cut back on verbosity... I guess there might exist
an easy work-around that somebody might know of, so please forgive my
ignorance. A true() or a false() is all that would be needed as the result for
Paulo F. Sarli
A coisa certa dita na
é pior do que
a coisa errada dita na hora certa...