I have many nodes I wish to sort.
– They all have a create date.
– Some have an edit date to.
(update)
Since no ansers I will add an example of en xml document to search
<page>
<createdate>2010-01-05</createdate>
<editdate>2010-01-07</editdate>
</page>
<page>
<createdate>2010-01-06</createdate>
<editdate></editdate> (do not know is this row is there at all)
</page>
<page>
<createdate>2010-01-07</createdate>
<editdate>2010-01-10</editdate>
</page>
I would like a sort that order by “createdate and use “editdate” if it exist.
Can this be done in XSLT 1.0?
BR. Anders
UPDATE: SOLVED by solution given below
How about using a concatenation of editdate and createdate as the selection for the xsl:sort?
like