and if i want to link three or four elemnts?
just changing the modulo and in sibling::*[2] or sibling::*[3]
edit: my Problem is that i want to get the Output in a field so my previous code was like that:
PHP Code:
<xsl:for-each select="$elements">
<cell dim="1 1">
<struct dim="1 1">
<rec>
<fld><xsl:attribute name="name"><xsl:value-of select="name"/></xsl:attribute><c><xsl:value-of select="value"/></c>
</fld>
</rec>
</struct>
</cell>
</xsl:for-each>
so how could i Change your tip, that it fits here...?