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

RE: Re: What is the best way to cast integer to string

Subject: RE: Re: What is the best way to cast integer to string in X SLT2?
From: Andrew Watt <andrew@xxxxxxxxxxxxxx>
Date: Mon, 12 May 2003 15:07:54 +0100
cast integer to date
At 08:29 12/05/2003 +0100, you wrote:
I'd like to see that on the xsl:stylesheet element.
  typing="no"
then we could forget the types all together,
as some people seem to think is possible [see xml-dev archive], yet this
example
shows isn't.

Dave,


I don't think it is quite as simple as that. Nor, if I am correct, can it be.

Suppose you have this:

<mySillyDate>Fred</mySillyDate>

then it isn't realistic to expect the date formatting functionality to work, is it?

Nor will this work with the date functions:

<myNotQuiteSoSillyDate>25th December 2010</myNotQuiteSoSillyDate>

So, at a minimum, people who want to manipulate dates as dates (rather than as strings) will need to get up to speed with the lexical space (lovely term <grin/>) of the date and duration types, even if correct lexical forms can be automatically cast to the correct type.

I don't see any way round that, other than avoiding using the date and duration functions of XPath 2.0.

Andrew Watt



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.