I have a table with eight rows. Ski conditions for each trail in a park. Outside of the table, I want to display the greatest value of Changed at_UDT_Value so that the user can see when any record was last updated, not a last updated for each record. See the code below, which doesn't quite work but I think I'm on to something:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udt="DotNetNuke/UserDefinedTable" exclude-result-prefixes="udt">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<!--
This prefix is used to generate module specific query strings
Each querystring or form value that starts with udt_{ModuleId}_param
will be added as parameter starting with param
-->
<xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>
<xsl:template match="udt:Data" mode="list">
<tr class="dnnGridItem row">
<td style="width:25%">
<xsl:call-template name="EditLink" />
<xsl:value-of select="udt:TrailName" disable-output-escaping="yes" />
</td>
<td style="width:8.33%;text-align:center;">
<xsl:value-of select="udt:Difficulty" disable-output-escaping="yes" /> 
</td>
<td style="width:8.33%;text-align:center;">
<xsl:value-of select="udt:Km" disable-output-escaping="yes" />
</td>
<td style="width:8.33%;text-align:center;">
<xsl:value-of select="udt:Miles" disable-output-escaping="yes" />
</td>
<td style="width:50%">
<xsl:value-of select="udt:Conditions" disable-output-escaping="yes" /> 
</td>
</tr>
</xsl:template>
<xsl:template match="/udt:UserDefinedTable">
<xsl:variable name="currentData" select="udt:Data" />
<xsl:if test="$currentData">
<table class="dnnFormItem">
<tr class="dnnGridItem row">
<td style="width:25%">
<b>Trail Name</b>
</td>
<td style="width:8.33%;text-align:center;">
<b>Difficulty</b>
</td>
<td style="width:8.33%;text-align:center;">
<b>Km</b>
</td>
<td style="width:8.33%;text-align:center;">
<b>Mi</b>
</td>
<td style="width:50%">
<b>Conditions</b>
</td>
</tr>
<xsl:apply-templates select="$currentData" mode="list">
</xsl:apply-templates>
</table>
<xsl:variable name="lastUpdated">
<xsl:for-each select="udt:Changed_x0020_at_UDT_Value">
<xsl:sort select="." order="ascending" />
<xsl:if test="position() = last()">
<xsl:value-of select="." />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<em>Last Updated: <xsl:value-of select="$lastUpdated" disable-output-escaping="yes" /></em>
</xsl:if>
</xsl:template>
<xsl:template name="EditLink">
<xsl:if test="udt:EditLink">
<a href="{udt:EditLink}">
<img border="0" alt="edit" src="{//udt:Context/udt:ApplicationPath}/images/edit.gif" />
</a>
</xsl:if>
</xsl:template>
</xsl:stylesheet>