Rick Quatro rick(_at_)rickquatro(_dot_)com 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.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--