Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2006, 04:37 PM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default date validation

hi all,
I am a newbie to xslt. I need to validate if the user entered valid date, in a format like 'mm/dd/yyyy'. can anybody show me how please?

Thx,
R

 
Old August 7th, 2006, 11:02 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT 2.0 will process dates in international format (yyyy-mm-dd) using the expression ($x castable as xs:date) but you will first have to convert from the local format used in the USA, which you could do using substring operations.

In 1.0, take a look at the date-handling functions defined in www.exslt.org.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Validation aftabn10 PHP How-To 0 January 29th, 2007 10:35 AM
Date Validation ramesh055 ASP.NET 1.0 and 1.1 Professional 1 November 15th, 2006 11:09 AM
date validation (again) crmpicco Javascript How-To 14 March 29th, 2006 06:58 PM
Date Validation surendran Javascript How-To 3 February 25th, 2005 07:40 AM
Date validation Raul Javascript 4 February 25th, 2004 04:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.