[Home] [By Thread] [By Date] [Recent Entries]
Rick Quatro rick@xxxxxxxxxxxxxx wrote:
As I am processing a for-each-group, I want to check some of the elements within the group that are before or after the current node. I can use preceding-sibling and following-sibling axes, but it doesn't seem like these are restricted to the current-group. Is there a good way to query what is before or after the current node of a group, while insuring that the query stays within the group? Thanks. -Rick If you process the current-group() with e.g. <xsl:for-each select="current-group()"> <xsl:variable name="pos" select="position()"/> <xsl:variable name="prec" select="current-group()[position() lt $pos]"/> <xsl:variable name="foll" select="current-group()[position() gt $pos]"/> ... </xsl:for-each> or use the same approach with <xsl:apply-templates select="current-group()"/> then you can access the items in a group preceding or following the current item in the group.
|

Cart



