Yes, I see that I am declaring the variable twice. But I don't know XSL well enough to know how to re-form the code block. I tried re-naming each of the variables alternately, which does not give an error but then the filter or search fails.
(Red is what I wanted to add to create the "default" dataset for the module, Blue is what the XSL generator produced).
************
<xsl:template match="/udt:UserDefinedTable">
<xsl:variable name="currentData" select="udt:Data[contains(udt:Display,'Yes') and contains(udt:SaleType,'REO')]" />
<xsl:variable name="searchColumns" select="//udt:Fields[udt:Searchable='true']/udt:ValueColumn" />
<xsl:if test="//udt:Fields[udt:Searchable='true']">
<xsl:call-template name="Searchform" />
</xsl:if>
<xsl:variable name="currentData" select="udt:Data[contains(*[name()=$searchColumns][1],$search) or contains(*[name()=$searchColumns][2],$search) or contains(*[name()=$searchColumns][3],$search) or contains(*[name()=$searchColumns][4],$search) or contains(*[name()=$searchColumns][5],$search) or contains(*[name()=$searchColumns][24],$search) or contains(*[name()=$searchColumns][25],$search) or contains(*[name()=$searchColumns][26],$search) or contains(*[name()=$searchColumns][27],$search) or contains(*[name()=$searchColumns][28],$search) or contains(*[name()=$searchColumns][29],$search) or contains(*[name()=$searchColumns][22],$search) or contains(*[name()=$searchColumns][23],$search)]" />
<xsl:variable name="from">
<xsl:choose>
<xsl:when test="$paging">
<xsl:value-of select="$paging * $param_page - $paging" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="to">
<xsl:choose>
<xsl:when test="$paging">
<xsl:value-of select="$paging * $param_page +1" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count($currentData)+1" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<table>
<xsl:apply-templates select="$currentData" mode="list">
<xsl:sort select="*[name()=$orderBy]" order="{$orderDirection}" data-type="{$orderType}" />
<xsl:with-param name="from" select="$from" />
<xsl:with-param name="to" select="$to" />
</xsl:apply-templates>
</table>
<xsl:if test="$paging">
<xsl:call-template name="renderPaging">
<xsl:with-param name="maxPages" select="ceiling(count($currentData) div $paging)" />
</xsl:call-template>
</xsl:if>
</xsl:template>
***********************
Thanks for your help.
-M