You can do exactly that - in short, something like this will do:
<!-- Grab nodes from all over the place -->
<xsl:variable name="set1" select="..." />
<xsl:variable name="set2" select="..." />
<xsl:variable name="set3" select="..." />
<!-- Combine in one set and sort descending by created date -->
<xsl:for-each select="$set1 | $set2 | $set3">
<xsl:sort select="@createDate" data-type="text" order="descending" />
<!-- do stuff -->
</xsl:for-each>
Sort xslt from 6 different nodes
Hi,
I'm displaying my content from 6 different nodes. Here's the sample code. My problem is sorting it.
Is it possible to pull the data from the 6 different nodes and then store it in somehow temp variable so I can I sort it there accordingly?
Hi Sherry Ann,
You can do exactly that - in short, something like this will do:
/Chriztian
Hi Chriztian,
Since I have multiple sort order I'm trying to pass a variable on the sort statement.
I try this
and this
But both is not working. I just get a xslt error.
Hi Sherry Ann,
Yeah - unfortunately you're not allowed to use variables in the sort attributes - but here's a neat little trick that'll work:
/Chriztian
is working on a reply...