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

RE: compare date value with 2 other ones

Subject: RE: compare date value with 2 other ones
From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
Date: Thu, 5 Apr 2001 08:48:58 -0700
xml compare date
Whoever created this XML needs to be told that dates that will be read by
computer programs should be formatted as Y-M-D, whereas dates that will be
read by people should be formatted in the way those people prefer it.  XML
files are meant for computer input, not human input.

PC2

-----Original Message-----
From: Kristof Bernaert [mailto:kbernaert@xxxxxxxxxxx]
Sent: April 5, 2001 02:14
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  compare date value with 2 other ones


Take the current date with this format: 05/04/2001

i have this xml with some news-blocks

<news>
<block startdate="03/04/2001" endddate="06/04/2001" id="1">news 1</block>
<block startdate="05/04/2001" endddate="10/04/2001" id="2">news 2</block>
</news>

I have an extern xml-file (current_date.xml, in same root of other *.xml)
that contains always current date like this
<current_date>05/04/2001</current_date>

now, in xsl i want only view the newsblocks where currentdate is between the
start- and enddate.

<xsl:for-each select="news/block[@startdate =>
document(current_date.xml)/current_date and @enddate =<
document(current_date.xml)/current_date]">
<xsl:apply-templates/>
</xsl:for-each>

of course, this isn't working, because:

How have i to handle the date ? to compare correctly the day, month and year
?

thx


 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.