I need to render a wrapper to items. I have a list of items that i want to display them in a DVWP, and every 3 items will be in a wrapper, for example:
<div>
<div>item</div>
<div>item</div>
<div>item</div>
</div>
<div>
<div>item</div>
<div>item</div>
<div>item</div>
</div>
you got the point...
I used this one:
<xsl:if test="position() = first()">
<xsl:text disable-output-escaping="yes">&lt;div&gt;</text>
</xsl:if>
<xsl:if test="position() mod 3 = 1">
<xsl:text disable-output-escaping="yes">&lt;/div&gt;</text>
<xsl:text disable-output-escaping="yes">&lt;div&gt;</text>
</xsl:if>
<xsl:if test="position() = last()">
<xsl:text disable-output-escaping="yes">&lt;/div&gt;</text>
</xsl:if>
(of course in the right order in the HTML rowview)
Is there another way, more complex-safe way of doing it?
Thanks a lot.