I want to replicate the following as a cell in another xslt below
<xsl:for-each select="//Row[not(./@ThreadID = preceding::Row/@ThreadID)]">
<xsl:variable name="curThreadID" select="@ThreadID"/>
<xsl:variable name="postNodes" select="//Row[@ThreadID = $curThreadID]"/>
<xsl:variable name="postCount" select="count($postNodes)"/>
<xsl:variable name="firstPost" select="$postNodes[$postCount]"/>
<xsl:variable name="lastPost" select="$postNodes[1]"/>
<TR name="row" style="display:auto">
<TD Class="ms-vb2" nowrap="true">
<xsl:value-of select="ddwrt:FormatDateTime(string($lastPost/@Created) ,1033 ,string($PostDateTimeFormat))"/>
by
<xsl:call-template name="RenderNameWithIMNRC"><xsl:with-param name="Author" select="$lastPost/@Author"/><xsl:with-param name="ItemID" select="$lastPost/@ID"/></xsl:call-template></TD>
</TR>
</xsl:for-each>
Here's the separate snip from a working XSLT that I want to include another cell in. Please excuse the missing closed tags but I am interested in how I can include this is the sort order is different...
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:param name="FirstRow"/>
<xsl:param name="LastRow"/>
<xsl:variable name="AdHocGroupDir"><xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:when test="$dvt_groupdir='desc'">descending</xsl:when><xsl:otherwise>ascending</xsl:otherwise></xsl:choose></xsl:variable>
<xsl:variable name="AdHocSortDir"><xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:when test="$dvt_sortdir='desc'">descending</xsl:when><xsl:otherwise>ascending</xsl:otherwise></xsl:choose></xsl:variable>
<xsl:for-each select="$Rows">
<xsl:variable name="KeepItemsTogether" select="false()"/>
<xsl:variable name="HideGroupDetail" select="false()"/>
<xsl:variable name="GroupStyle" select="'auto'"/>
<xsl:if test=" (position() >=$FirstRow and position() <= $LastRow) or $KeepItemsTogether">
<xsl:if test="not($HideGroupDetail)" ddwrt:cf_ignore="1">
<TR name="row" style="display:{$GroupStyle}">
<TD Class="{$IDAABQ0C}">
<table border="0" cellpadding="0" cellspacing="0" width="100%" MsoPnlId="data">
<tr>
<td class="ms-
vb" name="indent" width="0"/>
<td class="ms-
vb"><table PostID="{@GUID}" border="0" cellpadding="0" cellspacing="0" width="100%" MsoPnlId="data"><tr><td class="ms-
vb" style="padding-top: 1px;"><a name="post" style="cursor: default" tabindex="2"><img name="widget" id="{@Ordering}" border="0" src="/_layouts/images/discbul.gif"/></a><xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text></td><td class="ms-
vb" width="100%"><xsl:choose><xsl:when test="ddwrt:GetVar('SelectedID')=@ID"><b><xsl:valu e-of disable-output-escaping="no" select="@Title"/></b><xsl:if test="ddwrt:IfNew(string(@Created))"><IMG SRC="/_layouts/1033/images/new.gif" alt="New"/></xsl:if></xsl:when><xsl:otherwise><table height="100%" cellspacing="0" class="ms-unselectedtitle" onmouseover="OnItem(this)" CTXName="ctx99" ItemId="{format-number(string(@ID), '#;-#')}" Ordering="{@Ordering}" ThreadID="{@ThreadID}" Subject="{@Title}" MsoPnlId="data"><tr><td width="100%" Class="ms-
vb"><a onfocus="OnLink(this)" href="{$URL_Display}?ID={@ID}" ONCLICK="GoToPage('{$URL_Display}?ID={@ID}');retur n false;" target="_self"><xsl:value-of disable-output-escaping="no" select="@Title"/></a><xsl:if test="ddwrt:IfNew(string(@Created))"><IMG SRC="/_layouts/1033/images/new.gif" alt="New"/></xsl:if></td><td><img src="/_layouts/images/blank.gif" width="13" style="visibility: hidden" alt=""/></td></tr></table></xsl:otherwise></xsl:choose></td></tr></table><table name="body" STYLE="display:" width="100%" MsoPnlId="data"><tr><td class="ms-
vb" width="5"><xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text></td><td class="ms-
vb"><xsl:choose><xsl:when test="@Body=''">(no text)</xsl:when><xsl:otherwise><xsl:choose><xsl:when test="''='TRUE'"><div><xsl:value-of disable-output-escaping="no" select="ddwrt:Limit(string(@Body), 400, '...')"/></div></xsl:when><xsl:otherwise><xsl:value-of disable-output-escaping="no" select="ddwrt:Limit(string(@Body), 400, '...')"/></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></td></tr></table></td>
</tr>
</table>
</TD>