RE: [xsl] Date Range Search XML using XSLT

Subject: RE: [xsl] Date Range Search XML using XSLT
From: Bagchi Ratul <bratul@xxxxxxxx>
Date: Sat, 9 Mar 2002 08:01:54 +0100
I have done this, though in a very round-about fashion. I believe you will
display within a for-each loop.
So you code would look something like this
<xsl:for-each select="x">
Display whatever data you want to show.
</xsl:for-each> 

You can do this using extension function , add an if condition like the
following(assuming y is the date field)

<xsl:for-each select="x">
<xsl:if
test="user:getDateinNumberFormat(y)<user:getDateinNumberFormat(date1) and
user:getDateinNumberFormat(y)>user:getDateinNumberFormat(date2)">
Display whatever data you want to show.
</xsl:if>
</xsl:for-each>

the extension function "getDateinNumberFormat" will take in the date and
then return you some number(may be number if seconds after some base time
(say 1900)). Then your problem is solved. B'cos I didnt come across any XSLT
function which can do date comparisons. If some body knows of a better way
then please suggest.
Best of Luck.
Ratul.
-----Original Message-----
From: na na [mailto:b.krsna@xxxxxxxxx]
Sent: Saturday, March 09, 2002 12:12 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Date Range Search XML using XSLT


I am having an xml database which is stored in client side. I am storing the
date of creation of user on the xml database.

Now, I want to search the xml database using name and date  range.

I can able to search xml using the name of users.

I want to search the xml, using from date and to date which is given.

i am storing the date in "12 Feb 1981" format.

If anybody knows how to search xml using xslt for date range , Please let me
know.

Thanks.
Krishna Kumar B.
-- 


Krishna Kumar B.
Krishna Kumar B.
B-302,Block III,Kssidc Complex,
Electronics City,Hosur Road,
Bangalore-561229,Karnataka,India.
Ph:8523569/70


_______________________________________________
Get your free email from http://mymail.india.com


 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