Subject: RE: Date Range in XSL
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Wed, 16 Apr 2003 09:01:45 -0700
|
There may be better way of doing this.
But How about this.
<xsl:apply-templates select="recorddata[symbol='MSFT' and
translate(date, '/', '')>01102003 and translate(date, '/',
'')<04162003]" />
Thanks,
Raj...
-----Original Message-----
From: nshah@xxxxxxxxxxxx [mailto:nshah@xxxxxxxxxxxx]
Sent: Wednesday, April 16, 2003 8:37 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Date Range in XSL
I have a XML document in the following format. The date is in mm/dd/yyyy
format. Once i get a symbol, start date and a end date, how do i search
the XML doc for all records that fall within that date range for that
symbol. For example, in the below format, when the user enters in a query
for MSFT and date range from Start date 02/16/2003 to End date 04/16/2003,
Only one record is shown.
<recorddata>
<symbol>MSFT</symbol>
<date>04/15/2003</date>
</recordata>
<recorddata>
<symbol>CSCO</symbol>
<date>04/15/2003</date>
</recordata>
<recorddata>
<symbol>MSFT</symbol>
<date>01/14/2003</date>
</recordata>
<recorddata>
<symbol>INTC</symbol>
<date>01/13/2003</date>
</recordata>
Thanks a lot for your help
Nehal
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 |
- Date Range in XSL
- nshah - Wed, 16 Apr 2003 11:34:15 -0400 (EDT)
- <Possible follow-ups>
- Avula, Raj - Wed, 16 Apr 2003 11:57:36 -0400 (EDT) <=
- Avula, Raj - Wed, 16 Apr 2003 13:01:17 -0400 (EDT)
- nshah - Wed, 16 Apr 2003 13:24:29 -0400 (EDT)
- Avula, Raj - Wed, 16 Apr 2003 13:33:38 -0400 (EDT)
|
|