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

Date expressions in XSLT 1.0

Subject: Date expressions in XSLT 1.0
From: Adrien Lazzaro <no_junk_email@xxxxxxx>
Date: Thu, 26 May 2005 20:50:23 -0400
xslt 1.0 date
Hello everyone,

I'm fairly new to the world of XSLT and had a few questions regarding date expressions in XSLT 1.0

Is there anyway to do simple date calculations?

For example: Get tomorrow's date by adding 1 to today's date
<xsl:comment>Ideal solution</xsl:comment>
<xsl:variable name="today" select="05/26/2005" />
<xsl:value-of select="$today + 1" /

Given my limited knowledge, it seems that XSLT 1.0 does not support data typing (only strings and numbers). Is there any way to get around this?

Breaking down the date into separate numbers immediately comes to mind. Nevertheless, doing so forces the use of lots of date logic (only 12 months per year, different months have different number of days, etc.) which seems mind-numbing to implement.

I've also found certain extensions (from http://www.exslt.org) that claim to implement such features. Yet, installing such extensions would decrease the portability of the XSLT stylesheets.

Does anyone have any suggestions on which path to take?
I'm also following the 'get Data BETWEEN  FromDate and ToDate' thread.

Thank you for your help,
Adrien

p.s. Not sure which processor I'm using. I'm using XSLT with Filemaker 7 Server Advanced running on a Mac.

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.