[Home] [By Thread] [By Date] [Recent Entries]
Stefanie Haupt wrote:
this looks great, thank you! - the only downside is that the input to this grouping attempt is a variable containing the input. So I fear I can't use<template match="text"> here. I think I would need a new transformation document in the pipeline with this attempt - which I would love to avoid. - Or am I mistaken?
Instead of that template you could just apply the code to your variable e.g. <xsl:for-each-group select="$variable/*" group-adjacent="boolean(self::item)"> <xsl:choose> <xsl:when test="current-grouping-key()"> <xsl:sequence select="mf:group(current-group(), 0)"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="current-group()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each-group> -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



