[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] How to use xsl:key and xsl:sort?


Subject: [xsl] How to use xsl:key and xsl:sort?
From: "Uslu, Cihan Y (MED)" <Cihan.Uslu@xxxxxxxxxx>
Date: Thu, 14 Feb 2002 10:10:54 -0600

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



Current Thread
Keywords
xml