However, the refDate attributes on maritalStatus and religion are
not tied to each other. The refDates for all five elements can be
different as they are above, yet both columns have to be sorted.
ah so they are independent columns of data oh hm OK
Can you use a node-set extension function? if so you would probably be
best to sort the things first then assemble as in the following, which
I'll write using document('') hack in case you can't use an extension
function
<xsl:variable name="col1">
<xsl:for-each select="$set1">
<xsl:sort select="@refDate"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="sorted1" select="xx:node-set($col1)"/>
or
<xsl:variable name="sorted1"
select="document('')/*/xsl:variable[(_at_)name='col1']"/>
and same for the other columns
then as you had before but using $sorted1 $sorted2 $sorted3
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list