<xsl:for-each select="recorddata">
<xsl:variable name="new_date"
select="concat(substring(date, 7, 4), substring(date, 1, 2), substring(date,
4, 2))" />
<xsl:if test="symbol='MSFT' and
$new_date>20030110 and $new_date<20030416">
<xsl:apply-templates select="." />
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="recorddata">
<xsl:value-of select="date" />
</xsl:template>
Above one should work. But you have to make sure to pass the Range of Dates
in the format YYYYMMDD
Raj...
-----Original Message-----
From: nshah(_at_)pershing(_dot_)com [mailto:nshah(_at_)pershing(_dot_)com]
Sent: Wednesday, April 16, 2003 10:29 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Date Range in XSL
I am sorry but can you give a working example of how to do this. This is
the first time i am playing around with XSL and XML.
Thanks for your help..
Nehal
----- Forwarded by Nehal Shah/JerseyCity/Pershing on 04/16/03 01:34 PM
-----
"Avula, Raj"
<ravula(_at_)firstam(_dot_)com> To:
"'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'"
Sent by:
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
owner-xsl-list(_at_)lists(_dot_)mulbe cc:
rrytech.com Subject: RE: [xsl]
Date Range in XSL
04/16/03 01:05 PM
Please respond to xsl-list
You are right David. I missed that part.
Thanks for pointing out.
Thanks,
Raj..
-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Wednesday, April 16, 2003 9:40 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Date Range in XSL
But How about this.
<xsl:apply-templates select="recorddata[symbol='MSFT' and
translate(date, '/', '')>01102003 and translate(date, '/',
'')<04162003]" />
Thanks,
That would have worked if the dates had been in yyyy/mm/dd format but
if the parts are not in that order you need to shuffle them
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list