xsl-list
[Top] [All Lists]

[xsl] sort by predefined order

2008-05-19 23:17:55
hi

is there any way to sort elements by a predefined order? i'd like to come from

<source>
  <sortorder>46, 21, 39, 27, 17</sortorder>
  <elements>
    <element ID="17"/>
    <element ID="21"/>
    <element ID="27"/>
    <element ID="39"/>
    <element ID="46"/>
  </elements>
</source>

the most elegant way to

<target>
  <elements>
    <element ID="46"/>
    <element ID="21"/>
    <element ID="39"/>
    <element ID="27"/>
    <element ID="17"/>
  </elements>
</target>

thanks in advance for any help.

frank

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>