How to count the number of same immediate preceding siblings in xsl
问题 I'm using xslt version 2, I'm trying to transform an xml to a fo output, and I'm stuck on a specific problematic. Here is what looks like my input: <a1/> <a1/> <b/> <c/> <d/> <a2/> <b/> <c/> <a1/> <a1/> <a1/> <a1/> <b/> <c/> <d/> This data, functionally speaking, contains a list of 'sets' defined by a1|a2,b?,c?,d?. My problem is that I don't see how I can count the number of a1 tags for a specific 'set'. Indeed, I have written my xsl and I get an output like that: <fo:table> <fo:row> <fo:cell