[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Date variable ?!

Subject: Re: Date variable ?!
From: andrew.curry@xxxxxxxxxxxx
Date: Fri, 5 Dec 2003 10:43:35 -0000
date variable
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.