This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to use xsl:key and xsl:sort?
- From: "Uslu, Cihan Y (MED)" <Cihan dot Uslu at med dot ge dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 14 Feb 2002 10:10:54 -0600
- Subject: [xsl] How to use xsl:key and xsl:sort?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I have a XML file that I'm trying to convert to HTML by with XSL.
-------------
......
<answer item-id="C">
<para>Perform axial 4i/8i scans in all detector matrix
configurations.</para>
</answer>
<answer item-id="B">
<para>Determine the channel(s) affected within the
row(s).</para>
</answer>
<answer item-id="D">
<para>Determine the row(s) affected.</para>
</answer>
<answer item-id="A">
<para>Review system error log.</para>
</answer>
......
------------------------
What I want to do is;
1- List content of <answer> in the order they appear in XML and format
it in alphabetical order
A,B,C,D.....
A.Perform axial 4i/8i scans in all detector matrix configurations.
B.Determine the channel(s) affected within the row(s).
C.Determine the row(s) affected.
D.Review system error log.
--------------------------
2- then, by looking at the @item-id order I want to list the correct
order for the answers, and that would be
D, B, A, C
-------------------------
3- and finally list the corrcet answers with @item-id and answer content
D.Review system error log.
B.Determine the channel(s) affected within the row(s).
A.Perform axial 4i/8i scans in all detector matrix configurations.
C.Determine the row(s) affected.
How can I do this?
Cihan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list