|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Sorting by one of many
If you know that date1 precedes date2 in document order, and so on, you can write <xsl:sort select="(date1|date2|date3|date4)[1]"/> In XSLT 2.0, you can do it whether or not the dates are in document order, by writing <xsl:sort select="(date1,date2,date3,date4)[1]"/> Michael Kay > -----Original Message----- > From: Isuls Matts [mailto:matts.isuls@xxxxxx] > Sent: 24 June 2004 11:50 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Sorting by one of many > > Hi > > Challenging sort problem for me. The rows can hold one to > four dates and output should be sorted by only one. date1 > being primary and if that is missing date2 and so on. How can > this be efficiently done? > > > <root> > <row> > <name>A</name> > <date2>20040101</date2> > </row> > <row> > <name>C</name> > <date3>20040103</date3> > <date4>20040109</date4> > </row> > <row> > <name>B</name> > <date1>20040102</date1> > <date3>20040101</date3> > </row> > </root> > > > //matts > > > --+------------------------------------------------------------------ > 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@xxxxxxxxxxxxxxxxxxxxxx> > --+-- > >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








