I need to do something like a for each in the following code so that it doesn't make a new table for every record - just a Table Row:
<xsl:template name="TwoColumnRadContacts" match="Row[@Style='TwoColumnRadContacts']" mode="itemstyle"><div> <table style="width:100%"><tr><td style="width:50%"><xsl:value-of select="@DivName"/> </td><td style="width:50%;text-align:left"><xsl:value-of select="@WorkPhone"/></td></tr></table></div></xsl:template>
I know just enough about xsl in SharePoint to be dangerous. I know I need the table tags around the code that iterates the table ROWS, but I just don't know how to structure the for-each. I tried the following which didn't work:
<xsl:template name="2ColumnRadContacts" match="/" mode="itemstyle"><xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" /><table><xsl:for-each select="$Rows"><xsl:call-template name="dvt_1.rowview" /></xsl:for-each></table></xsl:template><xsl:template name="dvt_1.rowview"><tr><td><xsl:value-of select="@DivName" /></td><td><xsl:value-of select="@WorkPhone"/></td></tr></xsl:template>
However, it doesn't display correctly - it only shows @DivName, with no workphone and @DivName appears to be a link, which it shouldn't be.
What am I missing?