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

RE: Date Range Search XML using XSLT

Subject: RE: Date Range Search XML using XSLT
From: Bagchi Ratul <bratul@xxxxxxxx>
Date: Sat, 9 Mar 2002 08:01:54 +0100
xslt date range
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:  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

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.