Subject: Re: [xsl] Date variable ?! From: andrew.curry@xxxxxxxxxxxx Date: Fri, 5 Dec 2003 10:43:35 -0000 |
if you sort by the reverse of your date(26.11.2003) i.e. 20031126 .... you can extract and sort using substring on your date i.e. <xsl:foreach............. <xsl:sort data-type="number" select="substring(@date,6,4)"/>/<xsl:value-of select="substring(@date,3,2)"/>/<xsl:value-of select="substring(@date,1,2)" order="ascending"/> <xsl:if position()=1> </xsl:if> Syntax and substring result is most likely wrong but i think it would work. PA Sport RnD Andrew Curry Software Developer Telephone: 01430 455545 Website: http://www.pa.press.net PA News Limited: Bridgegate, Howden, East Yorkshire, DN14 7AE Registered Office: PA News Limited, 292 Vauxhall Bridge Road, London SW1V 1AE. Registered in England No. 3891053 ----- Original Message ----- From: "Iris Benjamin" <Benjamin.Iris@xxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, December 05, 2003 10:16 AM Subject: [xsl] Date variable ?! > Hello > > I have a simple XML document wit lots of elements : "testCase" > every "testCase" has an attribute such as startedOn="26.11.2003 > 11:41:30" > In my xslt programm, I would like to extract the earliest startedOn > attribute among all the testCase elements. > That means, look through all the values of the attribute and find a way tget > the earliest date. > (if it is too complicated with the Time, we can only focus on the date) > > If you have any idea, I thank you in advance. > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Date variable ?!, Iris Benjamin | Thread | [xsl] XSL: How reaching the element, chris poppe |
[xsl] Date variable ?!, Iris Benjamin | Date | RE: [xsl] log saxon error messages , Michael Kay |
Month |